Fix #6787: report ErrImagePull in the Integration ready condition - #6848
harshilv17 wants to merge 2 commits into
Conversation
|
@squakez pls review... |
squakez
left a comment
There was a problem hiding this comment.
The monitoring order is a bit fragile, so, not sure if inverting the order of checks is a good thing or can introduce regressions. I wonder if we can stick to the same logic and just introduce a "ErrImagePull" condition only to reach the same result.
|
✔️ Unit test coverage report - coverage increased from 63.8% to 63.9% (+0.1%) |
|
@squakez Makes sense. I have reverted the order change, so it now only matches ErrImagePull alongside ImagePullBackOff. That covers the flip to 0/1 updated replicas between pull retries. |
|
Also one thing being that, once the Deployment hits ProgressDeadlineExceeded (60s by default from the deployment trait), checkReadyCondition still replaces the pull error with "timed out progressing". |
|
I think we need to review entirely the monitoring after the work deprecated in #6622 - let me open a new issue to track the work, and we can park this PR in the while. Thanks for working on it. |
|
@squakez Yeah, cool! |
Fixes #6787
The kubelet alternates a container's waiting reason between
ErrImagePull(a pull attempt failed) andImagePullBackOff(waiting before the next attempt).arePodsFailingStatusesonly matchedImagePullBackOff. On anErrImagePullpass, the monitor fell through toupdateReadyCondition, which replaced the pull error in the Ready condition with0/1 updated replicas.Change:
arePodsFailingStatusesmatchesErrImagePullalongsideImagePullBackOff. The order of the monitor checks is unchanged, per review.Known limit:
checkReadyConditionstill runs first. Once the Deployment reportsProgressDeadlineExceeded(the deployment trait's defaultprogressDeadlineSecondsis 60), the Ready message becomesReplicaSet "…" has timed out progressing.and the pull error is no longer shown. An earlier revision of this PR checked pending Pods before the controller status to cover that case. It was dropped because changing the check order is riskier.Test:
TestMonitorImagePullFailurecovers both reasons. TheErrImagePullcase fails onmain.go test ./pkg/controller/integration/...passes, andgolangci-linton the package reports 0 issues.Claude Code on behalf of Harshil Valecha