Log cronjob pod diagnostics on failure/hang in CTST#2456
Conversation
Hello delthas,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
|
This additional debug logging helped find the s3utils issue. |
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 |
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
2e17b25 to
d61d105
Compare
|
/approve |
Integration data createdI have created the integration data for the additional destination branches.
The following branches will NOT be impacted:
You can set option The following options are set: approve |
Build failedThe build for commit did not succeed in branch w/2.16/improvement/ZENKO-5308/cronjob-pod-diagnostics The following options are set: approve |
In the queueThe changeset has received all authorizations and has been added to the The changeset will be merged in:
The following branches will NOT be impacted:
This pull request does not target the following hotfix branch(es) so they
There is no action required on your side. You will be notified here once IMPORTANT Please do not attempt to modify this pull request.
If you need this pull request to be removed from the queue, please contact a The following options are set: approve |
Queue build failedThe corresponding build for the queue failed:
Remove the pull request from the queue
|
|
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
Please check the status of the associated issue ZENKO-5308. Goodbye delthas. |
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