From 2a30f1c31b2afbe2ac23f38ccfc85beacf7576be Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Sun, 3 Apr 2022 22:30:38 -0400 Subject: [PATCH] Reorder process shutdown in test-cmd and exit immediately --- test/cmd/legacy-script.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/cmd/legacy-script.sh b/test/cmd/legacy-script.sh index 5c8414aa995..806c40a3d1e 100755 --- a/test/cmd/legacy-script.sh +++ b/test/cmd/legacy-script.sh @@ -174,7 +174,7 @@ fi function stop-proxy() { [[ -n "${PROXY_PORT-}" ]] && kube::log::status "Stopping proxy on port ${PROXY_PORT}" - [[ -n "${PROXY_PID-}" ]] && kill "${PROXY_PID}" 1>&2 2>/dev/null + [[ -n "${PROXY_PID-}" ]] && kill -9 "${PROXY_PID}" 1>&2 2>/dev/null [[ -n "${PROXY_PORT_FILE-}" ]] && rm -f "${PROXY_PORT_FILE}" PROXY_PID= PROXY_PORT= @@ -223,10 +223,10 @@ function start-proxy() function cleanup() { - [[ -n "${APISERVER_PID-}" ]] && kill "${APISERVER_PID}" 1>&2 2>/dev/null - [[ -n "${CTLRMGR_PID-}" ]] && kill "${CTLRMGR_PID}" 1>&2 2>/dev/null - [[ -n "${KUBELET_PID-}" ]] && kill "${KUBELET_PID}" 1>&2 2>/dev/null stop-proxy + [[ -n "${CTLRMGR_PID-}" ]] && kill -9 "${CTLRMGR_PID}" 1>&2 2>/dev/null + [[ -n "${KUBELET_PID-}" ]] && kill -9 "${KUBELET_PID}" 1>&2 2>/dev/null + [[ -n "${APISERVER_PID-}" ]] && kill -9 "${APISERVER_PID}" 1>&2 2>/dev/null kube::etcd::cleanup rm -rf "${KUBE_TEMP}"