File tree Expand file tree Collapse file tree 4 files changed +25
-6
lines changed Expand file tree Collapse file tree 4 files changed +25
-6
lines changed Original file line number Diff line number Diff line change @@ -51,11 +51,15 @@ echo "Applying KWasm node installer job..."
5151kubectl apply -f ./k3s-kwasm-job.yml
5252
5353echo " Waiting for node installer job to complete..."
54- kubectl wait -n kwasm --for=condition=Ready pod --selector=job-name=k3s-provision-kwasm --timeout=90s || true
5554kubectl wait -n kwasm --for=jsonpath=' {.status.phase}' =Succeeded pod --selector=job-name=k3s-provision-kwasm --timeout=60s
5655
5756# Verify the SystemdCgroup is set to true
58- sudo cat /var/lib/rancher/k3s/agent/etc/containerd/config.toml | grep -A2 " runtimes.spin.options" | grep " SystemdCgroup = true"
57+ if sudo cat /var/lib/rancher/k3s/agent/etc/containerd/config.toml | grep -A2 " runtimes.spin.options" | grep -q " SystemdCgroup = true" ; then
58+ echo " SystemdCgroup is set to true"
59+ else
60+ echo " SystemdCgroup is not set to true"
61+ exit 1
62+ fi
5963
6064if ! kubectl get pods -n kwasm | grep -q " k3s-provision-kwasm.*Completed" ; then
6165 echo " Node installer job failed!"
Original file line number Diff line number Diff line change @@ -56,7 +56,12 @@ kubectl --context=kind-spin-test wait -n kwasm --for=condition=Ready pod --selec
5656kubectl --context=kind-spin-test wait -n kwasm --for=jsonpath=' {.status.phase}' =Succeeded pod --selector=job-name=spin-test-control-plane-provision-kwasm --timeout=60s
5757
5858# Verify the SystemdCgroup is set to true
59- docker exec spin-test-control-plane cat /etc/containerd/config.toml | grep -A5 " spin" | grep " SystemdCgroup = true"
59+ if docker exec spin-test-control-plane cat /etc/containerd/config.toml | grep -A5 " spin" | grep -q " SystemdCgroup = true" ; then
60+ echo " SystemdCgroup is set to true"
61+ else
62+ echo " SystemdCgroup is not set to true"
63+ exit 1
64+ fi
6065
6166if ! kubectl --context=kind-spin-test get pods -n kwasm | grep -q " spin-test-control-plane-provision-kwasm.*Completed" ; then
6267 echo " Node installer job failed!"
Original file line number Diff line number Diff line change @@ -62,8 +62,13 @@ kubectl apply -f ./microk8s-kwasm-job.yml
6262echo " Waiting for node installer job to complete..."
6363kubectl wait -n kwasm --for=jsonpath=' {.status.phase}' =Succeeded pod --selector=job-name=microk8s-provision-kwasm --timeout=60s
6464
65- # Verify the SystemdCgroup is set to true
66- sudo cat /var/snap/microk8s/current/args/containerd.toml | grep -A5 " spin" | grep " SystemdCgroup = true"
65+ # Ensure the SystemdCgroup is not set to true
66+ if sudo cat /var/snap/microk8s/current/args/containerd.toml | grep -A5 " spin" | grep -q " SystemdCgroup = true" ; then
67+ echo " Failed: SystemdCgroup is set to true"
68+ exit 1
69+ else
70+ echo " Passed: SystemdCgroup is not set to true"
71+ fi
6772
6873if ! kubectl get pods -n kwasm | grep -q " microk8s-provision-kwasm.*Completed" ; then
6974 echo " Node installer job failed!"
Original file line number Diff line number Diff line change @@ -45,7 +45,12 @@ kubectl wait -n kwasm --for=condition=Ready pod --selector=job-name=minikube-pro
4545kubectl wait -n kwasm --for=jsonpath=' {.status.phase}' =Succeeded pod --selector=job-name=minikube-provision-kwasm --timeout=60s
4646
4747# Verify the SystemdCgroup is set to true
48- docker exec $NODE_NAME cat /etc/containerd/config.toml | grep -A5 " spin" | grep " SystemdCgroup = true"
48+ if docker exec $NODE_NAME cat /etc/containerd/config.toml | grep -A5 " spin" | grep -q " SystemdCgroup = true" ; then
49+ echo " SystemdCgroup is set to true"
50+ else
51+ echo " SystemdCgroup is not set to true"
52+ exit 1
53+ fi
4954
5055if ! kubectl get pods -n kwasm | grep -q " minikube-provision-kwasm.*Completed" ; then
5156 echo " Node installer job failed!"
You can’t perform that action at this time.
0 commit comments