Commit 3d8f94ed authored by Nikhil Jindal's avatar Nikhil Jindal

Merge pull request #8040 from nak3/terminate-child-process-local-up-cluster

Terminate child process by cleanup() in local-up-cluster.sh
parents 6bf5acd1 e39f29ca
...@@ -109,17 +109,17 @@ cleanup_dockerized_kubelet() ...@@ -109,17 +109,17 @@ cleanup_dockerized_kubelet()
cleanup() cleanup()
{ {
echo "Cleaning up..." echo "Cleaning up..."
[[ -n "${APISERVER_PID-}" ]] && sudo kill "${APISERVER_PID}" [[ -n "${APISERVER_PID-}" ]] && sudo kill $(ps --ppid=${APISERVER_PID} --pid=${APISERVER_PID} | cut -d' ' -f1)
[[ -n "${CTLRMGR_PID-}" ]] && sudo kill "${CTLRMGR_PID}" [[ -n "${CTLRMGR_PID-}" ]] && sudo kill $(ps --ppid=${CTLRMGR_PID} --pid=${CTLRMGR_PID} | cut -d' ' -f1)
if [[ -n "$DOCKERIZE_KUBELET" ]]; then if [[ -n "$DOCKERIZE_KUBELET" ]]; then
cleanup_dockerized_kubelet cleanup_dockerized_kubelet
else else
[[ -n "${KUBELET_PID-}" ]] && sudo kill "${KUBELET_PID}" [[ -n "${KUBELET_PID-}" ]] && sudo kill $(ps --ppid=${KUBELET_PID} --pid=${KUBELET_PID} | cut -d' ' -f1)
fi fi
[[ -n "${PROXY_PID-}" ]] && sudo kill "${PROXY_PID}" [[ -n "${PROXY_PID-}" ]] && sudo kill $(ps --ppid=${PROXY_PID} --pid=${PROXY_PID} | cut -d' ' -f1)
[[ -n "${SCHEDULER_PID-}" ]] && sudo kill "${SCHEDULER_PID}" [[ -n "${SCHEDULER_PID-}" ]] && sudo kill $(ps --ppid=${SCHEDULER_PID} --pid=${SCHEDULER_PID} | cut -d' ' -f1)
[[ -n "${ETCD_PID-}" ]] && kube::etcd::stop [[ -n "${ETCD_PID-}" ]] && kube::etcd::stop
[[ -n "${ETCD_DIR-}" ]] && kube::etcd::clean_etcd_dir [[ -n "${ETCD_DIR-}" ]] && kube::etcd::clean_etcd_dir
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment