Skip to content

Commit

Permalink
Set DOCKER_NETWORK_OPTIONS via /etc/sysconfig/docker-network
Browse files Browse the repository at this point in the history
  • Loading branch information
sdodson committed Apr 20, 2015
1 parent 917c98d commit 4469e6f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
12 changes: 6 additions & 6 deletions ovs-simple/bin/openshift-sdn-simple-setup-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,20 @@ iptables -I INPUT $((lineno+1)) -i lbr0 -m comment --comment "traffic from docke


## docker
if [[ -z "${DOCKER_OPTIONS}" ]]
if [[ -z "${DOCKER_NETWORK_OPTIONS}" ]]
then
DOCKER_OPTIONS='-b=lbr0 --mtu=1450 --selinux-enabled'
DOCKER_NETWORK_OPTIONS='-b=lbr0 --mtu=1450'
fi

if ! grep -q "^OPTIONS='${DOCKER_OPTIONS}'" /etc/sysconfig/docker
if ! grep -q "^DOCKER_NETWORK_OPTIONS='${DOCKER_NETWORK_OPTIONS}'" /etc/sysconfig/docker-network
then
cat <<EOF > /etc/sysconfig/docker
cat <<EOF > /etc/sysconfig/docker-network
# This file has been modified by openshift-sdn. Please modify the
# DOCKER_OPTIONS variable in the /etc/sysconfig/openshift-sdn-node,
# DOCKER_NETWORK_OPTIONS variable in the /etc/sysconfig/openshift-sdn-node,
# /etc/sysconfig/openshift-sdn-master or /etc/sysconfig/openshift-sdn
# files (depending on your setup).
OPTIONS='${DOCKER_OPTIONS}'
DOCKER_NETWORK_OPTIONS='${DOCKER_NETWORK_OPTIONS}'
EOF
fi
systemctl daemon-reload
Expand Down
9 changes: 5 additions & 4 deletions rel-eng/openshift-sdn-node.sysconfig
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ MINION_IP=
# OPTIONS=-etcd-cafile=/path/to/cafile
OPTIONS=

# The $DOCKER_OPTIONS variable is used to overwrite the $OPTIONS
# variable in the /etc/sysconfig/docker file. This is a pretty ugly
# hack, but whatevs
DOCKER_OPTIONS='-b=lbr0 --mtu=1450 --selinux-enabled'
# The $DOCKER_NETWORK_OPTIONS variable is used to overwrite the
# $DOCKER_NETWORK_OPTIONS variable in the /etc/sysconfig/docker-network
# TODO: More elegant solution like this
# https://github.com/coreos/flannel/blob/master/dist/mk-docker-opts.sh
DOCKER_NETWORK_OPTIONS='-b=lbr0 --mtu=1450'

0 comments on commit 4469e6f

Please sign in to comment.