From d00e49c266ead95b75e06904482e43eedfa9a216 Mon Sep 17 00:00:00 2001 From: David Garcia Date: Fri, 19 Jun 2020 10:33:37 +0200 Subject: [PATCH] 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 --- installers/charmed_install.sh | 1 + installers/full_install_osm.sh | 1 + 2 files changed, 2 insertions(+) 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 -- 2.25.1