aboutsummaryrefslogtreecommitdiffstats
path: root/boot/sdnc_install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'boot/sdnc_install.sh')
-rw-r--r--boot/sdnc_install.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/boot/sdnc_install.sh b/boot/sdnc_install.sh
index 8448425c..44c15580 100644
--- a/boot/sdnc_install.sh
+++ b/boot/sdnc_install.sh
@@ -63,6 +63,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