Log cronjob pod diagnostics on failure/hang in CTST#2456
Open
delthas wants to merge 1 commit into
Open
Conversation
Contributor
Hello delthas,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Contributor
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
Contributor
Author
|
This additional debug logging helped find the s3utils issue. |
Contributor
Request integration branchesWaiting for integration branch creation to be requested by the user. To request integration branches, please comment on this pull request with the following command: Alternatively, the |
SylvainSenechal
approved these changes
Jul 1, 2026
When a triggered cronjob (e.g. count-items) fails or hangs, the step only logged that the job failed, never why - the pod logs lived only in artifacts that were often truncated/missing on cancelled runs. Add, all best-effort and wrapped so logging never breaks the test: - a 30s heartbeat that re-reads the job status + pod state while waiting, so a silent stall is visible instead of dead air until the hook timeout; - on failure (and once on first detected crash/restart), a dump of the pod status and pod logs (current + previous), so the failure cause lands in the GitHub step log itself; - lock-acquisition visibility so cross-worker contention is logged. Issue: ZENKO-5308
bd86223 to
d61d105
Compare
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.
What
Add best-effort pod diagnostics + a heartbeat to
createJobAndWaitForCompletion(tests/functional/ctst/steps/utils/kubernetes.ts), the shared helper that triggers and waits for cronjobs (count-items) in quota / utilization / storage-usage CTST scenarios.Why
When the triggered job fails or hangs, the step previously logged only
"Job failed"with the job object — never why (no pod logs, exit code, orBackoffLimitExceededreason). The count-items pod logs lived only in the kind-logs artifact, which on a cancelled/hung run is frequently truncated or never uploaded, leaving the failure undiagnosable from the run itself. The watch also had no heartbeat, so a stalled job produced dead air until the 20-min Before-hook timeout.Changes (all best-effort, wrapped so logging never breaks the test)
CTST already runs at debug log level in CI, so these surface in the step log with no artifact dependency.
tsc --buildandeslintpass on the changed file.Issue: ZENKO-5308