From: David Garcia Date: Fri, 19 Jun 2020 08:33:37 +0000 (+0200) Subject: Fix bug with MTU in LXD configuration X-Git-Tag: release-v8.0-start~12 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F17%2F9117%2F1;p=osm%2Fdevops.git Fix bug with MTU in LXD configuration The MTU was not applied correctly in the LXD containers Change-Id: I337278f0122d462c5e0e11c02cd42ca7850b51d2 Signed-off-by: David Garcia --- diff --git a/installers/charmed_install.sh b/installers/charmed_install.sh index c2108d6d..49bf277b 100755 --- a/installers/charmed_install.sh +++ b/installers/charmed_install.sh @@ -83,6 +83,7 @@ function bootstrap_k8s_lxd(){ sg lxd -c "lxd waitready" DEFAULT_MTU=$(ip addr show $DEFAULT_IF | perl -ne 'if (/mtu\s(\d+)/) {print $1;}') sg lxd -c "lxc profile device set default eth0 mtu $DEFAULT_MTU" + sg lxd -c "lxc network set lxdbr0 bridge.mtu $DEFAULT_MTU" cat << EOF > $LXD_CLOUD clouds: diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index aef58835..ef38821a 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -283,6 +283,7 @@ function install_lxd() { [ -z "$DEFAULT_INTERFACE" ] && DEFAULT_INTERFACE=$(route -n |awk '$1~/^0.0.0.0/ {print $8; exit}') DEFAULT_MTU=$(ip addr show $DEFAULT_INTERFACE | perl -ne 'if (/mtu\s(\d+)/) {print $1;}') sg lxd -c "lxc profile device set default eth0 mtu $DEFAULT_MTU" + sg lxd -c "lxc network set lxdbr0 bridge.mtu $DEFAULT_MTU" #sudo systemctl stop lxd-bridge #sudo systemctl --system daemon-reload #sudo systemctl enable lxd-bridge