X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2FVCA%2Fstart_build;h=6cc5e301691af2eaee4b9566c9d1de5750a09de9;hb=5a81a7566caabf1cbcdd9f0bd8822d8b1d70481d;hp=d6ccfd8c40f5c7457231f430d8b38d86cba35289;hpb=46cac1a1f0dbdf2d6c2d7e0089d3cc099019f4a0;p=osm%2Fdevops.git diff --git a/jenkins/VCA/start_build b/jenkins/VCA/start_build index d6ccfd8c..6cc5e301 100755 --- a/jenkins/VCA/start_build +++ b/jenkins/VCA/start_build @@ -60,11 +60,15 @@ DEFAULT_INTERFACE=$(route -n | awk '$1~/^0.0.0.0/ {print $8}') DEFAULT_MTU=$( ip addr show $DEFAULT_INTERFACE | perl -ne 'if (/mtu\s(\d+)/) {print $1;}') INFO "Setting lxdbr0 MTU to $DEFAULT_MTU" + +# This sets the MTU of lxdbr0 on the host machine without the need to recycle +# the interface or reboot the machine. ifconfig lxdbr0 mtu $DEFAULT_MTU -# Make the MTU change persistent between reboots -sed -i '/ifconfig lxdbr0 mtu/d' /etc/rc.local -sed -i "$ i ifconfig lxdbr0 mtu $DEFAULT_MTU" /etc/rc.local +# Setting the MTU in the default profile will be applied to every lxc container. +# Existing containers will need to be restarted for the new MTU to take effect. +# This will also persist the MTU change for the host's lxdbr0 +lxc profile device set default eth0 mtu $DEFAULT_MTU INFO "Pre-caching Ubuntu:16.04 image (this may take several minutes)..."