← Back to Pull requests

feat: labeler support gpuCluster DRA mode #1877

Closed
unknown closed this pull request without merging on Sep 22, 2026 04:37 UTC
View on GitHub
unknown unknown commented on Sep 18, 2026 10:15 UTC
Author

Problem Summary


Issue: https://github.com/NVIDIA/NVSentinel/issues/1860
GPU Operator 26.7's GPUCluster (DRA) mode does not deploy GPU Feature Discovery, so the labeler's gpu class, which reads nvidia.com/gpu.count, fails on every node in that mode. The gpu.count.current and gpu.count.expected labels are never written or freeze at their last value, and GPU-loss detection goes blind. In that mode the GPU inventory is published instead as resource.k8s.io/v1 ResourceSlices from driver gpu.nvidia.com.

Decision

Ship two enabled GPU classes writing the same label pair, gpu (GFD label) and gpu-dra (ResourceSlices), so one default configuration serves both operator modes with no per-cluster values. Exactly one succeeds per node:

1. New resourceSliceDriver class setting filters slices to one DRA driver and treats a node with none from that driver as a missing source, so gpu-dra is skipped on ClusterPolicy nodes even when another DRA driver publishes slices.
2. ResourceSlice pools are normalised before evaluation: only the highest spec.pool.generation counts, and the class is skipped until all resourceSliceCount slices of that generation are visible (no double or short counting during driver republish).
3. The resource.k8s.io/v1 informer is created only if the API server serves resourceslices, so Kubernetes 1.33 clusters keep working.

Testing


Step | GPU Operator state | Result
-- | -- | --
1 | GPUCluster (DRA) mode, operator 26.7.0 | gpu-dra wrote 8/8 on all GPU nodes from gpu.nvidia.com slices (8 type=gpu devices each). gpu skipped with evaluation_error. gpu-dra never skipped on a GPU node. A node that had no count labels before gained 8/8.
2 | Switched to ClusterPolicy, operands at 26.3.3 | ClusterPolicy operands, nvidia RuntimeClass and GFD labels returned. gpu wrote 8/8 from nvidia.com/gpu.count; gpu-dra skipped with missing_source.
3 | ClusterPolicy operands upgraded to 26.7.0 (driver 595.91.07, GFD v0.20.0, DCGM 4.6.0) | Driver upgrade rolled through both reachable nodes. Count labels held their last value while operands were down and no false GPU-loss signal was produced. GFD v0.20.0 still writes nvidia.com/gpu.count; gpu wrote 8/8, gpu-dra skipped.
4 | Switched back to GPUCluster (DRA) mode | NFD removed GFD labels on ClusterPolicy deletion, so no stale source remained. gpu-dra resumed writing the moment slices appeared; gpu skipped.

<!-- Brief description of your changes -->

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)
  • Checklist


  • Self-review completed

  • Documentation updated (if needed)

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

    Summary by CodeRabbit

    Summary by CodeRabbit

    New Features
    Added GPU device-count discovery from Kubernetes ResourceSlices produced by the NVIDIA GPU driver.
    Added filtering by driver and GPU device type, with grouping by instance type.
    GPU count labels can use ResourceSlice data alongside existing sources.

    Bug Fixes
    ResourceSlice counting now uses only the latest complete pool generation.
    Incomplete or unavailable data is skipped without publishing partial counts.
    Processing is skipped when the required Kubernetes API is unavailable.

    Documentation
    Expanded guidance for ResourceSlice configuration, completeness requirements, and generation handling.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 496 lines (+372 / -124) across 6 files Reviewer: tanishagoyal2 Review duration: 5421m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.47) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.47 · 496 lines diff across 6 files
    0.47
    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.371
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #1877"
    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: 47.5% (MEDIUM) · Higher = larger blast radius
    47.5%
    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: 18.8% · Safe to merge
    18.8%