SBR-Test: Add the Ceph RBD Block-mode storage write gate withheld test (RHWA-2039) #109
All Vouch review confidence checks passed
Residual risk 0.35 = Change Risk (0.61) × (1 − Review Confidence (0.42)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.61 · 334 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 10%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.348
Shallow Review Depth
shallow_review_depth
0.344
No Reviewer Assigned
no_reviewer_assigned
0.120
Real PR Conversation Timeline
1 comments
"Review active on #109"
general
weight: 0.35
RanWurmbrand
JIRA: RHWA-2039
Why we need this PR
Before a peer agent cordons or fences, the remediation reconciler checks
status.storageValidation.concurrentWriteableon its SBRC. The operator only sets it oncemin(2, desired)agents are Ready, which is the evidence that shared storage takes concurrent writes. Until then the reconciler must emitFencingWithheldand do nothing else. Every Block-mode spec so far only runs with that gate open, so nothing checks that a closed gate actually stops fencing.Changes made
tests/sbr-operator/tests/block_storage_write_gate.go,reportxml.ID("2039"),Ordered, Serial, labeledTierAcceptance,ComponentRemediation,DisruptionNonDestructive,PlatformAny,FrequencyNightly.Before the SBRC exists, the test starts a keepalive pod that holds
/dev/watchdogopen on every Ready worker except one. Those agents fail preflight, so only one agent becomes Ready out of at least two desired. Cordoned workers get a keepalive too, because the agent DaemonSet still runs on them. The test creates a Block-mode SBRC on Ceph RBD and asserts the DaemonSet has exactly 1 Ready and the gate is closed. It then creates aStorageBasedRemediationCR for a blocked worker and waits for aFencingWithheldWarning event naming the victim. For 90s it checks that the gate stays closed, the victim is never cordoned or tainted, the CR never reportsFencingInProgressorFencingSucceeded, and every fence slot on the device stays empty.Teardown deletes the CR before the keepalive pods. Once they go, the blocked agents start, the gate opens, and a CR that was still there would be fenced for real.
startWatchdogKeepalivePodinsbr_helpers.go. It is the keepalive pod creation that was inline indetect_only.go, moved out as is, anddetect_only.gonow calls it. No behaviour change there.SBRCBlockWriteGateTestNameandFencingWithheldReasonconstants insbrparams.docs/TESTCASES/rhwa-2039.mdand atests/sbr-operator/README.mdentry.Test plan
Non-destructive: nothing is cordoned, fenced, tainted or rebooted. While it runs, SBR agents on every worker but one can't start. Requires SNR agents to be stopped. Skips when the cluster has no Ceph RBD StorageClass, fewer than 2 schedulable workers, no schedulable worker free of an SBR controller pod, or an NHC that uses the SBR template.
make lintandmake testpass.