X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2FVCA%2Fstart_build;h=d6ccfd8c40f5c7457231f430d8b38d86cba35289;hb=6a2d533f941b6e52377ec1f3f1c690eef1845550;hp=45b0e94c38b953716c06ff2f523b7d2ed8ccc976;hpb=53881d768d915dc6f0d97890e7bd1c7592f56ef9;p=osm%2Fdevops.git diff --git a/jenkins/VCA/start_build b/jenkins/VCA/start_build index 45b0e94c..d6ccfd8c 100755 --- a/jenkins/VCA/start_build +++ b/jenkins/VCA/start_build @@ -56,6 +56,16 @@ EOF systemctl enable lxd-bridge systemctl start lxd-bridge +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" +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 + INFO "Pre-caching Ubuntu:16.04 image (this may take several minutes)..." # Setup a daily cron to update the cached image