From 04487a2cfe907f045a1cdd486b76bed9214451f4 Mon Sep 17 00:00:00 2001 From: Jose Carlos Venegas Munoz Date: Thu, 30 May 2019 00:40:06 +0000 Subject: [PATCH] reset_stack: stop containerd and crio - If stop CRI service if is running - Restart the CRI service only if enabled - Do not enable crio on reset_stack.sh this should be only part of the setup. Signed-off-by: Jose Carlos Venegas Munoz --- clr-k8s-examples/reset_stack.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/clr-k8s-examples/reset_stack.sh b/clr-k8s-examples/reset_stack.sh index f995fb3..fe4154e 100755 --- a/clr-k8s-examples/reset_stack.sh +++ b/clr-k8s-examples/reset_stack.sh @@ -18,9 +18,10 @@ for pod in $(sudo crictl pods --quiet); do done #Forcefull cleanup all artifacts -#This is needed is things really go wrong +#This is needed if things really go wrong sudo systemctl stop kubelet -sudo systemctl stop crio +systemctl is-active crio && sudo systemctl stop crio +systemctl is-active containerd && sudo systemctl stop containerd sudo pkill -9 qemu sudo pkill -9 kata sudo pkill -9 kube @@ -42,8 +43,11 @@ sudo -E bash -c "rm -r /var/run/kata-containers/*" sudo rm -rf /var/lib/rook sudo systemctl daemon-reload -sudo systemctl enable kubelet crio -sudo systemctl restart crio +sudo systemctl is-active crio && sudo systemctl stop crio +sudo systemctl is-active containerd && sudo systemctl stop containerd +sudo systemctl is-enabled crio && sudo systemctl restart crio +sudo systemctl is-enabled containerd && sudo systemctl restart containerd + sudo systemctl restart kubelet reset_cluster