feat(fault-quarantine): add maxCordonedPercentage, the percentage form of the standing bound #1981
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
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 #1981"
general
weight: 0.35
KaivalyaMDabhadkar
Closes #1977.
maxCordonedNodesis the only bound that caps how many nodes NVSentinel holds quarantined at once,and it was available as an absolute count only. The two rate bounds beside it each offer both a
percentage and an absolute form and bind on whichever is lower.
That asymmetry forces small clusters onto a value that silently changes meaning when the fleet is
resized. On our 12 node GB200 rack
maxCordonedNodes: 3means "a quarter of the rack", and at 16trays it quietly becomes 19%. Nothing fails, warns, or drifts a render; it stays correct only while
someone remembers to revisit the values file at resize time.
What this adds
Both default to
0, so the standing bound stays opt-in and the upgrade is a no-op for everyexisting deployment.
Semantics
As agreed on the issue, recorded here for posterity:
percentageuses.Making the denominator "what NVSentinel has taken" would be circular, since that is already the
numerator. Keeping it the fleet makes the bound a predictable limit on NVSentinel's own actions,
unaffected by how many nodes an operator has cordoned for maintenance.
separate operator alert over all unschedulable nodes, so NVSentinel's safety limit does not depend
on unrelated operator activity.
percentage/maxNodes.The one subtle part: the standing pair is deliberately not clamped to fleet size
tripThresholdclamps a too-large threshold down to the fleet size, so a misconfiguration degradesto "every node" rather than "never trip". I did not extend that clamp to the standing pair, and
an existing test caught the attempt.
The reason is that the two counters are not drawn from the same population.
NodeInformer.GetNodeCountsbuilds the quarantined set from an index over every watched node,while
totalNodescounts only GPU-labelled ones, and its doc comment says that is deliberate so aquarantined node whose GPU label is temporarily absent stays recoverable. The quarantined count can
therefore legitimately exceed the GPU total, and clamping the standing threshold to it would trip
the breaker spuriously. The window counter has no such problem, because it only ever counts cordon
events this breaker recorded for GPU nodes.
This preserves the behaviour already documented for
maxCordonedNodes("is compared directlyagainst the current count ... and is not clamped, so it never reports
fleetSize"). The percentageform still caps the scaled value above 100%, because there the unsafe part is the float-to-int
conversion rather than reachability.
Implementation
The resolution shared by both pairs is factored into
resolveThreshold, so the rate pair and thestanding pair cannot drift apart.
tripThreshold's behaviour is unchanged; it now applies itsfleet-size clamp after that shared call.
standingBoundReachedtakes the resolved threshold andskips the API lookup entirely when neither standing bound is configured, so deployments that do not
use it make no extra call.
validateBoundsrejects a negative, NaN or infinitemaxCordonedPercentagethe same way it alreadyrejects those for
percentage, via an extractedvalidatePercentageBoundhelper (which also keepscyclopsatisfied).Testing
TestStandingThreshold_ConfiguredBounds_ReturnsEffectiveThreshold: 10 cases covering percentageonly, absolute only, lower-binds in both directions, round-up on small fleets, the both-zero
default staying disabled, the not clamped case, and an overflow-sized percentage.
TestValidateBounds_StandingPercentage: accepted alone, and negative / NaN / Inf rejected.TestIsTripped_StandingPercentageReached_Tripsand the not-reached counterpart, end to endthrough
IsTripped.text were updated because that message now names the new field.
golangci-lint: 0 issues. Fullfault-quarantinesuite green.maxCordonedPercentage = 0by default and the configured value whenset, and that the rendered TOML decodes into the new field.
Docs and both values files updated.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
New Features
Added a configurable percentage limit for the share of the GPU fleet that can be quarantined at once. Set the limit to zero to disable it.
When both percentage and node-count limits are configured, the stricter limit applies.
Documentation
Updated configuration guidance to explain the new limit, how it interacts with existing limits, and how percentage-based thresholds are calculated.
Clarified which limits are capped by fleet size.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->