diff options
author | Marco Platania <platania@research.att.com> | 2017-05-09 12:20:28 -0400 |
---|---|---|
committer | Marco Platania <platania@research.att.com> | 2017-05-09 12:20:28 -0400 |
commit | 8a83578b5f007b4be348a969a74ad6c185c5b9e0 (patch) | |
tree | 4ff9f4296511963b7dd38a791922329c1f0537db /boot/dcae_install.sh | |
parent | 6271e83bfe0a8225f63aa520fa03968a7453ddd0 (diff) |
[UCA-10] Fix issue with MTU size in dockers
Change-Id: I19db615d3f5364d6b0894aabf5de60d192183595
Signed-off-by: Marco Platania <platania@research.att.com>
Diffstat (limited to 'boot/dcae_install.sh')
-rw-r--r-- | boot/dcae_install.sh | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/boot/dcae_install.sh b/boot/dcae_install.sh index 94d73e11..c8b4002d 100644 --- a/boot/dcae_install.sh +++ b/boot/dcae_install.sh @@ -93,6 +93,20 @@ mkdir /opt/docker curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose chmod +x /opt/docker/docker-compose +# Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may need to know the external DNS IP +MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1) + +if [ -s /opt/config/external_dns.txt ] +then + echo "DOCKER_OPTS=\"--dns $(cat /opt/config/external_dns.txt) --mtu=$MTU\"" >> /etc/default/docker +else + echo "DOCKER_OPTS=\"--mtu=$MTU\"" >> /etc/default/docker +fi + +cp /lib/systemd/system/docker.service /etc/systemd/system +sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service +service docker restart + # DNS IP address configuration echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head resolvconf -u @@ -107,7 +121,7 @@ mkdir -p /opt/app/dcae-controller cat > /opt/app/dcae-controller/config.yaml << EOF_CONFIG BASE: $BASE ZONE: $ZONE -DNS-IP-ADDR=$DNS_IP_ADDR +DNS-IP-ADDR: $DNS_IP_ADDR STATE: $STATE DCAE-VERSION: $DCAE_CODE_VERSION HORIZON-URL: $HORIZON_URL/$OPENSTACK_USER |