Skip to content

Commit 546d550

Browse files
committed
prow.sh: debug failing KinD cluster creation
When KinD fails in a Prow job, we need additional information to understand why it failed.
1 parent 9b0d9cd commit 546d550

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

prow.sh

+11-1
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,17 @@ $(list_gates "$gates")
488488
featureGates:
489489
$(list_gates "$gates")
490490
EOF
491-
run kind create cluster --name csi-prow --config "${CSI_PROW_WORK}/kind-config.yaml" --wait 5m --image "$image" || die "'kind create cluster' failed"
491+
info "kind-config.yaml:"
492+
cat "${CSI_PROW_WORK}/kind-config.yaml"
493+
if ! run kind create cluster --name csi-prow --config "${CSI_PROW_WORK}/kind-config.yaml" --wait 5m --image "$image"; then
494+
warn "Cluster creation failed. Will try again with higher verbosity."
495+
info "Available Docker images:"
496+
docker image ls
497+
if ! run kind --loglevel debug create cluster --retain --name csi-prow --config "${CSI_PROW_WORK}/kind-config.yaml" --wait 5m --image "$image"; then
498+
run kind export logs --name csi-prow "$ARTIFACTS/kind-cluster"
499+
die "Cluster creation failed again, giving up. See the 'kind-cluster' artifact directory for additional logs."
500+
fi
501+
fi
492502
KUBECONFIG="$(kind get kubeconfig-path --name=csi-prow)"
493503
export KUBECONFIG
494504
}

0 commit comments

Comments
 (0)