Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Testing] Describe unhealthy pods when tests clean up. #2554

Merged
merged 2 commits into from
Nov 6, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions test/deploy-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ SHOULD_CLEANUP_CLUSTER=false
function clean_up {
set +e # the following clean up commands shouldn't exit on error

echo "Describe pods with unhealthy status:"
UNHEALTHY_PODS=($(kubectl get pods --field-selector=status.phase!=Running,status.phase!=Succeeded -o=custom-columns=:metadata.name -n $NAMESPACE))
for POD_NAME in "${UNHEALTHY_PODS[@]}"; do
echo ""
echo "For pod $POD_NAME:"
kubectl describe pod $POD_NAME -n $NAMESPACE
done
echo "============================================================="
echo "The above is output of describing pods with unhealthy status."
echo "============================================================="

echo "Status of pods before clean up:"
kubectl get pods --all-namespaces

Expand Down