Attempt to remove swap 81/10681/2
authorbeierlm <mark.beierl@canonical.com>
Wed, 21 Apr 2021 13:12:13 +0000 (09:12 -0400)
committerbeierlm <mark.beierl@canonical.com>
Fri, 23 Apr 2021 14:01:19 +0000 (16:01 +0200)
Attempts to persist the deactivation of swap across reboots.
Note: this can still be overridden by external mechanisms
such as cloud-init

Fixes Bug 1062

Change-Id: I4b78191da63a1528bfe56d2c3e9a33342b86af21
Signed-off-by: beierlm <mark.beierl@canonical.com>
installers/full_install_osm.sh

index ef3ee9c..213db75 100755 (executable)
@@ -852,6 +852,7 @@ function install_kube() {
 #initializes kubernetes control plane
 function init_kubeadm() {
     sudo swapoff -a
+    sudo sed -i.bak '/.*none.*swap/s/^\(.*\)$/#\1/g' /etc/fstab
     sudo kubeadm init --config $1
     sleep 5
 }