mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 02:09:56 +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
|
||||||
AUDIT_POLICY_FILE=${AUDIT_POLICY_FILE:-""}
|
AUDIT_POLICY_FILE=${AUDIT_POLICY_FILE:-""}
|
||||||
|
|
||||||
|
# dmesg command PID for cleanup
|
||||||
|
DMESG_PID=${DMESG_PID:-""}
|
||||||
|
|
||||||
# Stop right away if the build fails
|
# Stop right away if the build fails
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@ -411,6 +414,9 @@ cleanup()
|
|||||||
[[ -n "${ETCD_DIR-}" ]] && kube::etcd::clean_etcd_dir
|
[[ -n "${ETCD_DIR-}" ]] && kube::etcd::clean_etcd_dir
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Cleanup dmesg running in the background
|
||||||
|
[[ -n "${DMESG_PID-}" ]] && kill "$DMESG_PID"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -812,6 +818,7 @@ function wait_coredns_available(){
|
|||||||
# loop through and grab all things in dmesg
|
# loop through and grab all things in dmesg
|
||||||
dmesg > "${LOG_DIR}/dmesg.log"
|
dmesg > "${LOG_DIR}/dmesg.log"
|
||||||
dmesg -w --human >> "${LOG_DIR}/dmesg.log" &
|
dmesg -w --human >> "${LOG_DIR}/dmesg.log" &
|
||||||
|
DMESG_PID=$!
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user