From 97352fe13012c7054874dd92c24912eb1d19a2c2 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 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 -- 2.25.1