← Back to Pull requests

docs: ADR-051 MaintenanceRequest (MR) — entry door for signaling incoming node maintenance #1577

Closed
unknown closed this pull request without merging on Sep 01, 2026 15:35 UTC
View on GitHub
unknown unknown commented on Aug 07, 2026 19:51 UTC
Author

Summary

Adds ADR-051, the design for the MaintenanceRequest (MR) CRD — the inbound counterpart to ExternalRemediationRequest (ADR-040). A requester (an external system or operator) creates an MR to tell NVSentinel that maintenance is incoming for a node, so NVSentinel prepares the node (cordon, drain) before the work begins instead of the requester bypassing the pipeline.

Key design points

  • Emit as authored. On create, the reconciler emits spec.healthEvent unchanged — the requester picks recommendedAction, and the pipeline routes it to the matching remediation (RESTART_VM → RebootNode, CUSTOM/external-remediation → ERR). The MR carries a startTime recording when the maintenance window opens. The MR name and UID are stamped into event metadata for traceability only; nothing consumes them.

  • Deletion is the clear, and the requester owns it. The MR persists until the requester deletes it. NVSentinel does not track the maintenance to completion — the reconciler does not watch the remediation it triggered, and there is no automatic cleanup. Deleting the MR runs its finalizer, which emits a matching isHealthy=true event to retract the fault and un-cordon the node. Auto-deletion on remediation completion is deliberately deferred.

  • Lives in lifecycle-manager. The reconciler and webhook are added to the existing component (#1610, introduced with the validation-controller), reusing its manager, leader election, webhook server, config, chart, and RBAC scaffolding. MR adds the one capability it lacks: a healthpub emitter plus a hostPath mount of the platform-connector socket, which is that component's first node-local socket dependency.

  • CRD follows janitor's ExtRR pattern — proto as the source of truth, protoc-gen-crd for the CRD YAML, and a Go wrapper with protojson marshalling, because spec.healthEvent embeds the proto-generated HealthEvent. This means API version v1 and group nvsentinel.dgxc.nvidia.com, so lifecycle-manager serves that group alongside nvsentinel.nvidia.com for ValidationRequest.

  • Simple lifecycle. Present = maintenance active, absent = cleared. A single HealthEventEmitted condition, no completionTime, and no owner-references, GC coupling, or cross-CRD watches.

  • Webhook rejects an isHealthy=true opening event, requires startTime to be in the future, freezes spec.healthEvent after creation, and best-effort-rejects a duplicate MR for a node.
  • Main tradeoff to push on

    A forgotten MR leaves a node cordoned indefinitely. Nothing reclaims it, so MRs become an operational surface that needs monitoring. This is the accepted cost of dropping automatic cleanup in the first iteration.

    Alternatives considered

    The most substantial is a kubernetes-object-monitor policy instead of a controller — KOM already implements MR's exact open/close model generically, so it would need no new reconciler. It was rejected because every field in KOM's HealthEventSpec is a static TOML literal: each new fault type would need its own policy and a release, and no single request could carry per-request detail. The ADR records the full comparison, along with the deferred auto-completion design and three other rejected shapes.

    Dependencies

  • ADR-040 (ExternalRemediationRequest) — shipped.

  • A fault-quarantine ruleset matching MR-emitted events is the only hard prerequisite, and must land with MR or before it.

  • The external-remediation action that renders an ERR is needed only for the CUSTOM case.

  • fault-remediation should be idempotent on re-publish, since the MR re-emits its opening event on retry.
  • 🤖 Generated with Claude Code

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    Summary by CodeRabbit

  • New Features

  • - Added a new MaintenanceRequest API for scheduling maintenance windows with associated health events.
    - Maintenance requests now track lifecycle conditions and automatically emit healthy clearing events when maintenance ends.
    - Added validation, permissions, deployment integration, and testing guidance for the new API.

  • Documentation

  • - Added a detailed architecture decision record describing the maintenance request lifecycle, behavior, and operational considerations.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 552 lines (+414 / -138) across 6 files Reviewer: natherz97 Review duration: 35743m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.48 · 552 lines diff across 6 files
    0.48
    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.378
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #1577"
    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: 48.1% (MEDIUM) · Higher = larger blast radius
    48.1%
    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: 19% · Safe to merge
    19%