← Back to Pull requests

feat(fault-remediation): keep the repair within the device of a partial drain #2510

Closed
unknown closed this pull request without merging on Nov 24, 2026 14:08 UTC
View on GitHub
unknown unknown commented on Nov 23, 2026 08:25 UTC
Author

Summary

Part of #2247. This is the second part of ADR-071 (#2417): the [scope check](docs/designs/071-device-scope-from-configuration.md#scope-check) in fault-remediation (decision 3). It depends on #2477 and targets its branch, so the diff shows only this change. It should merge in the same release as #2477, because #2477 lets a custom action get a partial drain.

A partial drain evicts only the pods that use one device. If fault-remediation then runs an action on the full node, such as a reboot, or on another device, it stops pods that were not drained. Today nothing prevents this. This PR checks it at install and at run time.

Changes

  • Configuration. fault-remediation reads partialRemediationEntityTypes, which the chart renders from global.partialRemediationEntityTypes. It fails to start without the key, as node-drainer does after #2477. impactedEntityScope must name a configured entity type, instead of one in the built-in GPU list.

  • Check at install. When node-drainer and fault-remediation are deployed and partial drains are on, every action in scopedActions needs a maintenance.actions entry with the same impactedEntityScope. The chart also rejects an impactedEntityScope that is not a configured entity type.

  • Check at run time. Before fault-remediation records its decision, it compares the action with the drain that node-drainer recorded on the event (DrainDecision.scope). If the drain was partial and the action acts on the full node, on another entity type or on another device, fault-remediation creates no CR and records no decision. It logs both scopes, increments fault_remediation_processing_errors_total with error_type="drain_scope_mismatch", and retries the event with backoff. If the node was deleted, it closes the event like the other events of a deleted node, because no configuration fix can help. A full drain, and an event without a drain decision, are not checked.

  • Docs. The fault-remediation configuration has a new "Partial drains" section, and the node-drainer configuration links to it.
  • Behaviour changes

  • An install with partial drains on and a scoped action that maps to an action on the full node, such as the default COMPONENT_RESET to RebootNode, fails to upgrade. ADR-071 lists this as a consequence: that configuration reboots nodes after a partial drain today. Partial drains are off by default.

  • The run-time check compares the entity value too. Until #2507 merges, fault-remediation picks the last GPU_UUID entity of an event and node-drainer picks the first. For an event with two GPUs, the event now retries instead of resetting a GPU whose pods were not drained.
  • Testing


  • Tests pass locally

  • Manual testing completed

  • No breaking changes (or documented)
  • helm template with partial drains on and the chart default (COMPONENT_RESET mapped to RebootNode) fails with the new message. With COMPONENT_RESET mapped to a GPUReset with impactedEntityScope: GPU_UUID, it renders.

  • Every values file in the repository, the UAT values and the four Tilt value chains render with the new check.

  • The fault-remediation config rendered from the Tilt values loads and passes validation, with the GPU_UUID entry of the chart default.
  • On a local Kind cluster deployed with Tilt from commit 535cb17c, before the merge of #2477's branch and before the deleted-node change:

  • TestGPUReset passes. A COMPONENT_RESET event on a GPU UUID gets a partial drain, and fault-remediation creates a GPUReset CR for that GPU, which completes.

  • TestNodeDrainerPartialDrain passes, including the event whose GPU pods were already drained, which goes on to remediation.

  • With impactedEntityScope removed from COMPONENT_RESET in the live fault-remediation ConfigMap, the same event gets its partial drain, and fault-remediation creates no CR. The node keeps the drain-succeeded label, fault_remediation_processing_errors_total{error_type="drain_scope_mismatch"} increases with each retry, and the log names both scopes. After the ConfigMap is restored, the retry creates the GPUReset CR for the same event, scoped to the GPU UUID, and the node is uncordoned after the healthy event.
  • 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
  • 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

    New Features
    Added configurable per-device remediation scopes for supported actions, including GPU UUIDs and other configured entity types.
    Remediation now checks whether a partial drain covers an action’s target device before proceeding. Uncovered actions on existing nodes are retried without creating a remediation resource.
    Bug Fixes
    Chart installation or upgrade now reports configuration errors when scoped actions lack a matching remediation scope or reference an unconfigured entity type.
    Documentation
    * Expanded guidance on configuring device-scoped remediation and how chart validation and runtime handling work.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: KaivalyaMDabhadkar Review duration: 1782m
    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 #2510"
    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%