Skip to content

Commit 097069e

Browse files
committed
Call kind delete cluster until success delete
Docker sometimes fails deleting workers: - Container failed to exit within 10s of kill - trying direct SIGKILL - cannot remove container "kind-worker": could not kill container: tried to kill container, but did not receive an exit event kind delete cluster is an idempotent operation, meaning it may be called multiple times without failing (like "rm -f"). If the cluster resources exist they will be deleted, and if the cluster is already gone it will just return success. Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
1 parent 7c886a5 commit 097069e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/actions.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ jobs:
320320
docker ps -a
321321
export KUBECONFIG=$(pwd)/$CLUSTER.conf
322322
kubectl get all -A || true
323-
kind delete cluster --name $CLUSTER --verbosity 1
323+
until kind delete cluster --name $CLUSTER --verbosity 1; do sleep 1; done
324324
rm -f /shared/pss/cluster-level-pss.$CLUSTER.yaml /tmp/cluster.yml
325325
rm -rf ~/.config/helm
326326
continue-on-error: true
@@ -408,7 +408,7 @@ jobs:
408408
docker ps -a
409409
export KUBECONFIG=$(pwd)/$CLUSTER.conf
410410
kubectl get all -A || true
411-
kind delete cluster --name $CLUSTER --verbosity 1
411+
until kind delete cluster --name $CLUSTER --verbosity 1; do sleep 1; done
412412
rm -f /tmp/cluster.yml
413413
rm -rf ~/.config/helm
414414
continue-on-error: true
@@ -537,7 +537,7 @@ jobs:
537537
docker ps -a
538538
export KUBECONFIG=$(pwd)/$CLUSTER.conf
539539
kubectl get all -A || true
540-
kind delete cluster --name $CLUSTER --verbosity 1
540+
until kind delete cluster --name $CLUSTER --verbosity 1; do sleep 1; done
541541
rm -f /tmp/cluster.yml
542542
rm -rf ~/.config/helm
543543
continue-on-error: true
@@ -632,7 +632,7 @@ jobs:
632632
docker ps -a
633633
export KUBECONFIG=$(pwd)/$CLUSTER.conf
634634
kubectl get all -A || true
635-
kind delete cluster --name $CLUSTER --verbosity 1
635+
until kind delete cluster --name $CLUSTER --verbosity 1; do sleep 1; done
636636
rm -f /tmp/cluster.yml
637637
rm -rf ~/.config/helm
638638
continue-on-error: true
@@ -727,7 +727,7 @@ jobs:
727727
docker ps -a
728728
export KUBECONFIG=$(pwd)/$CLUSTER.conf
729729
kubectl get all -A || true
730-
kind delete cluster --name $CLUSTER --verbosity 1
730+
until kind delete cluster --name $CLUSTER --verbosity 1; do sleep 1; done
731731
rm -f /tmp/cluster.yml
732732
rm -rf ~/.config/helm
733733
continue-on-error: true

0 commit comments

Comments
 (0)