From 165127a3fdcda3c47e37d5759ca243355d25b64a Mon Sep 17 00:00:00 2001 From: Ivan Shvedunov Date: Fri, 20 Aug 2021 14:07:54 +0300 Subject: [PATCH] Add diagnostics for failed devenv StatefulSet rollouts --- hack/buildenv.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hack/buildenv.sh b/hack/buildenv.sh index 6a9471d..b82f51c 100755 --- a/hack/buildenv.sh +++ b/hack/buildenv.sh @@ -156,7 +156,14 @@ spec: selector: app: ${name} EOF - kubectl rollout status --timeout=5m statefulset -n "${K8S_NAMESPACE}" "${name}" + if ! kubectl rollout status --timeout=5m statefulset -n "${K8S_NAMESPACE}" "${name}"; then + set -x + kubectl describe statefulset -n "${K8S_NAMESPACE}" "${name}" + kubectl describe pod -n "${K8S_NAMESPACE}" "${name}-0" + set +x + echo >&2 "*** Devenv rollout failed, see diagnostics above ***" + exit 1 + fi } function k8s_cleanup {