Skip to content

Commit 956eb9b

Browse files
authored
Merge pull request kubernetes#129843 from saschagrunert/dmesg-cleanup
Cleanup running dmesg process in `local-up-cluster.sh`
2 parents 964e5e0 + 5742f3d commit 956eb9b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

hack/local-up-cluster.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ KUBE_CONTROLLERS="${KUBE_CONTROLLERS:-"*"}"
156156
# Audit policy
157157
AUDIT_POLICY_FILE=${AUDIT_POLICY_FILE:-""}
158158

159+
# dmesg command PID for cleanup
160+
DMESG_PID=${DMESG_PID:-""}
161+
159162
# Stop right away if the build fails
160163
set -e
161164

@@ -411,6 +414,9 @@ cleanup()
411414
[[ -n "${ETCD_DIR-}" ]] && kube::etcd::clean_etcd_dir
412415
fi
413416

417+
# Cleanup dmesg running in the background
418+
[[ -n "${DMESG_PID-}" ]] && kill "$DMESG_PID"
419+
414420
exit 0
415421
}
416422

@@ -812,6 +818,7 @@ function wait_coredns_available(){
812818
# loop through and grab all things in dmesg
813819
dmesg > "${LOG_DIR}/dmesg.log"
814820
dmesg -w --human >> "${LOG_DIR}/dmesg.log" &
821+
DMESG_PID=$!
815822
fi
816823
}
817824

0 commit comments

Comments
 (0)