feat: surface generated workload failures in ModelBooster/ModelServing status - #1504
Open
vanshika2720 wants to merge 1 commit into
Open
Conversation
…g status ModelServing's Progressing/UpdateInProgress conditions only ever carried a generic "some groups are progressing" message, whether a ServingGroup was still starting up normally or permanently stuck (bad image, crash-looping container, unschedulable Pod). Pod-level failure signals were read only coarsely (Phase==Failed or restart count>0) to drive the existing delete-and-recreate recovery loop, and the diagnostic detail was discarded rather than surfaced anywhere in status. Extract actionable failure detail from live Pod status (scheduler PodScheduled condition, container/init-container Waiting/Terminated reasons) using only structured, stable fields kubelet/the scheduler themselves populate, never Kubernetes Event text. Record it per-Role in the model-serving-controller's in-memory store, clearing it once the Role's Pod is ready again so recovered failures don't linger. When a ServingGroup is progressing because of a recorded failure, replace the condition's generic Reason with the specific one and append the detail to Message; reuse the existing Progressing/UpdateInProgress condition types rather than adding a new one. ModelBooster's Active condition already toggles False while its generated ModelServing isn't Available, but the message was always the static "ModelBooster not ready yet". When the blocking ModelServing condition's Reason is one of these new actionable ones (not the generic startup/rollout reasons), propagate it onto ModelBooster's Active condition too, so the failure is visible without inspecting the ModelServing separately. This also fixes SetCondition silently skipping Reason/Message-only updates when a condition's Status doesn't change, which would otherwise have kept the enriched message from ever reaching the API for an already-True Progressing condition. Signed-off-by: Vanshika <pahalvanshikaa@gmail.com>
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Contributor
Author
Member
|
Can you show the status of model serving in your cluster? |
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 type of PR is this?
/kind enhancement
What this PR does / why we need it:
ModelServing's
Progressing/UpdateInProgressconditions previously exposed only generic progress messages even when a generated Pod was stuck due to a concrete failure such as image pull failure, container crash, or scheduling failure.This PR surfaces actionable generated Pod failure information through the existing ModelServing and ModelBooster status conditions.
The change:
PodScheduledcondition;Waitingreasons;Terminatedreasons and exit codes.ProgressingandUpdateInProgressconditions instead of introducing new condition types.Activecondition when the generated ModelServing is not available.This makes failures such as unschedulable Pods, image-pull failures, init-container failures, and runtime crashes visible directly from the parent resource status instead of requiring users to inspect generated Pods manually.
Which issue(s) this PR fixes:
Fixes #1503
Bug evidence (required for bug-related PRs):
The issue is observed along the generated workload production path:
ModelBooster → ModelServing → generated Pod → Pod scheduling/container statusGenerated Pods can fail or remain unavailable while the parent ModelServing continues to report only generic
Progressing/UpdateInProgressinformation. Previously, Pod failure information was used only for the existing recovery flow and the actionable reason was not propagated to the parent status.Examples of failure information that can be surfaced include:
The implementation reads the structured Pod status populated by the Kubernetes scheduler/kubelet and propagates the failure through:
Pod → Role failure state → ModelServing condition → ModelBooster Active conditionThe failure is cleared when the affected Pod recovers, preventing stale status from remaining after recovery.
Tests cover scheduling failure, image-pull failure, init-container failure, runtime/container failure, recovery and stale-failure clearing, multiple failure cases, and end-to-end status propagation.
Special notes for your reviewer:
ModelServingcondition types are reused; no new API condition type was introduced.ModelServingStatusandModelBoosterStatusAPI structs are unchanged.Validation performed:
go build ./...— passedgo vet ./...— passedgofmt— cleango test ./...— unit/controller packages passed; E2E tests require a live Kubernetes clusterDoes this PR introduce a user-facing change?:
Yes. Parent ModelBooster and ModelServing status conditions now expose actionable generated workload failure information.