testops: close smartwal corruption gate

This commit is contained in:
pingqiu committed 2026-06-01 08:33:56 -07:00
1 parent b0b4cc51d7
commit 30ab61d3c3
10 files changed
+501 -25

No files matched your search

@@ -26,6 +26,10 @@ spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
serviceAccountName: {{ include "seaweed-block.fullname" . }}-master
{{- with .Values.blockmaster.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.blockmaster.stateHostPath }}
initContainers:
- name: state-permissions
@@ -30,8 +30,12 @@
"blockmaster": {
"type": "object",
"properties": {
"durableImpl": { "type": "string", "enum": ["walstore", "smartwal"] },
"stateHostPath": { "type": "string" },
"nodeSelector": {
"type": "object",
"additionalProperties": { "type": "string" }
},
"durableImpl": { "type": "string", "enum": ["walstore", "smartwal"] },
"stateHostPath": { "type": "string" },
"stateHostPathType": { "type": "string" },
"statePermissionsImage": {
"type": "object",
@@ -28,6 +28,7 @@ appNamespace: default
blockmaster:
replicas: 1
nodeSelector: {}
serviceName: blockmaster
listenPort: 9333
authorityStore: /var/lib/sw-block/authority
+18 -10
View File
@@ -1,6 +1,6 @@
# Current Plan: Phase 34 - Test Realism And Dirty-Failure Hardening
Status: active, 85% complete. Started on 2026-05-29.
Status: active, 95% complete. Started on 2026-05-29.
Branch: `phase33-testops-failure-hardening`
@@ -103,7 +103,7 @@ cleanup_status=ok
Goal: prove a real SmartWAL corruption is detected through the product surface
and never becomes false Ready=True.
Status: active; product fix chain landed, strict QA rerun pending.
Status: PASS on 2026-06-01.
Current code chain:
@@ -121,12 +121,13 @@ Artifacts:
- `internal/docs/qa-assignments/phase34-d4-smartwal-corrupt-finding.md`
- `internal/docs/qa-assignments/phase34-d4-smartwal-corrupt-verify.md`
- `internal/docs/qa-assignments/phase34-d4-smartwal-corrupt-verify2.md`
- `internal/docs/qa-assignments/phase34-d4-smartwal-corrupt-verify3-PASS.md`
Required QA rerun:
Passing QA rerun:
```text
testops/scenarios/helm-smartwal-corrupt-restart-chain.yaml
source commit: 7fa34a7 or newer on phase33-testops-failure-hardening
run 20260601-020747-5a1f, 30/30 PASS
```
Acceptance:
@@ -150,6 +151,12 @@ Status: planned after D4.
Candidates:
- Surface the specific `wal_integrity_fault` reason through status evidence so
cold operators do not need blockvolume logs to understand why a corrupted
volume is Unknown.
- Preserve deterministic scheduling in future single-node dirty-failure gates:
the D4 SmartWAL scenario now pins blockmaster to the scenario's `single_node`
so stale local images on other lab nodes cannot affect the run.
- Cross-check selected helper summary counts against independent Kubernetes or
product evidence.
- Add timeline noise sanity for repeated identical `placement_verified` events.
@@ -202,15 +209,16 @@ finished plan moved under internal/docs/finished-plans/
- 83%: master projection now requires positive primary readiness evidence.
- 85%: ManagedVolume projection regression test added; strict D4 QA rerun is
pending.
- 92%: D4 strict rerun `20260601-020747-5a1f` passed 30/30. SmartWAL
corruption now projects `Ready=Unknown` instead of false `Ready=True`.
- 95%: D4 scenario non-determinism fixed by pinning blockmaster to the
scenario's `single_node`; D6 close report remains.
## Next Step
Ask QA to rerun:
Write the Phase 34 D6 close report and release wording. The D4 product gate is
closed, with one product follow-up:
```text
testops/scenarios/helm-smartwal-corrupt-restart-chain.yaml
surface reason=wal_integrity_fault instead of generic unknown
```
against commit `7fa34a7` or newer. If it passes, write the Phase 34 D4 sign-off
and close D6. If it still reports Ready=True, treat the new evidence as the next
control-plane/status-surface blocker, not as a test flake.
@@ -196,12 +196,13 @@ Current state:
- Phase 33 failure hardening is closed.
- Phase 34 is active under `internal/docs/current-plan.md`.
- D2 live status-endpoint-unreachable and D3 restart convergence are validated.
- D4 SmartWAL corruption is the current release-relevant gate. It found a real
false Ready risk and has driven fixes through storage, blockvolume readiness,
master projection, and ManagedVolume projection tests.
- QA still needs to rerun
`testops/scenarios/helm-smartwal-corrupt-restart-chain.yaml` against
`7fa34a7` or newer.
- D4 SmartWAL corruption is validated for the core release-relevant contract:
after real WAL corruption, the product no longer reports false `Ready=True`.
The run `20260601-020747-5a1f` passed 30/30 after fixes through storage,
blockvolume readiness, master projection, and ManagedVolume projection tests.
- The remaining Phase 34 work is closeout and release wording. A product
follow-up remains to surface the specific `wal_integrity_fault` reason rather
than generic `unknown`.
After Phase 34 closes, the next product decision is whether to cut the next
alpha hardening release or start the next larger loop: productized operator
@@ -43,8 +43,8 @@ This is the short internal roadmap. Keep it current and readable.
Upgrade selected replay or summary-grep checks into independent live/dirty
evidence: live status endpoint unreachable, restart convergence, SmartWAL
corruption refusal, and targeted cross-validation between helper summaries
and product or Kubernetes facts. The current blocking gate is D4 SmartWAL
corruption: after corruption, no status surface may claim `Ready=True`.
and product or Kubernetes facts. D4 SmartWAL corruption now passes the core
no-false-Ready contract; D6 close and release wording are next.
- `v0.4-beta-candidate`: Operator lifecycle. Add a Kubernetes-native control
plane with CRDs/Conditions/Events for install, node eligibility, volume
lifecycle, recovery observation, safe cleanup, and eventually gated repair or
@@ -349,8 +349,9 @@ credible light-use product:
- Current next-release focus: Phase 34 test realism. Reduce self-proving gates
by adding independent cross-checks, live status-endpoint-unreachable
injection, restart convergence assertions, and one dirty storage failure:
SmartWAL corruption. The active D4 gate is release-relevant because it checks
whether dirty storage evidence can still leak through as false `Ready=True`.
SmartWAL corruption. The D4 gate is release-relevant because it checks
whether dirty storage evidence can still leak through as false `Ready=True`;
it now passes on the core contract and is ready for Phase 34 closeout.
- Later: shared-drive control data for active runs, scenario library indexing,
queueing, remote agents on lab nodes, matrix scheduling, hosted validation,
and discovery-agent ingestion.
@@ -367,9 +368,8 @@ credible light-use product:
- Active work should be tracked in `internal/docs/current-plan.md`.
- Current active work is Phase 34: test realism and dirty-failure hardening.
The immediate execution gate is
`testops/scenarios/helm-smartwal-corrupt-restart-chain.yaml` against
`7fa34a7` or newer.
The immediate execution step is the D6 close report and release wording after
D4 SmartWAL corruption passed in run `20260601-020747-5a1f`.
- When the current plan closes, move it to `internal/docs/finished-plans/`
with a phase/topic filename such as
`phase1_finishedplan_frontend_protocol_readiness.md`.
@@ -0,0 +1,158 @@
# QA Verification - Phase 34 D4 SmartWAL Fix (#51)
Verdict: **STILL RED — fix is half-wired.** Commit `85d9375` correctly makes
SmartWAL recovery fail closed at the storage layer, but the blockvolume process
swallows the durable-recovery failure and proceeds to publish healthy anyway,
so the user-visible symptom is unchanged: `Ready=True reason=first_volume_verified`
after corruption. The gate is correctly still red. One precise wiring fix
remains.
Date: 2026-05-30
Source commit under test: `85d9375 storage: fail closed on smartwal integrity mismatch`
QA run: `20260530-000104-b168`
Scenario: `testops/scenarios/helm-smartwal-corrupt-restart-chain.yaml`
Tracking issue: #51
## What the Fix Got Right (verified live)
The storage-layer fix works. blockvolume recovery log
(`corrupt/blockvolume-pods.log`):
```text
smartwal: recovery CRC mismatch LSN=45 LBA=0 expected=11c18052 actual=0f934a52 — failing closed
blockvolume: durable recovery failed: recover failed: storage: WALIntegrity: CRC mismatch LSN=45 LBA=0 ...: storage: WAL integrity fault
```
- SmartWAL now **fails closed** instead of "skipping" (compare the prior run
`20260529-232752-b23c` which said "skipping ... recovered LSN=59").
- The typed `WALIntegrity` fault is produced.
- No more silent skip of a mid-history corrupted committed record — the Layer 2
durability concern from the prior finding is addressed at the storage layer.
Unit tests for the fix pass:
`go test ./core/storage/smartwal ./core/frontend/durable ./core/ops` PASS.
## What Is Still Broken (the half-wire)
Despite durable recovery failing, the volume still reports Ready:
`after-corrupt/corruption-status-summary.txt`:
```text
ready_true_after_corruption=true
blocked_true_after_corruption=false
reason_after_corruption=first_volume_verified
```
operator-snapshot.json for the volume:
```json
"status": "ready",
"reason_code": "first_volume_verified",
"conditions": [{"type": "Ready", "status": "True", ...}]
```
The string `wal_integrity_fault` appears **nowhere** in the live status surface
(report summary, operator-snapshot). The pod is `1/1 Running`, 0 restarts.
### Why: blockvolume logs the recovery failure but does not act on it
`cmd/blockvolume/main.go:493-507`:
```go
report, recErr := dp.RecoverVolume(recCtx, f.volumeID)
recCancel()
if recErr != nil {
fmt.Fprintln(os.Stderr, "blockvolume: durable recovery failed:", report.Evidence)
} else {
fmt.Fprintln(os.Stderr, "blockvolume: durable recovered:", report.Evidence)
}
// ...
startReadyAssignmentLoop(readyCh, f, durableProv, os.Stdout, os.Stderr)
```
When `recErr != nil` (the WALIntegrity case), the code **only logs to stderr**.
It does not return, does not mark the volume faulted, and does not stop
`startReadyAssignmentLoop` from running. So the process continues startup and
publishes healthy.
The adapter trace confirms PublishHealthy fires AFTER the recovery failure:
```text
blockvolume: durable recovery failed: ... WAL integrity fault
adapter[rid=r1] ... cmds=[FenceAtEpoch]
adapter[rid=r1] ... cmds=[PublishHealthy]
```
Compare line 490-491 just above: there IS a fail-closed process path
(`_ = h.Close(); return 1`) for an earlier error. The durable recovery failure
at line 496 simply does not take it.
### Consequence chain
```text
SmartWAL fails closed (correct)
-> recErr != nil, but main.go only logs it
-> startReadyAssignmentLoop runs anyway
-> adapter PublishHealthy
-> blockmaster ManagedVolume facts show healthy
-> projection mapping (correctly: wal_integrity_fault -> Blocked) never
receives a wal_integrity_fault fact, because the volume-side never emits one
-> operator-snapshot: Ready=True reason=first_volume_verified
```
The ManagedVolume projection mapping the dev added (wal_integrity_fault ->
Blocked) is correct and unit-tested, but it is dead code in the live path
because the fact never arrives. The break is upstream, at the
volume-process-to-engine boundary.
## Precise Fix For Dev
When `dp.RecoverVolume` returns a `WALIntegrity` (or any typed durable
recovery) failure, the blockvolume must propagate it instead of swallowing it.
Two viable shapes:
1. **Fail closed at the process** (simplest, matches the existing
line-490 pattern): on typed durable recovery failure, `h.Close(); return 1`.
The pod crashloops -> not Ready -> blockmaster sees the volume down -> status
is not Ready. Combined with a pod readiness probe, the operator-snapshot
would show the volume as down/blocked, not Ready.
2. **Publish faulted** (richer, preferred for the status story): proceed but
feed the `WALIntegrity` fault into the published observation so the engine
emits a faulted/degraded fact carrying `wal_integrity_fault`. Then the
existing projection mapping fires and the surface shows
`Blocked=True reason=wal_integrity_fault`. This gives the user a precise
reason instead of an opaque crashloop.
Option 2 is the better end-state because it makes the status surface
self-explaining (the whole point of Phase 32). Option 1 is acceptable as a
first step if it is faster, but then a pod readiness probe should also reflect
the durable recovery failure so the volume does not appear `1/1 Ready`.
Secondary defense-in-depth: the pod readiness probe should fail when durable
recovery failed; right now the pod is `1/1 Running` despite the failure.
## Gate Status
The D4 gate is **functioning and correctly red.** It moved the product one
layer forward (storage now fails closed) but the user-visible assertion
(`no Ready=True after corruption`) is still violated because of the unwired
volume-process branch. Keep D4 red until the recovery failure reaches the
status surface as a non-Ready, `wal_integrity_fault`-reasoned state.
## Lab State
Clean after the always-run cleanup: no helm release, no iSCSI sessions, no
multipath, no sw-block pods, no testops hostPath residue.
## Bottom Line
- Storage fail-closed (#51 core): **done and verified live.** Real progress.
- Status surface after corruption: **still Ready=True** — the recovery failure
is logged but not propagated past `cmd/blockvolume/main.go:496`.
- Fix is one branch: turn the typed durable recovery failure into either a
process fail-closed or a published `wal_integrity_fault` observation; the
projection mapping is already in place to do the rest.
- Do not mark D4 passed. One more dev cycle.
@@ -0,0 +1,167 @@
# QA Verification #2 - Phase 34 D4 SmartWAL Fix (#51 follow-up)
Verdict: **STILL RED — the false Ready has been chased up one more layer.**
Commit `954083a` correctly stops the volume process from publishing healthy on
a recovery fault (verified live). But blockmaster's ManagedVolume projection
still reports `Ready=True reason=first_volume_verified`, because the volume's
"local readiness blocked / WALIntegrity" state is not carried through the
heartbeat/status channel that the projection consumes. This is now a
contract-level gap, not another local patch.
Date: 2026-05-30
Source commit under test: `954083a blockvolume: block healthy publication on recovery fault`
QA run: `20260530-225116-66a3`
Tracking issue: #51
## What `954083a` Got Right (verified live)
blockvolume recovery log (`corrupt/blockvolume-pods.log`):
```text
smartwal: recovery CRC mismatch LSN=45 ... — failing closed
blockvolume: durable recovery failed: ... storage: WAL integrity fault
blockvolume: durable recovery faulted; status endpoint remains available and local readiness remains blocked: ... WAL integrity fault
blockvolume: volume pvc-8c5d9111-... local readiness blocked (...WALIntegrity...); NOT applying primary assignment r1@1 to adapter
```
- The volume now **blocks local readiness** and **does not enter the adapter**.
- The adapter `PublishHealthy` trace from the prior run (`85d9375`) is **gone** —
grep for PublishHealthy in this run's blockvolume log returns nothing.
So the `cmd/blockvolume/main.go:496` gap from the previous QA report is closed:
the recovery fault no longer drives a healthy publish. Real progress, third
layer of the onion peeled.
## What Is Still Broken — one layer up (blockmaster projection)
operator-snapshot.json for the volume still reports:
```json
"status": "ready",
"reason_code": "first_volume_verified",
"conditions": [{"type": "Ready", "status": "True", ...}]
```
`after-corrupt/corruption-status-summary.txt`:
```text
ready_true_after_corruption=true
blocked_true_after_corruption=false
reason_after_corruption=first_volume_verified
```
And the gate is fed by blockmaster's ClusterEvidenceService, whose
`cluster-evidence.json` shows:
```text
status: ok
desired_replicas: 1
observed_replicas: 1
primary_replica: r1
replicas: [{ replica_id: r1, replication_role: primary }]
```
### Root cause: heartbeat says "present", projection infers "Ready"
The restarted pod is `1/1 Running`, 0 restarts, and — by the dev's deliberate
design — keeps its status endpoint / heartbeat available so it stays
diagnosable. blockmaster therefore observes:
```text
replica r1 present + reachable + assigned primary
-> observed_replicas=1, primary_replica=r1, status=ok
-> ManagedVolume projection: Ready=True reason=first_volume_verified
```
But the volume's actual state is "local readiness blocked due to WALIntegrity
fault; primary assignment NOT applied to adapter." That fact never reaches the
projection. blockmaster equates "heartbeating + assigned primary" with Ready,
without requiring a positive local-readiness confirmation from the volume.
This is fresh-but-wrong, not merely a stale cache: blockmaster IS seeing the new
post-restart pod (observed_replicas reflects it). The pod heartbeats as
present; the readiness-blocked nuance is simply not in the channel the
projection reads.
### Note: the wal_integrity_fault -> Blocked mapping is still dead code live
Dev added (in `85d9375`) a ManagedVolume projection rule mapping
`wal_integrity_fault -> Blocked`. It is unit-tested and correct. But it still
never fires in the live path, because no live fact carrying
`wal_integrity_fault` reaches blockmaster — the string appears nowhere in the
live operator-snapshot or cluster-evidence. The fact is produced at the volume
(in its log) and consumed by nothing.
## The Pattern (worth naming)
This is the third consecutive cycle where a correct, verified fix pushed the
false-Ready up exactly one layer:
```text
1. storage: skip corrupt record -> fail closed (85d9375, done)
2. volume process: publish healthy anyway -> block readiness (954083a, done)
3. blockmaster: infer Ready from heartbeat -> ??? (this finding)
```
Each patch was real and necessary, but the symptom did not move because the
root question was never answered at the contract level:
**What does `Ready=True` require, end to end?**
Right now it requires only "replica present + assigned primary + reachable."
It should require "the volume has positively confirmed local readiness." Until
the ManagedVolume projection demands a positive readiness signal (and treats
its absence as Pending/Unknown/Blocked), any volume-side fault that still lets
the pod heartbeat will surface as a false Ready.
## Recommended Fix (contract-level, not another local patch)
Pick one, but make it a contract change:
1. **Carry the fault on the heartbeat/status channel.** The volume's status
endpoint / heartbeat must report `local_readiness=blocked,
reason=wal_integrity_fault` when recovery is faulted. blockmaster's
ManagedVolume projection then receives the fact and the existing
`wal_integrity_fault -> Blocked` mapping fires. This is the smallest change
that makes the dead-code mapping live and gives the user a precise reason.
2. **Make the projection require positive readiness.** blockmaster must not
project `Ready=True` for an assigned primary that has not confirmed local
readiness. An assigned-but-not-ready-confirmed primary becomes
`Ready=Unknown` / `Pending` / `EvidenceStale` until the volume confirms
readiness. This is the more robust fix because it closes the whole class
(any future volume-side fault that blocks readiness while heartbeating),
not just WALIntegrity.
Option 2 is the durable answer; option 1 is the targeted one. Ideally both:
the projection should require positive readiness AND the volume should carry a
reason so the user sees `wal_integrity_fault` rather than a bare Unknown.
This connects directly to the Phase 32 D7 stale/negative-first work: a primary
that is reachable-but-not-ready is the same shape as stale evidence — the
surface must not claim Ready.
## Gate Status
D4 remains **functional and correctly red.** It has now driven three real
product fixes and surfaced a fourth, deeper one. Keep it red until the
operator-snapshot shows the corrupted volume as NOT Ready (Blocked with
`wal_integrity_fault`, or Unknown/Pending), never `Ready=True
reason=first_volume_verified`.
## Lab State
Clean after the always-run cleanup: no helm release, no iSCSI sessions, no
multipath, no sw-block pods, no testops hostPath residue.
## Bottom Line
- `954083a`: **volume no longer publishes healthy on recovery fault — verified.**
- Still false Ready: **blockmaster projects Ready from heartbeat-presence, not
from confirmed local readiness.** The `wal_integrity_fault -> Blocked` mapping
is correct but starves because the fact never reaches it.
- Next fix should be **contract-level**: require positive local-readiness for
Ready (and/or carry `wal_integrity_fault` on the heartbeat channel), not
another local patch one layer down.
- Do not mark D4 passed.
@@ -0,0 +1,131 @@
# QA Verification #3 - Phase 34 D4 SmartWAL (PASS)
Verdict: **PASS — no false Ready=True after SmartWAL corruption.** The
contract-level fix `09aa6fe master: require primary readiness evidence` works:
the corrupted volume now reports `Ready=Unknown / status=unknown` instead of
the false `Ready=True reason=first_volume_verified` seen in the three prior
cycles. All 8 required checks satisfied.
One scenario/lab-infra bug found and worked around (not a product issue) — see
"Scenario Gap" below; it must be fixed or the gate is non-deterministic.
Date: 2026-06-01
Source: branch `phase33-testops-failure-hardening` @ `d86a195`, with product
fix `09aa6fe` + test `7fa34a7`.
Passing run: `20260601-020747-5a1f`, 30/30 actions PASS.
## Required Checks
| # | Check | Result | Evidence |
|---|---|---|---|
| 1 | `target_offset_inside_wal=true` | PASS | corruption stdout |
| 2 | `target_offset_inside_extent=false` | PASS | corruption stdout (`mutated_offset=5823`) |
| 3 | blockvolume logs WAL integrity / durable recovery fault | PASS | `failing closed`; `WALIntegrity: CRC mismatch LSN=45 ... WAL integrity fault`; `durable recovery faulted; ... local readiness remains blocked`; `NOT applying primary assignment r1@1 to adapter` |
| 4 | surface does NOT show Ready=True | PASS | `ready_true_after_corruption=false`; operator-snapshot per-volume `status=unknown`, Condition `Ready=Unknown` |
| 5 | Preferred: Blocked/Unknown with `reason=wal_integrity_fault` | PARTIAL | It is **Unknown** (good) but `reason_after_corruption=unknown`, not `wal_integrity_fault`. See note below. |
| 6 | Acceptable: any non-ready generic reason, no Ready=True | **PASS** | `status=unknown`, `Ready=Unknown`, no `Ready=True` on any surface |
| 7 | `cleanup_status=ok` | PASS | cleanup-summary |
| 8 | iSCSI/node-DB/multipath/dmsetup/k8s/process residue clean | PASS | all counts 0; post-run host audit: helm none, no iSCSI sessions, no multipath, no dmsetup, no pods |
The gate passes on **check 6** (acceptable generic non-ready). Check 5
(preferred specific `wal_integrity_fault` reason) is **not yet met** — see the
non-blocking note.
## How the Fix Works
`09aa6fe` implemented the contract-level fix recommended in QA verify2
(Option 2): the ManagedVolume projection now refuses to claim `Ready=True` for
an assigned primary that has not positively confirmed local readiness.
The chain now:
```text
SmartWAL CRC mismatch
-> storage fails closed (WALIntegrity fault) [85d9375]
-> blockvolume blocks local readiness, does not publish [954083a]
-> blockmaster projection: no positive readiness => Unknown, NOT Ready [09aa6fe]
-> operator-snapshot: status=unknown, Ready=Unknown
```
This is the correct negative-first behavior: a corrupted volume is no longer
confidently reported healthy. It closes the false-Ready bug (#51) that survived
three prior fix layers.
## Non-Blocking Note: reason is generic `unknown`, not `wal_integrity_fault`
The volume correctly reports NOT-Ready, but the status surface shows
`reason=unknown` rather than the specific `wal_integrity_fault`. The
`wal_integrity_fault` text lives in the blockvolume LOG, not in the
operator-snapshot `reason_code`. This is the "Option 1" half (carry the fault
reason through the heartbeat/status channel) that `09aa6fe` did not implement —
it took Option 2 (require positive readiness) only.
Per the assignment this is explicitly acceptable for this slice (check 6). The
preferred `reason=wal_integrity_fault` (check 5) remains a follow-up so a cold
operator sees WHY the volume is Unknown without reading blockvolume logs. Not a
blocker for D4 close.
## Scenario Gap (must fix — gate is non-deterministic without it)
The first verify-3 rerun (`20260601-015115-61a8`) FAILED at `helm_install_stack`
with a 10-minute timeout. Root cause was NOT the product:
```text
blockmaster: flag provided but not defined: -launcher-durable-impl
```
The `helm-smartwal-corrupt-restart-chain.yaml` build phase rebuilds and imports
`sw-block:local` only on `single_node` (m02). But the chart's blockmaster
Deployment is not pinned to m02, so k3s scheduled it on **m01**, which still had
a STALE `sw-block:local` (predating `8a6737e helm: expose launcher durable
impl`). The stale binary rejected the `--launcher-durable-impl` flag the chart
emits -> CrashLoopBackOff -> `helm install --wait` hung -> timeout.
Per-node image state at the failure:
```text
m01 (192.168.1.181): launcher-durable-impl flag = 0 (STALE)
m02 (192.168.1.184): launcher-durable-impl flag = 1 (fresh, built this run)
tp01 (192.168.1.188): launcher-durable-impl flag = 0 (STALE)
```
QA unblocked by exporting the fresh `sw-block:local` from m02 and importing it
to m01 + tp01, then re-running — which PASSED 30/30.
This means the prior "successful" D4 runs passed only because blockmaster
happened to schedule on m02. The gate is non-deterministic: it fails whenever
blockmaster lands on a node with a stale image.
Fix shape (pick one):
1. **Pin blockmaster to `single_node`** in the smartwal scenario values
(nodeSelector kubernetes.io/hostname=m02), so it always runs the freshly
built image. Smallest change, matches the single-node intent.
2. **Import `sw-block:local` to all schedulable nodes** in the build phase
(the multi-volume scenarios already do `SW_BLOCK_IMPORT_K3S_NODES=...`).
3. **Pre-clean stale images**: have `pre_run_cleanup` remove `sw-block:local`
from all nodes so a stale one can never be picked.
Option 1 is the cleanest for this single-node scenario.
## Lab State
Clean after the always-run cleanup + QA teardown: no helm release, no iSCSI
sessions, no multipath, no dmsetup, no sw-block pods. Temp image tars QA
distributed to m01/tp01 were removed.
## Bottom Line
- **D4 product assertion: PASS.** SmartWAL corruption no longer produces false
Ready=True; the volume reports `Ready=Unknown` via the new
require-positive-readiness projection (`09aa6fe`).
- **#51 is fixed** across all three layers (storage fail-closed, volume
readiness block, projection positive-readiness requirement).
- **Two follow-ups, neither blocking D4 close:**
- Surface `reason=wal_integrity_fault` on the status surface (currently
generic `unknown`) — the Option-1 half.
- Fix the scenario's stale-image non-determinism (pin blockmaster to
single_node, or refresh/clean images on all nodes).
- Per the assignment, **D4 can close** and dev can write the D6 close report.
Recommend filing the two follow-ups so they are tracked, not lost.
@@ -101,6 +101,8 @@ phases:
out.append(line)
if not inserted and line.rstrip() == "blockmaster:":
out.append(" durableImpl: smartwal")
out.append(" nodeSelector:")
out.append(" kubernetes.io/hostname: {{ single_node }}")
inserted = True
if not inserted:
raise SystemExit("blockmaster block not found; cannot set durableImpl")