From: Jingzhao.Ni Date: Mon, 16 Sep 2019 13:57:15 +0000 (+0800) Subject: Fix the installation bug in startup.sh file X-Git-Tag: 2.0.0-AKRAINO~9 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;ds=sidebyside;h=ac82cd425557326f6b4362d9c6655e6e6038375a;p=iec.git 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 --- 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