Keep stop cluster going when worker SSH is down

This commit is contained in:
juvdiaz 2026-06-29 23:40:07 -06:00
parent a5bf0c2f01
commit cc7811b152
1 changed files with 4 additions and 2 deletions

View File

@ -4402,7 +4402,7 @@ stop_remote_kubernetes_services() {
local target="$1"
echo "--> Stopping Kubernetes services on remote worker ${target}..."
ssh -o ConnectTimeout=5 "${target}" \
if ! ssh -o ConnectTimeout=5 "${target}" \
"sudo systemctl stop kubelet 2>/dev/null || true
if command -v crictl >/dev/null 2>&1; then
sudo crictl stop --all 2>/dev/null || true
@ -4419,7 +4419,9 @@ elif command -v ctr >/dev/null 2>&1; then
done
fi
if [ '${LAB_CLUSTER_STOP_CONTAINERD:-false}' = 'true' ]; then sudo systemctl stop containerd 2>/dev/null || true; sudo systemctl reset-failed containerd 2>/dev/null || true; fi
sudo systemctl reset-failed kubelet 2>/dev/null || true"
sudo systemctl reset-failed kubelet 2>/dev/null || true"; then
echo "Warning: could not SSH to ${target}; continuing because Pimox VM shutdown follows." >&2
fi
}
start_remote_kubernetes_services() {