← Back to Pull requests

Add the Ceph RBD Block-mode preflight slot cleanup test (RHWA-2038) #108

Open
RanWurmbrand opened this pull request with 281 lines diff across 3 files
View on GitHub
RanWurmbrand RanWurmbrand commented on Nov 03, 2026 14:08 UTC
Author

JIRA: RHWA-2038

Why we need this PR

The preflight slot cleanup (RHWA-1058) has end-to-end cover only on Filesystem storage (ghost_peer.go, RHWA-1964). Block mode uses a different slot layout. Node ID 1 is heartbeat slot index 0 ((nodeID - 1) * 4096), not slot 1, and the agent clears a full 4 KB slot. So the filesystem test says nothing about whether the clear lands in the right place on a Block device. If it doesn't, every peer keeps monitoring a node that doesn't exist.

Changes made

  • New tests/sbr-operator/tests/block_storage_preflight_slot.go, reportxml.ID("2038"), labeled TierAcceptance, ComponentDaemonSet, DisruptionNonDestructive, PlatformAny, FrequencyNightly, TopologyMinimalWorker.
  • The test creates a Block-mode SBRC on Ceph RBD and waits for the init Job and the agents. It then waits until the on-device node map lists every agent with a unique ID, and skips if a real node owns node ID 1. Next it waits for heartbeat slot index 0 to read 4096 zero bytes through every agent. Finally, for one minute, it checks that the slot stays zero and the agents keep the same pods and restart counts.

    The node map read and the slot check both wait instead of reading once. An agent marks itself Ready right after preflight, before it registers in the node map and clears the slot.

    No new helpers. It reuses the ghost peer helpers from ghost_peer.go and the existing Block helpers, and the node map and stability checks are written inline.

  • docs/TESTCASES/rhwa-2038.md and a tests/sbr-operator/README.md entry.
  • Test plan

    Non-destructive: no fault injection, fencing or reboot. Requires SNR agents to be stopped and no other SBRC on the cluster. Skips when the cluster has no Ceph RBD StorageClass, fewer than 2 schedulable workers, an NHC that uses the SBR template, or a real node that owns node ID 1.

    ginkgo -v --label-filter="operator:sbr && tier:acceptance" \
        --focus="clears the unassigned preflight slot on a Block device" ./tests/sbr-operator/...
    

    make fmt, make lint and make test pass.

    Diff: 281 lines (+210 / -71) across 3 files Reviewer: None requested Review duration: 46228m
    All Vouch review confidence checks passed
    Residual risk 0.34 = Change Risk (0.59) × (1 − Review Confidence (0.42)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.59 · 281 lines diff across 3 files
    0.59
    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: 10%
    42%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.338
    No Reviewer Assigned no_reviewer_assigned
    0.120
    Real PR Conversation Timeline
    1 comments
    "Review active on #108"
    general weight: 0.35
    Reviewers
    None requested
    Assignees
    RanWurmbrand RanWurmbrand
    Labels
    risk: low confidence: 42.2% 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: 58.7% (MEDIUM) · Higher = larger blast radius
    58.7%
    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: 42.2% · Lower = rushed or shallow review
    42.2%
    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: 33.9% · Safe to merge
    33.9%