From 30f2962ede72a8e6a58efabed1dbd2241dcbcaa5 Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Wed, 2 May 2018 22:44:48 -0400 Subject: [PATCH] Make openapi spec generation wait for the apiserver on shutdown --- hack/update-openapi-spec.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hack/update-openapi-spec.sh b/hack/update-openapi-spec.sh index b0016bc29b9..0155dbc3547 100755 --- a/hack/update-openapi-spec.sh +++ b/hack/update-openapi-spec.sh @@ -31,7 +31,11 @@ make -C "${KUBE_ROOT}" WHAT=cmd/kube-apiserver function cleanup() { - [[ -n ${APISERVER_PID-} ]] && kill ${APISERVER_PID} 1>&2 2>/dev/null + if [[ -n ${APISERVER_PID-} ]]; then + kill ${APISERVER_PID} 1>&2 2>/dev/null + wait ${APISERVER_PID} || true + fi + unset APISERVER_PID kube::etcd::cleanup