← Back to Pull requests

Respect driver upgrade policy during orphan pod migration #3164

Open
unknown opened this pull request with 368 lines diff across 4 files
View on GitHub
unknown unknown commented on Nov 03, 2026 14:07 UTC
Author

Description

During migration to an NVIDIADriver with upgradePolicy.autoUpgrade: false, node labeling requests an upgrade for orphaned driver pods while the upgrade controller removes that request. Check the owning driver's effective upgrade policy in the migration flow before setting upgrade-required, keeping driver ownership independent of upgrade eligibility.

Emit a ManualDriverPodReplacementRequired Warning event on the NVIDIADriver, with the orphaned pod as the related object and the node/pod names in the message. Enabled and defaulted policies retain automatic migration; disabled policies leave pod replacement to the administrator.

Fixes #3063. This is a separate alternative to #3082 with manual-action feedback and repeated-reconcile coverage.

Checklist

  • No secrets, sensitive information, or unrelated changes

  • Lint checks passing (make lint)

  • Generated assets unaffected (no API, CRD, RBAC, Helm, or generated-file changes)

  • Go mod artifacts unaffected (no dependency or vendor changes)

  • Test cases are added for new code paths
  • Testing

  • Regression fails on the unmodified implementation and passes with the fix.

  • make fmt, make license-check, make unit-test (23 packages, including build), and make lint pass on Linux/amd64 with Go 1.26.8. Lint reports zero issues.

  • Unit coverage includes ClusterPolicy and GPUCluster routing, disabled/enabled/defaulted policies in mixed pools, three alternating node-label/upgrade reconciles, preservation and cleanup of existing upgrade states, manual events, and resuming migration when auto-upgrade is enabled.

  • Live validation on Kubernetes 1.35 (API server v1.35.10, kubelets v1.35.9), using the normal ClusterPolicy path without DRA. A harmless pause pod with the driver component label was orphaned by deleting its DaemonSet. The actual controllers were run against the real API with deterministic manual scheduling: baseline main @ 7622af8 added/removed upgrade-required in each of three cycles; the fixed build kept the label absent and recorded the real Warning event. The orphan pod kept its UID throughout.

  • Cluster configuration and controlled node metadata were restored and verified against snapshots. GPU capacity and all 31 existing GPU operand pod UIDs were preserved; all nodes were Ready and ClusterPolicy returned to ready.
  • The live test isolates this label-policy bug. It does not exercise containerized-driver installation/replacement or controller watch delivery; the BCM host driver remained loaded.

    <!-- devin-review-badge-begin -->

    ---

    <a href="https://nvidia-cloud.devinenterprise.com/review/nvidia/gpu-operator/pull/3164" target="_blank"><picture><source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4" alt="Devin Review"></picture></a>
    <!-- devin-review-badge-end -->

    Diff: 368 lines (+276 / -92) across 4 files Reviewer: rahulait Review duration: 6496m
    All Vouch review confidence checks passed
    Residual risk 0.35 = Change Risk (0.66) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.66 · 368 lines diff across 4 files
    0.66
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    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.354
    Shallow Review Depth shallow_review_depth
    0.344
    Sensitive Paths sensitive_paths
    0.066
    Real PR Conversation Timeline
    1 comments
    "Review active on #3164"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: medium confidence: 46.7% reviewed sensitive_module
    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: 65.9% (HIGH) · Higher = larger blast radius
    65.9%
    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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 35.1% · Moderate risk
    35.1%