← Back to Pull requests

fix(fault-quarantine): do not trip on a deleted node when no GPU nodes are counted #2383

Closed
unknown closed this pull request without merging on Nov 19, 2026 06:15 UTC
View on GitHub
unknown unknown commented on Nov 12, 2026 16:51 UTC
Author

Summary

The breaker kept a deleted node's cordon in its window. Replacing a quarantined node is normal remediation, so on a small or autoscaled GPU fleet the departed node's cordon tripped the breaker: right away when no GPU nodes were left, or at the next check after GPU nodes scaled back up inside the window.

Fixes #2382

  • isTrippedByRecentCordons: checks each node cordoned in the window with NodeExists, read from the node informer cache, and trips only if one is still in the cluster. That node existing with zero GPU nodes counted is what shows gpuNodeLabel does not match. It does not use the quarantine index because the annotation reaches the index only when the patched node's watch event arrives. If the lookup fails, it returns the error without tripping, the same as the standing bound.

  • ForgetDeletedNodes: when a delete takes the GPU node count to zero, the breaker drops the cordon of every node in the window that is no longer in the cluster. The node informer's GPU counter calls it, so it runs whether or not the last node was quarantined, and it sees deletes and adds in the order they happened: a replacement that joins before the last delete keeps the count above zero. While any GPU node remains, a deleted node keeps counting toward the rate bound, so remediation that replaces nodes, like REPLACE_VM, still trips it. Nodes that still exist keep their cordons for the gpuNodeLabel check.

  • Limitation: with a wrong gpuNodeLabel, the breaker trips only if a cordoned node is still in the cluster at the next check. If cordoned nodes are terminated before then, cordons are not stopped one by one. The breaker targets bursts, and a burst leaves cordoned nodes behind.

  • Tests: a deleted cordoned node stays CLOSED with zero GPU nodes and after a replacement node joins, a failed lookup returns an error, and ForgetDeletedNodes keeps only the nodes that still exist. Envtests through the reconciler: deleting the last quarantined GPU node, deleting two quarantined nodes one after the other, and deleting a healthy last GPU node after a quarantined one all leave the replacement CLOSED; deleting one of two cordoned nodes while a third GPU node remains keeps its cordon and trips at 100%. The e2e setup registers callbacks with SetupNodeInformerCallbacks, so it includes the new callback. The existing trip test now has the cordoned node present.

  • docs/circuit-breaker.md, docs/configuration/fault-quarantine.md and docs/METRICS.md describe the narrower trip, and docs/circuit-breaker.md says the cordons of deleted nodes are removed when the last GPU node is deleted.
  • Type of Change


  • 🐛 Bug fix

  • ✨ New feature

  • 💥 Breaking change

  • 📚 Documentation

  • 🔧 Refactoring

  • 🔨 Build/CI
  • Component(s) Affected


  • Health Monitor

  • Core Service

  • Fault Management

  • Janitor

  • Deployment/Config

  • API/Interface

  • Preflight

  • Plugins

  • Documentation/CI

  • New Component

  • Multiple Components

  • Other
  • Testing


  • Tests pass locally

  • Manual testing completed

  • No breaking changes (or documented)
  • $ go test -race -count=1 -run 'NoGPU|GPUNodeJoins|ForgetDeletedNodes|GPUNodesBack' -v ./pkg/breaker/
    --- PASS: TestIsTripped_NoGPUNodes_StaysClosed
    --- PASS: TestIsTripped_NoGPUNodesWithCordon_Trips
    --- PASS: TestIsTripped_NoGPUNodesAfterCordonedNodeDeleted_StaysClosed
    --- PASS: TestIsTripped_NoGPUNodesCordonedLookupFails_ReturnsError
    --- PASS: TestIsTripped_GPUNodeJoinsAfterZero_UsesNodeCount
    --- PASS: TestForgetDeletedNodes_KeepsNodesThatStillExist
    --- PASS: TestForgetDeletedNodes_NodeExistsError_KeepsWindow
    --- PASS: TestIsTripped_GPUNodesBackAfterCordonedNodeDeleted_StaysClosed
    $ go test -race -count=1 -run 'TestE2E_CircuitBreaker(Forgets|Keeps)' -v ./pkg/reconciler/
    --- PASS: TestE2E_CircuitBreakerForgetsDeletedNode
    --- PASS: TestE2E_CircuitBreakerForgetsEveryDeletedNodeWhenNoGPUNodesRemain
    --- PASS: TestE2E_CircuitBreakerForgetsDeletedNodesWhenLastGPUNodeWasNotQuarantined
    --- PASS: TestE2E_CircuitBreakerKeepsDeletedNodeCordonWhileGPUNodesRemain
    $ go test -race -count=1 ./...
    ok  	github.com/nvidia/nvsentinel/fault-quarantine/pkg/breaker	10.379s
    ok  	github.com/nvidia/nvsentinel/fault-quarantine/pkg/informer	11.740s
    ok  	github.com/nvidia/nvsentinel/fault-quarantine/pkg/reconciler	125.261s
    ...
    $ golangci-lint run --config ../.golangci.yml ./...
    0 issues.
    

    With the forget callback turned off, the three Forgets envtests fail with Should be false on the replacement's IsTripped, and the Keeps test still passes.

    Checklist


  • Self-review completed

  • Documentation updated (if needed)

  • Ready for review
  • <!-- This is an auto-generated comment: release notes by coderabbit.ai -->
    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    Bug Fixes
    When no GPU nodes are counted, a recent cordon trips the circuit breaker only if the cordoned node is still in the cluster. If checking whether a node exists fails, the breaker returns an error.
    Deleted-node cordons continue counting toward the threshold while GPU nodes remain and the cordons are within the monitoring window. When the last GPU node is deleted, cordons for deleted nodes are cleared, giving returning GPU nodes a fresh threshold budget.
    Documentation
    * Clarified how cordoned and deleted nodes affect breaker thresholds and troubleshooting.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: blacksoxx Review duration: 9443m
    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 #2383"
    general weight: 0.35
    Reviewers
    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%