← Back to Pull requests

feat(nvsentinel): add opt-in new-node validation mixin #3464

Closed
unknown closed this pull request without merging on Oct 29, 2026 22:08 UTC
View on GitHub
unknown unknown commented on Oct 28, 2026 06:37 UTC
Author

Summary

Adds an opt-in nvsentinel-node-validation mixin that turns on NVSentinel's lifecycle-manager, so a new GPU node that joins cordoned runs a DCGM level-2 diagnostic and is uncordoned only when it passes. A new bundle gate, CheckNVSentinelNodeValidationCoherent, rejects configurations lifecycle-manager would refuse at startup or could not run.

Motivation / Context

A GPU node that joins, including hardware returned from repair, takes work before anything proves it healthy. This validates each new GPU node once, before it takes work.

Fixes: #3088
Related: #2623

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

  • New feature (non-breaking change that adds functionality)

  • Breaking change (fix or feature that would cause existing functionality to change)

  • Documentation update

  • Refactoring (no functional changes)

  • Build/CI/tooling
  • Component(s) Affected

  • CLI (cmd/aicr, pkg/cli)

  • API server (cmd/aicrd, pkg/server)

  • Recipe engine / data (pkg/recipe)

  • Bundler and deployers (pkg/bundler, pkg/component)

  • Collectors / snapshotter (pkg/collector, pkg/snapshotter)

  • Validator (pkg/validator)

  • Core libraries (pkg/errors, pkg/k8s)

  • Docs/examples (docs/, examples/)

  • Other: health check, KWOK lane, Kind e2e lane, mirror e2e, weekly image scan
  • Implementation Notes

  • The mixin is the sole owner of lifecycle-manager. It sets global.lifecycleManager.enabled and the lifecycle-manager.* paths it needs, sets no path a remediation step sets, and needs no datastore, so it composes alone or beside any step. No shipped recipe composes it.

  • lifecycle-manager never cordons a node. It validates a node that is cordoned, labeled nvidia.com/gpu.present=true, and created less than 30 minutes ago. The mixin pins the chart's cordoned criterion, and the gate rejects criteria without it, so a schedulable node is never selected. No managed platform can register a node cordoned (kubelet --register-schedulable was removed in Kubernetes 1.34), so the docs make a scheduling barrier from registration plus a cordon step an operator prerequisite, with per-platform setup.

  • The gate (registered at severity: warning; blocking findings are returned as errors) rejects malformed newNodeValidation, test lists and test definitions (including nulls, which Helm treats as deleting the chart's defaults), a missing cordoned criterion, dcgm-diag-test with the chart's command when no GPU Operator DCGM hostengine runs in gpu-operator, and a renamed Deployment. It warns when global.dryRun is true, since lifecycle-manager ignores dry run, and when the bundle deploys no cert-manager. It rejects --dynamic on the paths it checks.

  • The MaintenanceRequest controller is kept off. Post-remediation validation (#3089) is not part of this change; nvsentinel-remediation is unchanged.

  • The KWOK script now skips cert-manager's webhook for lifecycle-manager's namespace, as it already did for the datastore's.
  • Testing

    make qualify
    go test -race ./pkg/bundler/validations/... ./pkg/recipe/... ./pkg/chainsaw/...
    go test ./pkg/bundler/validations/ -run NodeValidation -count=1   # chart render
    make nvsentinel-node-validation-e2e
    make nvsentinel-remediation-e2e
    

  • make qualify passes.

  • TestCheckNVSentinelNodeValidationCoherent: table-driven cases for every gate rule. TestMixinNVSentinelNodeValidation_Composes (alone, beside remediation + analyzer, and with the log collector; no collision), TestNoShippedRecipeAdoptsNodeValidation, and TestNVSentinelNodeValidationChartRender (weekly render check), which pins the lifecycle-manager image, the cordoned criterion, newNodeTests and the DCGM address against the v1.28.0 chart.

  • Kind e2e: 15/15. Gate refusals, the dry-run warning, a cordoned new node held while tested and uncordoned on pass, held on failure, and released by deleting the failed request (stub tests in place of the DCGM diagnostic).

  • KWOK: the mixin alone, with observe, with remediation + analyzer, and with remediation + analyzer + log collector all deploy and pass the health check.

  • Simulated-GPU cluster (nvml-mock): the request waits until GPUs are advertised; pass, failure, same-test retest and delete-to-release behave as documented; a node cordoned after its window is ignored; the control plane is never targeted.

  • Regression: make nvsentinel-remediation-e2e 7/7.
  • Coverage:

  • pkg/bundler/validations: 95.0% → 95.2% (+0.2%)

  • pkg/recipe: 91.1% → 91.1% (0.0%)

  • pkg/chainsaw: 82.0% → 82.0% (0.0%)
  • Risk Assessment

  • Low — Isolated change, well-tested, easy to revert

  • Medium — Touches multiple components or has broader impact

  • High — Breaking change, affects critical paths, or complex rollout
  • Opt-in only: recipes that do not compose the mixin render no new objects. The DCGM level-2 diagnostic has not been run on real GPUs; on simulated GPUs it fails at level 2 with either DCGM client version. Validation with a real cloud node pool and operator cordon automation has not been exercised.

    Rollout notes: Compose nvsentinel-node-validation on a leaf overlay. New GPU nodes are validated only behind an operator-provided scheduling barrier from registration plus a cordon within 10 minutes of node creation (see docs/user/component-catalog.md#node-validation). To stop, delete remaining ValidationRequests while lifecycle-manager runs, then remove the mixin.

    Checklist

  • Tests pass locally (make test with -race)

  • Linter passes (make lint)

  • I did not skip/disable tests to make CI green

  • I added/updated tests for new functionality

  • I updated docs if user-facing behavior changed

  • Changes follow existing patterns in the codebase

  • Commits are signed off and cryptographically signed (git commit -s -S) — GPG signing info
  • Diff: 650 lines (+487 / -163) across 8 files Reviewer: yuanchen8911 Review duration: 2370m
    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 #3464"
    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%
    Repository