Keep stop cluster going when worker SSH is down
This commit is contained in:
parent
a5bf0c2f01
commit
cc7811b152
6
jeannie
6
jeannie
|
|
@ -4402,7 +4402,7 @@ stop_remote_kubernetes_services() {
|
||||||
local target="$1"
|
local target="$1"
|
||||||
|
|
||||||
echo "--> Stopping Kubernetes services on remote worker ${target}..."
|
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
|
"sudo systemctl stop kubelet 2>/dev/null || true
|
||||||
if command -v crictl >/dev/null 2>&1; then
|
if command -v crictl >/dev/null 2>&1; then
|
||||||
sudo crictl stop --all 2>/dev/null || true
|
sudo crictl stop --all 2>/dev/null || true
|
||||||
|
|
@ -4419,7 +4419,9 @@ elif command -v ctr >/dev/null 2>&1; then
|
||||||
done
|
done
|
||||||
fi
|
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
|
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() {
|
start_remote_kubernetes_services() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue