Skip to content

fix: add --previous flag to capture crashed pod logs in CI - #286

Open
lucas-benedito wants to merge 1 commit into
ansible:mainfrom
lucas-benedito:fix/ci-debug-pod-logs
Open

lucas-benedito wants to merge 1 commit into
ansible:mainfrom
lucas-benedito:fix/ci-debug-pod-logs

Conversation

@lucas-benedito

Copy link
Copy Markdown
Member
SUMMARY

When galaxy-ng pods enter CrashLoopBackOff, kubectl logs without --previous shows the newly restarted container, which has little output. The actual crash traceback is only available in the previous terminated container's logs.

This was identified while investigating why the CI has been timing out since ~2026-09-03: the galaxy-api, galaxy-content, and galaxy-worker pods all enter CrashLoopBackOff (9 restarts) within 25 minutes, but the existing show_logs.sh only captures current container logs, so the root cause is invisible in CI output.

Adds --previous --tail=2000 to the log collection for those three components so the next CI run will surface the Python traceback or startup error causing the crash.

ISSUE TYPE
  • Docs Fix or other nominal change
COMPONENT NAME
  • CI
STEPS TO REPRODUCE AND EXTRA INFO

See CI run https://github.com/ansible/galaxy-operator/actions/runs/33616035716 — all five matrix jobs time out after 30 min with pods in CrashLoopBackOff but no crash output captured.

When galaxy-ng pods enter CrashLoopBackOff, kubectl logs without
--previous shows the newly restarted container which has little output.
The actual crash traceback is only visible in the previous terminated
container's logs. Add --previous to galaxy-api, galaxy-content, and
galaxy-worker log collection in show_logs.sh.

Assisted-by: Claude
Signed-off-by: Lucas Benedito <lbenedit@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants