From: David Garcia Date: Fri, 19 Jun 2020 08:33:37 +0000 (+0200) Subject: Fix bug with MTU in LXD configuration X-Git-Tag: v7.1.2~1 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F16%2F9116%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 297348aa..3895ce8d 100755 --- a/installers/charmed_install.sh +++ b/installers/charmed_install.sh @@ -85,6 +85,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 99999269..42d67b1e 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -280,6 +280,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