fix(janitor): give GPUReset a Succeeded condition that reports the outcome #2462
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.52) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 643 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.387
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2462"
general
weight: 0.35
lalitadithya
Summary
The janitor sets
Complete=Trueon each GPUReset that ends, also when the reset failed. A fault-remediation configuration that readsCompletethus counts a failed reset as successful (#2450).Completedoes not change. It continues to mean that the controller has finished with the GPUReset.Succeededcondition when a GPUReset ends:Truewith reasonGPUResetSucceeded, orFalsewith the failure reason and message. It writes the condition in the same status update asComplete. The condition is absent while the reset is in progress.Succeededto each GPUReset that ended before this change and is not being deleted. It takes the outcome from theCompletecondition, not from the phase: the restoration after a failed reset can change the phase of a completed GPUReset. It does this at the end of the reconcile, after the restoration and the release of the node lock.COMPONENT_RESETtoGPUResetnow usecompleteConditionType: "Succeeded". The chart default does not useGPUResetand does not change.What changes in fault-remediation with
Succeeded, after a failed GPUReset:Why the outcome is a condition, and not the phase: the phase of a GPUReset that has ended is not stable. Example: a GPUReset stops the GPU services and then fails, because the reset Job is gone (
ResetJobNotFound).1. The janitor ends the GPUReset:
phase: Failed,completionTimeis set,Complete=Truewith reasonResetJobNotFound.2. The services are still stopped, so the janitor continues to restore the node labels.
3. The first restoration step writes the
ServicesRestoredcondition with reasonRestoringServices. Each condition write computes the phase again from the reason, so the phase becomesInProgress.4. When the labels are back, the phase becomes
Failedagain. If the node is deleted before that, the phase staysInProgress.A system that reads the phase sees a reset in progress for a GPUReset that has failed.
Succeeded=Falsedoes not change in these steps. The test "should record the outcome of a failed GPUReset from the Complete condition after the restoration changed its phase" shows this.Not in this PR: this PR does not make a node reboot when the reset Job wrote no result line. As discussed in #2450, the system that runs the escalation ladder (#2359) handles reset -> reboot outside the janitor. That system can read this condition to see that a reset failed.
Upgrade note: if your values set
completeConditionType: "Complete"forGPUReset, change the value toSucceeded.helm upgrade --reuse-valueskeeps the old value, and the behaviour then stays as before. UseSucceededonly with a janitor that has this change: with an earlier janitor, fault-remediation reads each GPUReset as in progress.Local checks: janitor module build, vet, golangci-lint and tests (envtest,
-race),helm lintandhelm templatewith the changed values, andgo vetof the E2E code. I did not run all ofmake lint-test-all(the protobuf, Python and shell tools are not installed here, and this change does not touch those areas) or the E2E suite.Design references:
docs/designs/020-nvsentinel-gpu-reset.md,docs/designs/070-vendor-neutral-core.md(escalation ladder).Refs #2450
Type of Change
Component(s) Affected
Testing
Checklist
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
New Features
GPU resets now report success or failure separately from whether processing has finished. The outcome is absent while a reset is in progress.
Bug Fixes
Reset configurations now use the outcome condition to distinguish successful resets from failures.
Documentation
Updated configuration guidance and status examples to explain reset outcomes, compatibility with older janitors, and upgrade considerations, including the effect of reusing existing Helm values.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->