summaryrefslogtreecommitdiffstats
path: root/boot/asdc_install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'boot/asdc_install.sh')
-rw-r--r--boot/asdc_install.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/boot/asdc_install.sh b/boot/asdc_install.sh
index 99b2a39c..a7baae76 100644
--- a/boot/asdc_install.sh
+++ b/boot/asdc_install.sh
@@ -6,6 +6,7 @@ ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt)
CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
GERRIT_BRANCH=$(cat /opt/config/gerrit_branch.txt)
+MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
# Add host name to /etc/host to avoid warnings in openstack images
if [[ $CLOUD_ENV != "rackspace" ]]
@@ -41,6 +42,7 @@ then
echo "iface eth1 inet static" >> /etc/network/interfaces
echo " address $LOCAL_IP" >> /etc/network/interfaces
echo " netmask $NETMASK" >> /etc/network/interfaces
+ echo " mtu $MTU" >> /etc/network/interfaces
ifup eth1
fi
@@ -85,8 +87,6 @@ mount /dev/$DISK"1" /data
echo "/dev/"$DISK"1 /data ext4 errors=remount-ro,noatime,barrier=0 0 1" >> /etc/fstab
# 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