fix: add --previous flag to capture crashed pod logs in CI - #286
Open
lucas-benedito wants to merge 1 commit into
Open
lucas-benedito wants to merge 1 commit into
lucas-benedito wants to merge 1 commit into
Conversation
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>
jskacel
approved these changes
Sep 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY
When
galaxy-ngpods enterCrashLoopBackOff,kubectl logswithout--previousshows 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, andgalaxy-workerpods all enterCrashLoopBackOff(9 restarts) within 25 minutes, but the existingshow_logs.shonly captures current container logs, so the root cause is invisible in CI output.Adds
--previous --tail=2000to 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
COMPONENT NAME
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
CrashLoopBackOffbut no crash output captured.