Fix the installation bug in startup.sh file 86/1586/1
authorJingzhao.Ni <Jingzhao.Ni@arm.com>
Mon, 16 Sep 2019 13:57:15 +0000 (21:57 +0800)
committerJingzhao.Ni <Jingzhao.Ni@arm.com>
Mon, 16 Sep 2019 13:57:15 +0000 (21:57 +0800)
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 <Jingzhao.Ni@arm.com>
Change-Id: I7bac839a1b77a76f536da35989741776aefb5929

src/foundation/scripts/startup.sh

index 9aeda20..f9f137d 100755 (executable)
@@ -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