mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
Cleanup running dmesg process in local-up-cluster.sh
We have to cleanup the background job after the script otherwise we will end up having them hanging around. Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
This commit is contained in:
parent
7140b4910c
commit
5742f3deeb
@ -156,6 +156,9 @@ KUBE_CONTROLLERS="${KUBE_CONTROLLERS:-"*"}"
|
||||
# Audit policy
|
||||
AUDIT_POLICY_FILE=${AUDIT_POLICY_FILE:-""}
|
||||
|
||||
# dmesg command PID for cleanup
|
||||
DMESG_PID=${DMESG_PID:-""}
|
||||
|
||||
# Stop right away if the build fails
|
||||
set -e
|
||||
|
||||
@ -411,6 +414,9 @@ cleanup()
|
||||
[[ -n "${ETCD_DIR-}" ]] && kube::etcd::clean_etcd_dir
|
||||
fi
|
||||
|
||||
# Cleanup dmesg running in the background
|
||||
[[ -n "${DMESG_PID-}" ]] && kill "$DMESG_PID"
|
||||
|
||||
exit 0
|
||||
}
|
||||
|
||||
@ -812,6 +818,7 @@ function wait_coredns_available(){
|
||||
# loop through and grab all things in dmesg
|
||||
dmesg > "${LOG_DIR}/dmesg.log"
|
||||
dmesg -w --human >> "${LOG_DIR}/dmesg.log" &
|
||||
DMESG_PID=$!
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user