summaryrefslogtreecommitdiffstats
path: root/boot
diff options
context:
space:
mode:
authorMarco Platania <platania@research.att.com>2017-05-09 12:20:28 -0400
committerMarco Platania <platania@research.att.com>2017-05-09 12:20:28 -0400
commit8a83578b5f007b4be348a969a74ad6c185c5b9e0 (patch)
tree4ff9f4296511963b7dd38a791922329c1f0537db /boot
parent6271e83bfe0a8225f63aa520fa03968a7453ddd0 (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')
-rw-r--r--boot/aai_install.sh14
-rw-r--r--boot/appc_install.sh14
-rw-r--r--boot/appc_vm_init.sh1
-rw-r--r--boot/asdc_install.sh14
-rw-r--r--boot/dcae_install.sh16
-rw-r--r--boot/dcae_vm_init.sh2
-rw-r--r--boot/mr_install.sh14
-rw-r--r--boot/mr_vm_init.sh2
-rw-r--r--boot/mso_install.sh14
-rw-r--r--boot/mso_vm_init.sh1
-rw-r--r--boot/policy_install.sh14
-rw-r--r--boot/policy_vm_init.sh2
-rw-r--r--boot/portal_install.sh14
-rw-r--r--boot/robot_install.sh14
-rw-r--r--boot/sdnc_install.sh14
-rw-r--r--boot/sdnc_vm_init.sh1
-rw-r--r--boot/vid_install.sh14
17 files changed, 163 insertions, 2 deletions
diff --git a/boot/aai_install.sh b/boot/aai_install.sh
index 255e0bdc..d11e1e18 100644
--- a/boot/aai_install.sh
+++ b/boot/aai_install.sh
@@ -62,6 +62,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
diff --git a/boot/appc_install.sh b/boot/appc_install.sh
index 2aaca408..4df0b4b8 100644
--- a/boot/appc_install.sh
+++ b/boot/appc_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
diff --git a/boot/appc_vm_init.sh b/boot/appc_vm_init.sh
index 33177f7f..90b09eaf 100644
--- a/boot/appc_vm_init.sh
+++ b/boot/appc_vm_init.sh
@@ -5,6 +5,7 @@ NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt)
export NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt)
DMAAP_TOPIC=$(cat /opt/config/dmaap_topic.txt)
DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt)
+export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
cd /opt/appc
git pull
diff --git a/boot/asdc_install.sh b/boot/asdc_install.sh
index 2f07b232..fa6e7994 100644
--- a/boot/asdc_install.sh
+++ b/boot/asdc_install.sh
@@ -80,6 +80,20 @@ mkdir -p /data
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
+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
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
diff --git a/boot/dcae_vm_init.sh b/boot/dcae_vm_init.sh
index 538e7313..460c3ef0 100644
--- a/boot/dcae_vm_init.sh
+++ b/boot/dcae_vm_init.sh
@@ -1,5 +1,7 @@
#!/bin/bash
+export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
+
cd /opt/dcae-startup-vm-controller
git pull
bash init.sh
diff --git a/boot/mr_install.sh b/boot/mr_install.sh
index ac476e59..480f2ea9 100644
--- a/boot/mr_install.sh
+++ b/boot/mr_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
diff --git a/boot/mr_vm_init.sh b/boot/mr_vm_init.sh
index 4e0ae6fb..8b80d469 100644
--- a/boot/mr_vm_init.sh
+++ b/boot/mr_vm_init.sh
@@ -1,5 +1,7 @@
#!/bin/bash
+export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
+
cd /opt/dcae-startup-vm-message-router
git pull
bash deploy.sh
diff --git a/boot/mso_install.sh b/boot/mso_install.sh
index bec76997..491db5ce 100644
--- a/boot/mso_install.sh
+++ b/boot/mso_install.sh
@@ -64,6 +64,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
diff --git a/boot/mso_vm_init.sh b/boot/mso_vm_init.sh
index 230c53ee..3387a7ae 100644
--- a/boot/mso_vm_init.sh
+++ b/boot/mso_vm_init.sh
@@ -7,6 +7,7 @@ DMAAP_TOPIC=$(cat /opt/config/dmaap_topic.txt)
OPENSTACK_USERNAME=$(cat /opt/config/openstack_username.txt)
OPENSTACK_APIKEY=$(cat /opt/config/api_key.txt)
export MSO_DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt)
+export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
# Deployments in OpenStack require a keystone file
if [ -e /opt/config/keystone.txt ]
diff --git a/boot/policy_install.sh b/boot/policy_install.sh
index 48dcd72c..c3f72a0c 100644
--- a/boot/policy_install.sh
+++ b/boot/policy_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
diff --git a/boot/policy_vm_init.sh b/boot/policy_vm_init.sh
index 2514467c..067ab1db 100644
--- a/boot/policy_vm_init.sh
+++ b/boot/policy_vm_init.sh
@@ -4,7 +4,7 @@ NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt)
NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt)
NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt)
DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt)
-
+export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
export DOCKER_REPOSITORY=${NEXUS_DOCKER_REPO}
cd /opt/policy
diff --git a/boot/portal_install.sh b/boot/portal_install.sh
index 39b28d96..f9ca52bb 100644
--- a/boot/portal_install.sh
+++ b/boot/portal_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
diff --git a/boot/robot_install.sh b/boot/robot_install.sh
index 71b419c8..b5b73878 100644
--- a/boot/robot_install.sh
+++ b/boot/robot_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
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
diff --git a/boot/sdnc_vm_init.sh b/boot/sdnc_vm_init.sh
index 0caaa03b..406e9216 100644
--- a/boot/sdnc_vm_init.sh
+++ b/boot/sdnc_vm_init.sh
@@ -4,6 +4,7 @@ NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt)
NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt)
export NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt)
DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt)
+export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
cd /opt/sdnc
git pull
diff --git a/boot/vid_install.sh b/boot/vid_install.sh
index d75fa04e..2bdd89be 100644
--- a/boot/vid_install.sh
+++ b/boot/vid_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