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

Pod logs in tests when startup fails #5901

Merged
merged 2 commits into from
Jul 1, 2024
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
8 changes: 8 additions & 0 deletions tests/suite/utils/resources_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,14 @@ def wait_until_all_pods_are_ready(v1: CoreV1Api, namespace) -> None:
wait_before_test()
counter = counter + 1
if counter >= 300:
print("\n===================== IC Logs Start =====================")
try:
pod_name = get_pod_name_that_contains(kube_apis.v1, "nginx-ingress", "nginx-ingress")
logs = kube_apis.v1.read_namespaced_pod_log(pod_name, "nginx-ingress")
print(logs)
except:
print("Failed to load logs for nginx-ingress pod")
print("\n===================== IC Logs End =====================")
raise PodNotReadyException()
print("All pods are Ready")

Expand Down