From ac82cd425557326f6b4362d9c6655e6e6038375a Mon Sep 17 00:00:00 2001 From: "Jingzhao.Ni" Date: Mon, 16 Sep 2019 21:57:15 +0800 Subject: [PATCH] Fix the installation bug in startup.sh file The k8s can not deployed properly when status of OS's swap is on. It mainly because that the "sudo swapon -a" operation should be invoked after the "kubeadm join xx" command, but not before it. So, in this patch, the sequency of 2 commands were re-ordered for fixing it. Signed-off-by: Jingzhao.Ni Change-Id: I7bac839a1b77a76f536da35989741776aefb5929 --- src/foundation/scripts/startup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/foundation/scripts/startup.sh b/src/foundation/scripts/startup.sh index 9aeda20..f9f137d 100755 --- a/src/foundation/scripts/startup.sh +++ b/src/foundation/scripts/startup.sh @@ -76,9 +76,9 @@ deploy_k8s () { CONTIVPP_CONFIG="cd iec/src/foundation/scripts/cni/contivpp && sudo ./contiv-update-config.sh ${DEV_NAME[$ip_addr]}" sshpass -p ${passwd} ssh -o StrictHostKeyChecking=no ${HOST_USER}@${ip_addr} $CONTIVPP_CONFIG fi - sshpass -p ${passwd} ssh -o StrictHostKeyChecking=no ${HOST_USER}@${ip_addr} "sudo swapon -a" - sshpass -p ${passwd} ssh -o StrictHostKeyChecking=no ${HOST_USER}@${ip_addr} ${SETUP_WORKER} + sshpass -p ${passwd} ssh -o StrictHostKeyChecking=no ${HOST_USER}@${ip_addr} ${SETUP_WORKER} + sshpass -p ${passwd} ssh -o StrictHostKeyChecking=no ${HOST_USER}@${ip_addr} "sudo swapon -a" done -- 2.16.6