← Back to Pull requests

feat: add npd checks detection through KOM policies #1755

Closed
unknown closed this pull request without merging on Sep 08, 2026 09:00 UTC
View on GitHub
unknown unknown commented on Sep 07, 2026 05:38 UTC
Author

Summary


This PR covers the NPD checks detection through NVSentinel KOM policies. Kubernetes node-problem-detector (NPD) makes node-level kernel, filesystem, hardware, runtime, networking, and service problems visible to the Kubernetes control plane. Its supplied checks provide a
reference set of general node-health signals that can be assessed alongside NVSentinel's existing checks.

The decision is to watch following NPD checks through KOM policies.

  • XfsShutdown

  • CperHardwareErrorFatal

  • ReadonlyFilesystem
  • As all of these are the node conditions applied by NPD, KOM can watch these node conditions (where status = 'True') and emit unhealthy fatal event with the decided recommended action.

    Testing


    I have tested these changes in the dev cluster where NPD was already running on the nodes.

    1. Updated the cluster with new policies to detect XfsShutdown, CperHardwareErrorFatal and ReadonlyFilesystem.
    2. Updated the XfsShutdown by shutting down the temp mount on host using 'xfs_io -x -c 'shutdown -f' /mnt/disks/xfs-test2 '
    3. NPD's XfsShutdown node condition was applied

    XfsShutdown True 06 Sep 2026 12:54:05 +0530 06 Sep 2026 12:54:07 +0530 XfsHasShutdown XFS (loop1): Metadata I/O Error (0x4) detected at xfs_fs_goingdown+0x9e/0xb0 (fs/xfs/xfs_fsops.c:451). Shutting down filesystem.

    4. KOM policy 'NPDXfsShutdown' matched and KOM emitted a new fatal health event with recommended action as REPLACE_VM

    NPDXfsShutdown True 06 Sep 2026 12:54:05 +0530 06 Sep 2026 12:54:05 +0530 NPDXfsShutdownIsNotHealthy ErrorCode:NPD_XFS_SHUTDOWN v1/Node:gke-kppqrmfb-dgxc-k8-customer-gpu-a3--bbe72f35-mjh6 NPD reported an XFS filesystem shutdown Recommended Action=REPLACE_VM;

    KOM logs

    {"time":"2026-09-06T07:24:05.380707042Z","level":"INFO","msg":"Publishing health event","module":"kubernetes-object-monitor","version":"dev","event":{"version":1,"agent":"kubernetes-object-monitor","componentClass":"Node","checkName":"NPDXfsShutdown","isFatal":true,"message":"NPD reported an XFS filesystem shutdown","recommendedAction":25,"errorCode":["NPD_XFS_SHUTDOWN"],"entitiesImpacted":[{"entityType":"v1/Node","entityValue":"gke-kppqrmfb-dgxc-k8-customer-gpu-a3--bbe72f35-mjh6"}],"generatedTimestamp":{"seconds":1788679445,"nanos":380702072},"nodeName":"gke-kppqrmfb-dgxc-k8-customer-gpu-a3--bbe72f35-mjh6","processingStrategy":1}}
    {"time":"2026-09-06T07:24:05.390099981Z","level":"INFO","msg":"Successfully sent health events","module":"kubernetes-object-monitor","version":"dev","monitor":"kubernetes-object-monitor","count":1}
    


    Inserted event

    {
      _id: ObjectId('6a9d15154101afa1df29f0e1'),
      createdAt: ISODate('2026-09-06T07:24:05.389Z'),
      healthevent: {
        version: Long('1'),
        agent: 'kubernetes-object-monitor',
        componentclass: 'Node',
        checkname: 'NPDXfsShutdown',
        isfatal: true,
        ishealthy: false,
        message: 'NPD reported an XFS filesystem shutdown',
        recommendedaction: 25,
        errorcode: [
          'NPD_XFS_SHUTDOWN'
        ],
        entitiesimpacted: [
          {
            entitytype: 'v1/Node',
            entityvalue: 'gke-kppqrmfb-dgxc-k8-customer-gpu-a3--bbe72f35-mjh6'
          }
        ],
        metadata: {
          trace_id: '00000000000000000000000000000000'
        },
        generatedtimestamp: {
          seconds: Long('1788679445'),
          nanos: 380702072
        },
        nodename: 'gke-kppqrmfb-dgxc-k8-customer-gpu-a3--bbe72f35-mjh6',
        quarantineoverrides: null,
        drainoverrides: null,
        processingstrategy: 1,
        id: '',
        customrecommendedaction: ''
      },
    

    5. FQM received the unhealthy event and applied cordoning and annotations

    nvsentinel.nvidia.com/k8s-object-monitor-policy-matches:
                          {"NPDXfsShutdown/gke-kppqrmfb-dgxc-k8-customer-gpu-a3--bbe72f35-mjh6":"gke-kppqrmfb-dgxc-k8-customer-gpu-a3--bbe72f35-mjh6"}
    quarantineHealthEvent:
                          [{"version":1,"agent":"kubernetes-object-monitor","componentClass":"Node","checkName":"NPDXfsShutdown","isFatal":true,"message":"NPD repor...
    quarantineHealthEventIsCordoned: True
    
    

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

    Type of Change


  • 🐛 Bug fix

  • ✨ New feature

  • 💥 Breaking change

  • 📚 Documentation

  • 🔧 Refactoring

  • 🔨 Build/CI
  • Component(s) Affected


  • Core Services

  • Documentation/CI

  • Fault Management

  • Health Monitors

  • Janitor

  • 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

    New Features
    Added opt-in monitoring for Node Problem Detector conditions: XFS shutdowns, fatal hardware errors, and read-only filesystems.
    Added remediation policies that can request VM replacement for these fatal conditions.
    Added a Helm values overlay for enabling node readiness and NPD remediation policies.
    Updated default node-readiness monitoring to detect nodes remaining non-Ready for over two hours and recommend VM replacement without draining workloads.

    Documentation
    Added Node Problem Detector integration guidance, validation steps, and configuration references.
    Clarified opt-in NPD policies and updated documentation navigation.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: tanishagoyal2 Review duration: 1642m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.52) × (1 − Review Confidence (0.57)). 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%
    56%
    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 #1755"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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: 56.8% · Lower = rushed or shallow review
    56.8%
    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: 22.5% · Safe to merge
    22.5%