fix(fault-quarantine): allow post-remediation validation after a full drain of a COMPONENT_RESET event #1960
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 · 650 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.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1960"
general
weight: 0.35
HarshavardhanK
Summary
Post-remediation validation can never run for a quarantine session whose fatal event recommends
COMPONENT_RESET. This happens even whennode-drainer.partialDrainEnabledisfalse(the default) and node-drainer has evicted every pod on the node. fault-quarantine logsSkipping validation: no contributing event completed its drain, and the node goes back into service without the configured tests.This PR tells fault-quarantine whether partial drain is enabled, so those installations get validation.
Root cause
fault-quarantine/pkg/validation/validation.go:257(FetchValidationTestsFromQuarantineSession) callsdrain.PartialDrainEntity(commons/pkg/drain/drain.go:136) returns the GPU_UUID entity for anyCOMPONENT_RESETevent, sodoesDrainCoverPartialEntitynever counts that event's completed drain as a full drain. node-drainer applies the partial scope only when partial drain is enabled (shouldExecutePartialDrain,node-drainer/pkg/evaluator/evaluator.go:686). fault-quarantine never sees that setting.A common way to hit this is mapping
COMPONENT_RESETto a reboot in fault-remediation, for example on hardware where a single-GPU reset is not supported. That is the configuration the node-drainer docs require partial drain to be off for.Fix
fault-quarantine.validation.partialDrainEnabledsetting,falseby default, the same asnode-drainer.partialDrainEnabled. Whenfalse, a completed drain of aCOMPONENT_RESETevent counts as a full drain. Whentrue, it never does, which is the behaviour before this PR.drain.PartialDrainEntityanddrain.IsNodeDrainedtakepartialDrainEnabled, so node-drainer and fault-quarantine share one check.NodeDrainEvaluator.shouldExecutePartialDrainis removed.global.partialDrainEnabledin the umbrella chart, which sets both node-drainer and fault-quarantine from one value. It is unset by default, and anullvalue counts as unset.values-tilt.yamlandvalues-aicr-uat.yamlenable partial drain in node-drainer, so they set the fault-quarantine value totruetoo.Precedence:
| Values set | node-drainer
partialDrainEnabled| fault-quarantinevalidation.partialDrainEnabled||---|---|---|
| nothing (defaults) |
false|false||
global.partialDrainEnabled=true|true|true|| both subchart values
true|true|true|| global
false+ both subchart valuestrue|false(global wins) |false(global wins) ||
global.partialDrainEnabled=null|false|false|| only
node-drainer.partialDrainEnabled=true|true|false(mismatch, set both or use the global) |Compatibility
This changes the default for installations with validation enabled: a completed drain of a
COMPONENT_RESETevent now counts as a full drain. The default validation ruleset does not matchCOMPONENT_RESETevents, so a ValidationRequest is only created where a custom ruleset matches them.Installations that enable partial drain in node-drainer must also set
fault-quarantine.validation.partialDrainEnabled: true, or setglobal.partialDrainEnabled: true. Otherwise a partial drain can count as a full drain.fault-quarantine judges each event by the setting's current value. If partial drain is turned off while an event's partial drain is in flight, that event can count as a full drain. Change both components together (the global does this).
A fuller fix would persist the actual drain scope on the health event status, which would remove the need to configure both components. That is a schema change, so I left it out of this PR.
Testing
TestE2E_ValidationRequestCreatedWhenComponentResetEventFullyDrained: a fatalCOMPONENT_RESETevent with aGPU_UUIDentity, drainSucceeded, and the setting left at its default. A ValidationRequest is created and the node stays cordoned pending validation. With the old gate this test fails:TestE2E_ValidationRequestSkippedWhenDrainIsPartialsetsvalidation.partialDrainEnabled=trueand still skips validation.go test ./...passes infault-quarantine, andgo test ./pkg/evaluator/...passes innode-drainer.helm template(fault-quarantine and node-drainer enabled, validation enabled).values-tilt.yamlrenderstruefor both components.golangci-lintlocally because of a toolchain mismatch, so CI is the lint check.Type of Change
Component(s) Affected
Checklist
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
New Features
Added a validation setting to control how
COMPONENT_RESETevents are treated when determining whether a node completed a full drain. It defaults tofalse; enabling it applies partial-drain handling.A global setting can override the component-level options, keeping node draining and validation aligned.
Documentation
* Clarified that validation requests require a quarantine-session event that completes a full drain and matches a validation ruleset. Documented setting defaults and the need to coordinate changes with open quarantine sessions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->