← Back to Pull requests

nmo-operator: add nmo-snr conflict test #129

Closed
unknown closed this pull request without merging on Nov 12, 2026 20:18 UTC
View on GitHub
unknown unknown commented on Nov 09, 2026 16:57 UTC
Author

Port of OCP-69928 test_nmo_snr_conflict from ocp-edge-auto to the NMO suite (RHWA-1252, PR D of 4).

What it verifies

A node under NMO maintenance cannot be remediated by SNR:

  • NMO labels the node remediation.medik8s.io/exclude-from-remediation=true

  • SNR's agent DaemonSet (self-node-remediation-ds) excludes labelled nodes through a required node affinity, so the agent pod leaves the node

  • No SNR agent pod runs on the node for the whole maintenance window

  • Once maintenance ends the label is removed and an agent pod returns to the node
  • Test case: OCP-69928

    Spec flow

    1. BeforeAll: NMO deployment Ready; skip when SNR is not installed (SelfNodeRemediationConfig CRD absent); SNR agent DaemonSet deployed; at least 2 schedulable non-control-plane workers (skip otherwise)
    2. Baseline: an SNR agent pod is Running with all containers ready on the target worker
    3. Create the NodeMaintenance CR; verify Succeeded phase, cordon, drain taint, drain completed
    4. Wait until no SNR agent pod is bound to the node
    5. Verify the node carries remediation.medik8s.io/exclude-from-remediation=true
    6. Consistently: no SNR agent pod on the node for the whole window
    7. Delete the NodeMaintenance CR; verify the node is uncordoned, untainted and the label is removed
    8. Verify an SNR agent pod is Running with all containers ready on the node again

    Notes

  • Python-faithful port: the Polarion plan's steps that create a SelfNodeRemediation CR and watch SNR decline to remediate it are intentionally not ported, matching the Python implementation

  • The spec requires both NMO and SNR and skips on clusters where SNR is not installed; the e2e-nmo-aws CI job installs only NMO, so the spec skips there

  • Verified on a live cluster (NMO v5.7.1 + SNR v0.13.1, GA catalog): spec passed end-to-end, twice (before and after review fixes), with node recovery confirmed after each run
  • Jira: RHWA-1252

    Diff: 261 lines (+195 / -66) across 3 files Reviewer: weshayutin Review duration: 4520m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 261 lines diff across 3 files
    0.39
    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.333
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #129"
    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: 39.2% (MEDIUM) · Higher = larger blast radius
    39.2%
    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: 15.5% · Safe to merge
    15.5%