diff --git a/contrib/firstboot.sh b/contrib/firstboot.sh index 0f298b7..9e44bee 100755 --- a/contrib/firstboot.sh +++ b/contrib/firstboot.sh @@ -13,6 +13,15 @@ k8sDeploy () { cd ${groot}/contrib/ansible && \ ansible-playbook bootstrap-node.yml && \ ansible-playbook init-cluster.yml + # Sometimes it's still not ready on this stage, let's check it just to be sure + while true ; do + echo "Waiting for node up..." + result=$(kubectl get nodes|awk '{print $2}'| tail -1| grep -nE '^Ready') + if [ -z "$result" ] ; then + break + fi + sleep 10 + done } InstallCSI () { helm repo add rimusz https://charts.rimusz.net diff --git a/runme.sh b/runme.sh index 36fbf74..5c33cdf 100755 --- a/runme.sh +++ b/runme.sh @@ -14,7 +14,7 @@ installvm() { echo "Allocating ${vmsize} disk..." && \ fallocate -l ${vmsize} ${k8sdsk} && \ echo "Downloading Linux kernel..." && \ - ${wget} ${apptmp}/kernel ${httpboot}/linux && \ + ${wget} ${apptmp}/kernel ${httpboot}/linux && \ echo "Downloading Initial ramdisk..." && \ ${wget} ${apptmp}/initrd ${httpboot}/initrd.gz && \ echo "Preparing K8S VM..." && \