← Back to Pull requests

feat(fault-quarantine): add maxCordonedPercentage, the percentage form of the standing bound #1981

Closed
unknown closed this pull request without merging on Oct 06, 2026 17:00 UTC
View on GitHub
unknown unknown commented on Oct 06, 2026 14:53 UTC
Author

Closes #1977.

maxCordonedNodes is 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: 3 means "a quarter of the rack", and at 16
trays 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

circuitBreaker:
  maxCordonedNodes: 0       # existing, absolute
  maxCordonedPercentage: 0  # new, share of the GPU node population

Both default to 0, so the standing bound stays opt-in and the upgrade is a no-op for every
existing deployment.

Semantics

As agreed on the issue, recorded here for posterity:

  • Denominator: the GPU-labelled fleet, the same population percentage uses.

  • Numerator: NVSentinel's own cordons only, still sourced from the quarantine annotation index.

  • 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.
  • Consequently the bound is not a cap on total out-of-service capacity. That belongs in a

  • separate operator alert over all unschedulable nodes, so NVSentinel's safety limit does not depend
    on unrelated operator activity.
  • When both standing bounds are set the lower one binds, matching percentage / maxNodes.
  • The one subtle part: the standing pair is deliberately not clamped to fleet size

    tripThreshold clamps a too-large threshold down to the fleet size, so a misconfiguration degrades
    to "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.GetNodeCounts builds the quarantined set from an index over every watched node,
    while totalNodes counts only GPU-labelled ones, and its doc comment says that is deliberate so a
    quarantined 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 directly
    against the current count ... and is not clamped, so it never reports fleetSize"). The percentage
    form 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 the
    standing pair cannot drift apart. tripThreshold's behaviour is unchanged; it now applies its
    fleet-size clamp after that shared call. standingBoundReached takes the resolved threshold and
    skips the API lookup entirely when neither standing bound is configured, so deployments that do not
    use it make no extra call.

    validateBounds rejects a negative, NaN or infinite maxCordonedPercentage the same way it already
    rejects those for percentage, via an extracted validatePercentageBound helper (which also keeps
    cyclop satisfied).

    Testing

  • TestStandingThreshold_ConfiguredBounds_ReturnsEffectiveThreshold: 10 cases covering percentage

  • only, 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_Trips and the not-reached counterpart, end to end

  • through IsTripped.
  • Existing suite unchanged and passing; the two assertions that pin the "at least one bound" error

  • text were updated because that message now names the new field.
  • golangci-lint: 0 issues. Full fault-quarantine suite green.

  • Verified the chart renders maxCordonedPercentage = 0 by default and the configured value when

  • set, 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 -->

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: KaivalyaMDabhadkar Review duration: 126m
    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
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 20.5% · Safe to merge
    20.5%