Skip to content
Snippets Groups Projects
Commit 92428126 authored by Mark Beierl's avatar Mark Beierl Committed by Mark Beierl
Browse files

Fixes bug 2285: MTU Issue

There is a bug in microk8s 1.26.7 where calico will not be
created with the correct MTU:

https://github.com/canonical/microk8s/issues/4142



This patch adds a workaround.

Change-Id: I164e612c03a70e9417b6f736b71f71b8050fddbc
Signed-off-by: default avatarMark Beierl <mark.beierl@canonical.com>
parent f76b432c
No related branches found
No related tags found
No related merge requests found
......@@ -76,6 +76,11 @@ function install_snaps(){
sudo snap install microk8s --classic --channel=${MICROK8S_VERSION}/stable ||
FATAL_TRACK k8scluster "snap install microk8s ${MICROK8S_VERSION}/stable failed"
sudo usermod -a -G microk8s `whoami`
# Workaround bug in calico MTU detection
if [ ${DEFAULT_IF_MTU} -ne 1500 ] ; then
sudo mkdir -p /var/lib/calico
sudo ln -sf /var/snap/microk8s/current/var/lib/calico/mtu /var/lib/calico/mtu
fi
sudo cat /var/snap/microk8s/current/args/kube-apiserver | grep advertise-address || (
echo "--advertise-address $DEFAULT_IP" | sudo tee -a /var/snap/microk8s/current/args/kube-apiserver
sg ${KUBEGRP} -c microk8s.stop
......@@ -538,6 +543,7 @@ function install_microstack() {
DEFAULT_IF=`ip route list match 0.0.0.0 | awk '{print $5; exit}'`
DEFAULT_IP=`ip -o -4 a |grep ${DEFAULT_IF}|awk '{split($4,a,"/"); print a[1]; exit}'`
DEFAULT_IF_MTU=`ip a show ${DEFAULT_IF} | grep mtu | awk '{print $5}'`
check_arguments $@
mkdir -p ~/.osm
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment