mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 18:47:20 +01:00
Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6dce14b5bf | ||
|
|
b773ffbe98 | ||
|
|
e17e30b4aa | ||
|
|
f92efd4437 | ||
|
|
fe2d016c41 | ||
|
|
cf3eda7e57 | ||
|
|
68d56d8ff8 | ||
|
|
39f568f614 | ||
|
|
4a58968439 | ||
|
|
f9febc7ee5 | ||
|
|
0ce344d559 | ||
|
|
63c50b8cfe | ||
|
|
ad5d7338bc |
No files matched your search
+5
-4
@@ -11,14 +11,14 @@ cmd/sw-block/volume_backup.go RestoreCommand.Abort
|
||||
cmd/sw-block/volume_backup.go RestoreCommand.AbortVerify
|
||||
cmd/sw-block/volume_backup.go RestoreCommand.Run
|
||||
cmd/sw-block/volume_backup.go RestoreCommand.Start
|
||||
cmd/sw-block/volume_start_release.go StopAndRestart.CrashRestart
|
||||
cmd/sw-block/volume_start_release.go StopAndRestart.IssueClean
|
||||
cmd/sw-block/volume_start_release.go StopAndRestart.ReadClean
|
||||
cmd/sw-block/volume_start_release.go StopAndRestart.SameEpochReopen
|
||||
cmd/sw-block/volume_verbs.go CutTime.CliGiveUp
|
||||
cmd/sw-block/volume_verbs.go CutTime.Poll
|
||||
cmd/sw-block/workspace_show.go MoveAdmission.ReadForMove
|
||||
core/authority/authority.go DeleteRetire.Retire
|
||||
core/authority/authority_store_file.go DeleteRetire.Retire
|
||||
core/authority/authority.go DeleteRetire.RetireLine
|
||||
core/authority/authority_store_file.go DeleteRetire.RetireLine
|
||||
core/authority/workspace.go HolderInterface.ForcedMove
|
||||
core/authority/workspace.go HolderInterface.PlannedMove
|
||||
core/authority/workspace.go MoveAdmission.Ack
|
||||
@@ -36,7 +36,7 @@ core/authority/workspace_delete_reservation.go MoveAdmission.DelCheck
|
||||
core/authority/workspace_delete_reservation.go MoveAdmission.Reserve
|
||||
core/authority/workspace_lease_view.go HolderInterface.Grant
|
||||
core/authority/workspace_lease_view.go HolderInterface.Regrant
|
||||
core/authority/workspace_retirement.go DeleteRetire.Retire
|
||||
core/authority/workspace_retirement.go DeleteRetire.RetireLine
|
||||
core/engine/apply.go ReplicationPeer.Reconcile
|
||||
core/frontend/chunkstore/catalog_b.go CleanBatch.Publish
|
||||
core/frontend/chunkstore/catalog_b.go CleanBatch.Request
|
||||
@@ -187,6 +187,7 @@ core/frontend/durable/provider_layout.go EngineAdapter.SettleDown
|
||||
core/frontend/durable/provider_layout.go StopAndRestart.SettleDown
|
||||
core/frontend/durable/provider_preempt.go CutTime.Preempt
|
||||
core/frontend/durable/provider_preempt.go CutTime.Settle
|
||||
core/frontend/durable/provider_seal_replay.go PlainSealReplay.Reply
|
||||
core/frontend/durable/storage_adapter.go EngineAdapter.GuestWrite
|
||||
core/frontend/durable/storage_adapter.go HolderInterface.Write
|
||||
core/frontend/durable/storage_adapter.go WALHold.Resubmit
|
||||
|
||||
|
+1
-1
@@ -34,7 +34,7 @@ jobs:
|
||||
# Draft PR skips it; its author tests locally until the PR is ready.
|
||||
if: github.event_name == 'push' || !github.event.pull_request.draft
|
||||
# Pull requests run on GitHub-hosted runners (free for this public repo, many
|
||||
# jobs in parallel); pushes to main keep the team's tp04 runner (seaweed.slice,
|
||||
# jobs in parallel); pushes to main keep the team's self-hosted runner (seaweed.slice,
|
||||
# capped at 8 cores / 8 GiB) as the self-hosted signal. A train PR (branch
|
||||
# train/* of this repository, a few a day) also runs on the team's runners:
|
||||
# it is the merge gate, and the organization's shared GitHub-hosted queue held
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# The wrong-size local store a 1.0 first start left (3402e0dd, the 1.0 RC):
|
||||
# v2 restored with a 65536-block record, started with --durable-blocks 32768;
|
||||
# captured from that run on tp04 (archive sha256
|
||||
# captured from that run on a lab host (archive sha256
|
||||
# 0905c3af83b3a1dc226b417fa5acf7071907cc3e53478bc14a531481b717c5c1).
|
||||
# "file <name> <size> <octal mode>", then "<offset> <hex>" for each run of
|
||||
# non-zero bytes; every other byte is zero.
|
||||
|
||||
@@ -250,11 +250,11 @@ func TestOpsOperatorStatusDryRunFromBundle(t *testing.T) {
|
||||
},
|
||||
Replicas: []ops.ReplicaFact{{
|
||||
ReplicaID: "r1",
|
||||
KubernetesNode: "m02",
|
||||
KubernetesNode: "node-b",
|
||||
Role: "primary",
|
||||
Observed: true,
|
||||
}},
|
||||
CSIStages: []ops.CSIStageFact{{NodeName: "m02", Target: "192.168.1.184:3260"}},
|
||||
CSIStages: []ops.CSIStageFact{{NodeName: "node-b", Target: "192.168.1.184:3260"}},
|
||||
Workload: &ops.WorkloadCheckFact{WriterVerified: true, ReaderVerified: true},
|
||||
})}
|
||||
raw, err := ops.MarshalObservationJSON(cluster)
|
||||
@@ -296,11 +296,11 @@ func TestOpsOperatorStatusWritesCRDStatusWhenDryRunDisabled(t *testing.T) {
|
||||
},
|
||||
Replicas: []ops.ReplicaFact{{
|
||||
ReplicaID: "r1",
|
||||
KubernetesNode: "m02",
|
||||
KubernetesNode: "node-b",
|
||||
Role: "primary",
|
||||
Observed: true,
|
||||
}},
|
||||
CSIStages: []ops.CSIStageFact{{NodeName: "m02", Target: "192.168.1.184:3260"}},
|
||||
CSIStages: []ops.CSIStageFact{{NodeName: "node-b", Target: "192.168.1.184:3260"}},
|
||||
Workload: &ops.WorkloadCheckFact{WriterVerified: true, ReaderVerified: true},
|
||||
})}
|
||||
raw, err := ops.MarshalObservationJSON(cluster)
|
||||
@@ -1894,7 +1894,7 @@ func TestOpsClusterMasterAPIUsesSharedInClusterNodeEvidenceEnrichment(t *testing
|
||||
}
|
||||
out := stdout.String()
|
||||
for _, want := range []string{
|
||||
`"kubernetes_node": "m02"`,
|
||||
`"kubernetes_node": "node-b"`,
|
||||
`"ready": false`,
|
||||
`"reason": "node_not_ready"`,
|
||||
} {
|
||||
@@ -1926,7 +1926,7 @@ func TestOpsReportMasterAPIUsesSharedInClusterNodeEvidenceEnrichment(t *testing.
|
||||
}
|
||||
out := string(raw)
|
||||
for _, want := range []string{
|
||||
`"kubernetes_node": "m02"`,
|
||||
`"kubernetes_node": "node-b"`,
|
||||
`"ready": false`,
|
||||
`"reason": "node_not_ready"`,
|
||||
} {
|
||||
@@ -1956,7 +1956,7 @@ func TestLoadObservationVolumeUsesSharedInClusterNodeEvidenceEnrichment(t *testi
|
||||
if code != ops.VolumeStatusExitOK {
|
||||
t.Fatalf("exit=%d stderr=%s cluster=%+v", code, stderr.String(), cluster)
|
||||
}
|
||||
if len(cluster.Nodes) != 1 || cluster.Nodes[0].KubernetesNode != "m02" {
|
||||
if len(cluster.Nodes) != 1 || cluster.Nodes[0].KubernetesNode != "node-b" {
|
||||
t.Fatalf("cluster nodes=%+v", cluster.Nodes)
|
||||
}
|
||||
if !cmdConditionReason(cluster.Nodes[0].Conditions, ops.ReasonNodeNotReady) {
|
||||
@@ -2051,7 +2051,7 @@ func TestOpsDashboardMasterAPIUsesSharedInClusterNodeEvidenceEnrichment(t *testi
|
||||
}()
|
||||
|
||||
body := waitForHTTPContains(t, "http://"+addr+"/cluster-evidence.json", `"reason": "node_not_ready"`)
|
||||
if !strings.Contains(body, `"kubernetes_node": "m02"`) || !strings.Contains(body, `"ready": false`) {
|
||||
if !strings.Contains(body, `"kubernetes_node": "node-b"`) || !strings.Contains(body, `"ready": false`) {
|
||||
t.Fatalf("dashboard cluster evidence missing enriched node:\n%s", body)
|
||||
}
|
||||
select {
|
||||
@@ -2123,8 +2123,8 @@ type fakeNodeEvidenceEnricher struct{}
|
||||
|
||||
func (fakeNodeEvidenceEnricher) EnrichNodeEvidence(_ context.Context, _ string, cluster ops.ClusterEvidence) (ops.ClusterEvidence, error) {
|
||||
cluster.Nodes = []ops.NodeEvidence{{
|
||||
NodeName: "m02",
|
||||
KubernetesNode: "m02",
|
||||
NodeName: "node-b",
|
||||
KubernetesNode: "node-b",
|
||||
Ready: false,
|
||||
Schedulable: true,
|
||||
Conditions: []ops.ObservationCondition{{
|
||||
@@ -2538,7 +2538,7 @@ func TestOpsGenerateHelmValuesSingleNodeFromKubernetes(t *testing.T) {
|
||||
code := run([]string{
|
||||
"ops", "generate-helm-values",
|
||||
"--out", outPath,
|
||||
"--target-node", "m02",
|
||||
"--target-node", "node-b",
|
||||
"--node-limit", "1",
|
||||
"--image", "ghcr.io/seaweedfs/seaweed-block:sha-test",
|
||||
"--csi-image", "ghcr.io/seaweedfs/seaweed-block-csi:sha-test",
|
||||
@@ -2551,7 +2551,7 @@ func TestOpsGenerateHelmValuesSingleNodeFromKubernetes(t *testing.T) {
|
||||
"network_mode=loopback",
|
||||
"ready_kubernetes_nodes=1",
|
||||
"discovered_kubernetes_nodes=3",
|
||||
"target_node=m02",
|
||||
"target_node=node-b",
|
||||
"restart_persistence_mode=hostpath",
|
||||
"state_hostpath=/var/lib/sw-block/k8s",
|
||||
} {
|
||||
@@ -2575,8 +2575,8 @@ func TestOpsGenerateHelmValuesSingleNodeFromKubernetes(t *testing.T) {
|
||||
"stateHostPath: /var/lib/sw-block/k8s",
|
||||
"expectedSlotsPerVolume: 1",
|
||||
"enabled: false",
|
||||
"name: m02",
|
||||
"kubernetesNode: m02",
|
||||
"name: node-b",
|
||||
"kubernetesNode: node-b",
|
||||
"internalIP: 127.0.0.1",
|
||||
"dataPort: 19101",
|
||||
"controlPort: 19102",
|
||||
@@ -2641,15 +2641,15 @@ func TestOpsGenerateHelmValuesMultiNodeExternalISCSI(t *testing.T) {
|
||||
"stateHostPath: /var/lib/sw-block/k8s",
|
||||
"enabled: true",
|
||||
"secret: fixed-chap-secret",
|
||||
"name: m01",
|
||||
"name: node-a",
|
||||
"internalIP: 192.168.1.181",
|
||||
"dataPort: 19101",
|
||||
"controlPort: 19102",
|
||||
"name: m02",
|
||||
"name: node-b",
|
||||
"internalIP: 192.168.1.184",
|
||||
"dataPort: 19103",
|
||||
"controlPort: 19104",
|
||||
"name: tp01",
|
||||
"name: node-c",
|
||||
"internalIP: 192.168.1.188",
|
||||
"dataPort: 19105",
|
||||
"controlPort: 19106",
|
||||
@@ -2709,11 +2709,11 @@ func TestOpsGenerateHelmValuesMultiNodeExternalNVMe(t *testing.T) {
|
||||
"enabled: false",
|
||||
"create: false",
|
||||
"secret: \"\"",
|
||||
"name: m01",
|
||||
"name: node-a",
|
||||
"internalIP: 192.168.1.181",
|
||||
"name: m02",
|
||||
"name: node-b",
|
||||
"internalIP: 192.168.1.184",
|
||||
"name: tp01",
|
||||
"name: node-c",
|
||||
"internalIP: 192.168.1.188",
|
||||
} {
|
||||
if !strings.Contains(string(values), want) {
|
||||
@@ -2739,7 +2739,7 @@ func TestOpsGenerateHelmValuesMultiNodeNVMeFrontendIPMap(t *testing.T) {
|
||||
"--out", outPath,
|
||||
"--replication-factor", "3",
|
||||
"--protocol", "nvme",
|
||||
"--frontend-ip-map", "m01=10.0.0.181,m02=10.0.0.184,tp01=10.0.0.188",
|
||||
"--frontend-ip-map", "node-a=10.0.0.181,node-b=10.0.0.184,node-c=10.0.0.188",
|
||||
"--frontend-network-class", "100gbe_tcp",
|
||||
}, &stdout, &stderr)
|
||||
if code != ops.VolumeStatusExitOK {
|
||||
@@ -2747,7 +2747,7 @@ func TestOpsGenerateHelmValuesMultiNodeNVMeFrontendIPMap(t *testing.T) {
|
||||
}
|
||||
for _, want := range []string{
|
||||
"network_mode=external-nvme",
|
||||
"frontend_ip_map=m01=10.0.0.181,m02=10.0.0.184,tp01=10.0.0.188",
|
||||
"frontend_ip_map=node-a=10.0.0.181,node-b=10.0.0.184,node-c=10.0.0.188",
|
||||
"frontend_network_class=100gbe_tcp",
|
||||
} {
|
||||
if !strings.Contains(stdout.String(), want) {
|
||||
@@ -2759,16 +2759,16 @@ func TestOpsGenerateHelmValuesMultiNodeNVMeFrontendIPMap(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for _, want := range []string{
|
||||
"name: m01",
|
||||
"name: node-a",
|
||||
"internalIP: 192.168.1.181",
|
||||
"managementIP: 192.168.1.181",
|
||||
"frontendIP: 10.0.0.181",
|
||||
"frontendNetworkClass: 100gbe_tcp",
|
||||
"name: m02",
|
||||
"name: node-b",
|
||||
"internalIP: 192.168.1.184",
|
||||
"managementIP: 192.168.1.184",
|
||||
"frontendIP: 10.0.0.184",
|
||||
"name: tp01",
|
||||
"name: node-c",
|
||||
"internalIP: 192.168.1.188",
|
||||
"managementIP: 192.168.1.188",
|
||||
"frontendIP: 10.0.0.188",
|
||||
@@ -2791,7 +2791,7 @@ func TestPhase165_OpsGenerateHelmValuesNVMERDMA(t *testing.T) {
|
||||
code := run([]string{
|
||||
"ops", "generate-helm-values", "--out", outPath, "--replication-factor", "1",
|
||||
"--protocol", "nvme", "--nvme-transport", "rdma",
|
||||
"--frontend-ip-map", "m01=10.0.0.181,m02=10.0.0.184,tp01=10.0.0.188",
|
||||
"--frontend-ip-map", "node-a=10.0.0.181,node-b=10.0.0.184,node-c=10.0.0.188",
|
||||
"--frontend-network-class", "100gbe_roce",
|
||||
}, &stdout, &stderr)
|
||||
if code != ops.VolumeStatusExitOK {
|
||||
@@ -2817,7 +2817,7 @@ func TestPhase165_OpsGenerateHelmValuesNVMERDMARequiresRoCEMap(t *testing.T) {
|
||||
for _, args := range [][]string{
|
||||
{"--protocol", "iscsi", "--nvme-transport", "rdma"},
|
||||
{"--protocol", "nvme", "--nvme-transport", "rdma"},
|
||||
{"--protocol", "nvme", "--nvme-transport", "rdma", "--frontend-ip-map", "m01=10.0.0.181", "--frontend-network-class", "100gbe_tcp"},
|
||||
{"--protocol", "nvme", "--nvme-transport", "rdma", "--frontend-ip-map", "node-a=10.0.0.181", "--frontend-network-class", "100gbe_tcp"},
|
||||
} {
|
||||
var stdout, stderr bytes.Buffer
|
||||
base := []string{"ops", "generate-helm-values", "--out", filepath.Join(t.TempDir(), "values.yaml")}
|
||||
@@ -2841,20 +2841,20 @@ func TestOpsGenerateHelmValuesRejectsIncompleteFrontendIPMap(t *testing.T) {
|
||||
"--out", filepath.Join(t.TempDir(), "values.yaml"),
|
||||
"--replication-factor", "3",
|
||||
"--protocol", "nvme",
|
||||
"--frontend-ip-map", "m01=10.0.0.181,m02=10.0.0.184",
|
||||
"--frontend-ip-map", "node-a=10.0.0.181,node-b=10.0.0.184",
|
||||
"--frontend-network-class", "100gbe_tcp",
|
||||
}, &stdout, &stderr)
|
||||
if code != ops.VolumeStatusExitInvalid {
|
||||
t.Fatalf("exit=%d want invalid stdout=%s stderr=%s", code, stdout.String(), stderr.String())
|
||||
}
|
||||
if !strings.Contains(stderr.String(), `--frontend-ip-map missing selected node "tp01"`) {
|
||||
if !strings.Contains(stderr.String(), `--frontend-ip-map missing selected node "node-c"`) {
|
||||
t.Fatalf("stderr=%s", stderr.String())
|
||||
}
|
||||
}
|
||||
|
||||
func TestNodeEvidenceFromWirePreservesFrontendAddress(t *testing.T) {
|
||||
node := nodeEvidenceFromWire(&control.NodeEvidence{
|
||||
NodeName: "m01",
|
||||
NodeName: "node-a",
|
||||
InternalIp: "192.168.1.181",
|
||||
FrontendIp: "10.0.0.1",
|
||||
FrontendNetworkClass: "100gbe_tcp",
|
||||
@@ -2887,7 +2887,7 @@ func TestOpsGenerateHelmValuesRestartPersistenceHostPath(t *testing.T) {
|
||||
code := run([]string{
|
||||
"ops", "generate-helm-values",
|
||||
"--out", outPath,
|
||||
"--target-node", "m02",
|
||||
"--target-node", "node-b",
|
||||
"--node-limit", "1",
|
||||
"--restart-persistence", "hostpath",
|
||||
"--state-hostpath", "/var/lib/sw-block",
|
||||
@@ -2945,7 +2945,7 @@ func TestOpsGenerateHelmValuesRejectsRFAboveSelectedNodes(t *testing.T) {
|
||||
code := run([]string{
|
||||
"ops", "generate-helm-values",
|
||||
"--out", filepath.Join(t.TempDir(), "values.yaml"),
|
||||
"--target-node", "m02",
|
||||
"--target-node", "node-b",
|
||||
"--replication-factor", "3",
|
||||
}, &stdout, &stderr)
|
||||
if code != ops.VolumeStatusExitInvalid {
|
||||
@@ -2966,7 +2966,7 @@ func TestOpsDescribeVolumeFromBundle(t *testing.T) {
|
||||
for _, want := range []string{
|
||||
"cluster status=degraded volumes=1",
|
||||
"volume pvc-observed status=ok rf=3 ack=sync-quorum",
|
||||
"primary r2 on m02 frontend=192.168.1.184:3260",
|
||||
"primary r2 on node-b frontend=192.168.1.184:3260",
|
||||
} {
|
||||
if !strings.Contains(stdout.String(), want) {
|
||||
t.Fatalf("stdout missing %q:\n%s", want, stdout.String())
|
||||
@@ -2984,7 +2984,7 @@ func TestOpsDescribeVolumeFromBundlePrefersProductClusterEvidence(t *testing.T)
|
||||
for _, want := range []string{
|
||||
"cluster status=ok volumes=1 nodes=1",
|
||||
"volume pvc-product status=ok rf=3 ack=sync-quorum",
|
||||
"primary r2 on m02 frontend=192.168.1.184:3260",
|
||||
"primary r2 on node-b frontend=192.168.1.184:3260",
|
||||
} {
|
||||
if !strings.Contains(stdout.String(), want) {
|
||||
t.Fatalf("stdout missing %q:\n%s", want, stdout.String())
|
||||
@@ -3341,7 +3341,7 @@ func TestOpsReportFromBundleSkipsCorruptClusterEvidenceCandidate(t *testing.T) {
|
||||
ReplicationFactor: 1,
|
||||
Status: ops.ObservationStatusOK,
|
||||
PrimaryReplica: "r1",
|
||||
PrimaryNode: "m02",
|
||||
PrimaryNode: "node-b",
|
||||
PublishTarget: "192.168.1.184:3260",
|
||||
}}
|
||||
raw, err := ops.MarshalObservationJSON(cluster)
|
||||
@@ -3513,7 +3513,7 @@ func TestOpsExplainVolumeFromBundleBlockedImagePull(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := os.WriteFile(filepath.Join(dir, "demo", ops.KubeSystemPodsDeploysArtifact), []byte(`NAME READY STATUS RESTARTS AGE IP NODE
|
||||
pod/sw-block-csi-node-n948t 0/2 Init:ErrImagePull 0 2m3s 192.168.1.184 m02
|
||||
pod/sw-block-csi-node-n948t 0/2 Init:ErrImagePull 0 2m3s 192.168.1.184 node-b
|
||||
deployment.apps/sw-block-csi-controller 1/1 1 1 2m3s block-csi sw-block-csi:local
|
||||
`), 0o644); err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -3525,7 +3525,7 @@ deployment.apps/sw-block-csi-controller 1/1 1 1 2m3s block-csi sw-block-csi:loca
|
||||
}
|
||||
for _, want := range []string{
|
||||
"volume pvc-blocked status=blocked rf=3 reason=csi_node_image_pull_failed",
|
||||
"waiting=ImagePullBackOff on node m02 image sw-block-csi:local",
|
||||
"waiting=ImagePullBackOff on node node-b image sw-block-csi:local",
|
||||
} {
|
||||
if !strings.Contains(stdout.String(), want) {
|
||||
t.Fatalf("stdout missing %q:\n%s", want, stdout.String())
|
||||
@@ -3551,7 +3551,7 @@ func TestOpsDescribeVolumeLiveInventory(t *testing.T) {
|
||||
"cluster status=ok volumes=1 nodes=0",
|
||||
"volume pvc-live status=ok rf=1 ack=best-effort",
|
||||
"pvc default/app-live",
|
||||
"primary r1 on m02 frontend=127.0.0.1:3260",
|
||||
"primary r1 on node-b frontend=127.0.0.1:3260",
|
||||
} {
|
||||
if !strings.Contains(stdout.String(), want) {
|
||||
t.Fatalf("stdout missing %q:\n%s", want, stdout.String())
|
||||
@@ -3583,7 +3583,7 @@ func TestOpsClusterAndVolumesLiveInventory(t *testing.T) {
|
||||
if code != ops.VolumeStatusExitOK {
|
||||
t.Fatalf("volumes exit=%d stderr=%s stdout=%s", code, volumesErr.String(), volumesOut.String())
|
||||
}
|
||||
if !strings.Contains(volumesOut.String(), "volume pvc-live status=ok rf=1 primary=r1 node=m02 frontend=127.0.0.1:3260") {
|
||||
if !strings.Contains(volumesOut.String(), "volume pvc-live status=ok rf=1 primary=r1 node=node-b frontend=127.0.0.1:3260") {
|
||||
t.Fatalf("volumes output missing evidence:\n%s", volumesOut.String())
|
||||
}
|
||||
}
|
||||
@@ -3601,9 +3601,9 @@ func cleanCmdResidueCommand(_ context.Context, name string, args ...string) ([]b
|
||||
}
|
||||
}
|
||||
|
||||
const cmdHelmNodeWide = `m01 Ready worker 10d v1.34.4+k3s1 192.168.1.181 <none> Ubuntu 24.04 6.8.0 containerd://2.0.0
|
||||
m02 Ready control-plane 10d v1.34.4+k3s1 192.168.1.184 <none> Ubuntu 24.04 6.8.0 containerd://2.0.0
|
||||
tp01 Ready worker 10d v1.34.4+k3s1 192.168.1.188 <none> Ubuntu 24.04 6.8.0 containerd://2.0.0
|
||||
const cmdHelmNodeWide = `node-a Ready worker 10d v1.34.4+k3s1 192.168.1.181 <none> Ubuntu 24.04 6.8.0 containerd://2.0.0
|
||||
node-b Ready control-plane 10d v1.34.4+k3s1 192.168.1.184 <none> Ubuntu 24.04 6.8.0 containerd://2.0.0
|
||||
node-c Ready worker 10d v1.34.4+k3s1 192.168.1.188 <none> Ubuntu 24.04 6.8.0 containerd://2.0.0
|
||||
bad1 Ready,SchedulingDisabled worker 10d v1.34.4+k3s1 192.168.1.199 <none> Ubuntu 24.04 6.8.0 containerd://2.0.0
|
||||
bad2 NotReady worker 10d v1.34.4+k3s1 192.168.1.200 <none> Ubuntu 24.04 6.8.0 containerd://2.0.0
|
||||
bad3 Ready worker 10d v1.34.4+k3s1 127.0.0.1 <none> Ubuntu 24.04 6.8.0 containerd://2.0.0
|
||||
@@ -3630,7 +3630,7 @@ const cmdSingleDeploymentListJSON = `{
|
||||
"labels":{"app":"sw-blockvolume","sw-block.seaweedfs.com/volume":"pvc-live","sw-block.seaweedfs.com/replica":"r1"},
|
||||
"ownerReferences":[{"kind":"PersistentVolumeClaim","name":"app-live","uid":"uid-live"}]
|
||||
},
|
||||
"spec":{"template":{"spec":{"nodeSelector":{"kubernetes.io/hostname":"m02"},"containers":[{"name":"blockvolume","args":["--server-id=m02","--volume-id=pvc-live","--replica-id=r1","--data-addr=127.0.0.1:19101","--ctrl-addr=127.0.0.1:19102","--status-addr=127.0.0.1:23260","--iscsi-listen=127.0.0.1:3260","--iscsi-iqn=iqn.2026-05.io.seaweedfs:pvc-live"]}]}}},
|
||||
"spec":{"template":{"spec":{"nodeSelector":{"kubernetes.io/hostname":"node-b"},"containers":[{"name":"blockvolume","args":["--server-id=node-b","--volume-id=pvc-live","--replica-id=r1","--data-addr=127.0.0.1:19101","--ctrl-addr=127.0.0.1:19102","--status-addr=127.0.0.1:23260","--iscsi-listen=127.0.0.1:3260","--iscsi-iqn=iqn.2026-05.io.seaweedfs:pvc-live"]}]}}},
|
||||
"status":{"replicas":1,"readyReplicas":1}
|
||||
}
|
||||
]
|
||||
@@ -3655,7 +3655,7 @@ func writeCmdObservationBundle(t *testing.T) string {
|
||||
{
|
||||
ReplicaID: "r2",
|
||||
ServerID: "node-loss-r2",
|
||||
NodeName: "m02",
|
||||
NodeName: "node-b",
|
||||
Observed: true,
|
||||
Protocol: "iscsi",
|
||||
FrontendAddress: "192.168.1.184:3260",
|
||||
@@ -3677,7 +3677,7 @@ func writeCmdObservationBundle(t *testing.T) string {
|
||||
{
|
||||
ReplicaID: "r3",
|
||||
ServerID: "node-loss-r3",
|
||||
NodeName: "tp01",
|
||||
NodeName: "node-c",
|
||||
Observed: true,
|
||||
Protocol: "iscsi",
|
||||
FrontendAddress: "192.168.1.188:3260",
|
||||
@@ -3705,7 +3705,7 @@ func writeCmdObservationBundle(t *testing.T) string {
|
||||
if err := os.WriteFile(filepath.Join(dir, "demo", ops.NodeLossRecoverySummaryArtifact), []byte(strings.Join([]string{
|
||||
"result=promoted",
|
||||
"ack_profile=sync-quorum",
|
||||
"promoted=r2@m02",
|
||||
"promoted=r2@node-b",
|
||||
"before_frontend=192.168.1.181:3260",
|
||||
"after_frontend=192.168.1.184:3260",
|
||||
"reader_verified=true",
|
||||
@@ -3731,7 +3731,7 @@ func writeCmdProductClusterBundle(t *testing.T) string {
|
||||
cluster.ProductRevision = "product-cluster-rev"
|
||||
cluster.Status = ops.ObservationStatusOK
|
||||
cluster.Nodes = []ops.NodeEvidence{{
|
||||
NodeName: "m02",
|
||||
NodeName: "node-b",
|
||||
InternalIP: "192.168.1.184",
|
||||
Schedulable: true,
|
||||
Ready: true,
|
||||
@@ -3748,11 +3748,11 @@ func writeCmdProductClusterBundle(t *testing.T) string {
|
||||
ObservedReplicas: 3,
|
||||
Status: ops.ObservationStatusOK,
|
||||
PrimaryReplica: "r2",
|
||||
PrimaryNode: "m02",
|
||||
PrimaryNode: "node-b",
|
||||
PublishTarget: "192.168.1.184:3260",
|
||||
Replicas: []ops.ReplicaEvidence{{
|
||||
ReplicaID: "r2",
|
||||
KubernetesNode: "m02",
|
||||
KubernetesNode: "node-b",
|
||||
Observed: true,
|
||||
Role: "primary",
|
||||
FrontendAddr: "192.168.1.184:3260",
|
||||
@@ -3796,7 +3796,7 @@ func writeCmdReturnedReplicaBundle(t *testing.T) string {
|
||||
ReplicationFactor: 2,
|
||||
Status: ops.ObservationStatusRecovering,
|
||||
PrimaryReplica: "r2",
|
||||
PrimaryNode: "m02",
|
||||
PrimaryNode: "node-b",
|
||||
PublishTarget: "192.168.1.184:3260",
|
||||
Epoch: 2,
|
||||
EndpointVersion: 1,
|
||||
@@ -3804,7 +3804,7 @@ func writeCmdReturnedReplicaBundle(t *testing.T) string {
|
||||
RequiredFrontierLSN: 4241,
|
||||
Replicas: []ops.ReplicaEvidence{{
|
||||
ReplicaID: "r1",
|
||||
KubernetesNode: "m01",
|
||||
KubernetesNode: "node-a",
|
||||
Observed: true,
|
||||
Role: "previous_primary",
|
||||
ReplicationRole: "replica_ready",
|
||||
@@ -3818,7 +3818,7 @@ func writeCmdReturnedReplicaBundle(t *testing.T) string {
|
||||
SupportBundlePath: "returned-replica-summary.txt",
|
||||
}, {
|
||||
ReplicaID: "r2",
|
||||
KubernetesNode: "m02",
|
||||
KubernetesNode: "node-b",
|
||||
Observed: true,
|
||||
Role: "primary",
|
||||
Healthy: true,
|
||||
@@ -3856,7 +3856,7 @@ func writeCmdReturnedReplicaRebuildBundle(t *testing.T) string {
|
||||
ReplicationFactor: 3,
|
||||
Status: ops.ObservationStatusRecovering,
|
||||
PrimaryReplica: "r2",
|
||||
PrimaryNode: "m02",
|
||||
PrimaryNode: "node-b",
|
||||
PublishTarget: "192.168.1.184:3260",
|
||||
Epoch: 3,
|
||||
EndpointVersion: 7,
|
||||
@@ -3864,7 +3864,7 @@ func writeCmdReturnedReplicaRebuildBundle(t *testing.T) string {
|
||||
RequiredFrontierLSN: 4241,
|
||||
Replicas: []ops.ReplicaEvidence{{
|
||||
ReplicaID: "r1",
|
||||
KubernetesNode: "m01",
|
||||
KubernetesNode: "node-a",
|
||||
Observed: true,
|
||||
Role: "previous_primary",
|
||||
ReplicationRole: "replica_behind",
|
||||
@@ -3878,7 +3878,7 @@ func writeCmdReturnedReplicaRebuildBundle(t *testing.T) string {
|
||||
SupportBundlePath: "returned-replica-rebuild-summary.txt",
|
||||
}, {
|
||||
ReplicaID: "r2",
|
||||
KubernetesNode: "m02",
|
||||
KubernetesNode: "node-b",
|
||||
Observed: true,
|
||||
Role: "primary",
|
||||
Healthy: true,
|
||||
@@ -4004,7 +4004,7 @@ func (cmdFakeClusterEvidenceServer) GetClusterStatus(context.Context, *control.G
|
||||
ObservedReplicas: 3,
|
||||
Status: ops.ObservationStatusOK,
|
||||
PrimaryReplica: "r2",
|
||||
PrimaryNode: "m02",
|
||||
PrimaryNode: "node-b",
|
||||
PublishTarget: "192.168.1.184:3260",
|
||||
Epoch: 2,
|
||||
EndpointVersion: 1,
|
||||
@@ -4014,7 +4014,7 @@ func (cmdFakeClusterEvidenceServer) GetClusterStatus(context.Context, *control.G
|
||||
EventTime: timestamppb.Now(),
|
||||
VolumeId: "v1",
|
||||
ReplicaId: "r2",
|
||||
NodeName: "m02",
|
||||
NodeName: "node-b",
|
||||
EventType: ops.EventTypeCSIReattachObserved,
|
||||
Severity: "info",
|
||||
Message: "CSI staged volume on node",
|
||||
|
||||
@@ -49,7 +49,7 @@ func TestEphemeralStateIsAnOptInThatSaysItLosesData(t *testing.T) {
|
||||
t.Helper()
|
||||
var stdout, stderr bytes.Buffer
|
||||
path := filepath.Join(t.TempDir(), "values.yaml")
|
||||
args := append([]string{"ops", "generate-helm-values", "--out", path, "--target-node", "m02", "--node-limit", "1",
|
||||
args := append([]string{"ops", "generate-helm-values", "--out", path, "--target-node", "node-b", "--node-limit", "1",
|
||||
"--image", "ghcr.io/seaweedfs/seaweed-block:sha-test", "--csi-image", "ghcr.io/seaweedfs/seaweed-block-csi:sha-test"}, extra...)
|
||||
if code := run(args, &stdout, &stderr); code != ops.VolumeStatusExitOK {
|
||||
t.Fatalf("generate %v: %d %s", extra, code, stderr.String())
|
||||
@@ -64,7 +64,7 @@ func TestEphemeralStateIsAnOptInThatSaysItLosesData(t *testing.T) {
|
||||
if !strings.Contains(out, "restart_persistence_mode=hostpath") || !strings.Contains(out, "master_state_hostpath=/var/lib/sw-block/k8s/master") || !strings.Contains(out, "volume_state_hostpath=/var/lib/sw-block/k8s/volumes") || strings.Contains(out, sentence) {
|
||||
t.Fatalf("default generate output:\n%s", out)
|
||||
}
|
||||
if !strings.Contains(vals, "stateHostPath: /var/lib/sw-block/k8s/master") || !strings.Contains(vals, "stateHostPath: /var/lib/sw-block/k8s/volumes") || !strings.Contains(vals, "kubernetes.io/hostname: m02") {
|
||||
if !strings.Contains(vals, "stateHostPath: /var/lib/sw-block/k8s/master") || !strings.Contains(vals, "stateHostPath: /var/lib/sw-block/k8s/volumes") || !strings.Contains(vals, "kubernetes.io/hostname: node-b") {
|
||||
t.Fatalf("default values do not pin blockmaster with its state path:\n%s", vals)
|
||||
}
|
||||
out, vals = gen("--restart-persistence", "ephemeral")
|
||||
|
||||
@@ -510,6 +510,10 @@ func (c *TopologyController) decideVolume(
|
||||
Intent: IntentReassign,
|
||||
Evidence: plannedEvidence(target.PromotionEvidence),
|
||||
Incarnation: target.Incarnation,
|
||||
// Decided against the line read for this intake: a line
|
||||
// published directly since (an operator's failover) refuses
|
||||
// it, so a queued rebalance never overrides that line.
|
||||
ExpectCurrent: &ExpectedLine{ReplicaID: currentLine.ReplicaID, Epoch: currentLine.Epoch, DataAddr: currentLine.DataAddr, CtrlAddr: currentLine.CtrlAddr},
|
||||
}, "rebalance", true
|
||||
}
|
||||
return AssignmentAsk{}, "", false
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
package authority
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
// A rebalance is decided against the line the controller read and waits in
|
||||
// the queue until the publisher takes it. A line published directly in that
|
||||
// window (an operator's failover) must not be overridden by the queued
|
||||
// rebalance: the publisher refuses it because the line moved, and the line
|
||||
// the operator published stays.
|
||||
func TestAQueuedRebalanceIsNotMintedOverALineMovedSinceItWasDecided(t *testing.T) {
|
||||
holder := &basisReaderHolder{}
|
||||
ctrl := NewTopologyController(TopologyControllerConfig{RebalanceSkew: 1}, holder)
|
||||
pub := NewPublisher(ctrl)
|
||||
holder.set(pub)
|
||||
for _, seed := range []AssignmentAsk{
|
||||
{VolumeID: "v1", ReplicaID: "v1r1", DataAddr: "d11", CtrlAddr: "c11", Intent: IntentBind},
|
||||
{VolumeID: "v2", ReplicaID: "v2r1", DataAddr: "d21", CtrlAddr: "c21", Intent: IntentBind},
|
||||
{VolumeID: "v3", ReplicaID: "v3r2", DataAddr: "d32", CtrlAddr: "c32", Intent: IntentBind},
|
||||
} {
|
||||
if err := pub.apply(seed); err != nil {
|
||||
t.Fatalf("seed %s: %v", seed.VolumeID, err)
|
||||
}
|
||||
}
|
||||
// s1 carries two primaries, s3 none: the controller decides v1's
|
||||
// rebalance to v1r3 against v1r1@1 and queues it (the publisher is not
|
||||
// draining yet).
|
||||
snap := ClusterSnapshot{
|
||||
CollectedRevision: 1,
|
||||
Servers: []ServerObservation{
|
||||
{ServerID: "s1", Reachable: true, Eligible: true},
|
||||
{ServerID: "s2", Reachable: true, Eligible: true},
|
||||
{ServerID: "s3", Reachable: true, Eligible: true},
|
||||
},
|
||||
Volumes: []VolumeTopologySnapshot{
|
||||
clusterVolume("v1", observedAuthorityFrom(pub, "v1"),
|
||||
candidate("v1r1", "s1", "d11", "c11", 10),
|
||||
candidate("v1r2", "s2", "d12", "c12", 10),
|
||||
candidate("v1r3", "s3", "d13", "c13", 30),
|
||||
),
|
||||
clusterVolume("v2", observedAuthorityFrom(pub, "v2"),
|
||||
candidate("v2r1", "s1", "d21", "c21", 10),
|
||||
candidate("v2r2", "s2", "d22", "c22", 10),
|
||||
candidate("v2r3", "s3", "d23", "c23", 10),
|
||||
),
|
||||
clusterVolume("v3", observedAuthorityFrom(pub, "v3"),
|
||||
candidate("v3r1", "s1", "d31", "c31", 10),
|
||||
candidate("v3r2", "s2", "d32", "c32", 10),
|
||||
candidate("v3r3", "s3", "d33", "c33", 10),
|
||||
),
|
||||
},
|
||||
}
|
||||
if err := ctrl.SubmitClusterSnapshot(snap); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if d, ok := ctrl.DesiredFor("v1"); !ok || d.Ask.ReplicaID != "v1r3" || d.Reason != "rebalance" {
|
||||
t.Fatalf("fixture: v1's desired %+v (ok=%v), want the rebalance to v1r3 queued", d, ok)
|
||||
}
|
||||
|
||||
// The operator's failover publishes v1r2 directly, at the next epoch.
|
||||
operator := candidate("v1r2", "s2", "d12", "c12", 10).PromotionEvidence
|
||||
if err := pub.apply(AssignmentAsk{VolumeID: "v1", ReplicaID: "v1r2", DataAddr: "d12", CtrlAddr: "c12", Intent: IntentReassign, Evidence: operator}); err != nil {
|
||||
t.Fatalf("the operator's failover: %v", err)
|
||||
}
|
||||
moved, _ := pub.VolumeAuthorityLine("v1")
|
||||
if moved.ReplicaID != "v1r2" || moved.Epoch != 2 {
|
||||
t.Fatalf("fixture: line after the failover %+v, want v1r2@2", moved)
|
||||
}
|
||||
|
||||
// The publisher now takes the queued rebalance.
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
|
||||
defer cancel()
|
||||
ask, err := ctrl.Next(ctx)
|
||||
if err != nil || ask.VolumeID != "v1" || ask.ReplicaID != "v1r3" {
|
||||
t.Fatalf("fixture: took %+v %v, want the queued rebalance of v1 to v1r3", ask, err)
|
||||
}
|
||||
applyErr := pub.apply(ask)
|
||||
line, _ := pub.VolumeAuthorityLine("v1")
|
||||
if line.ReplicaID != "v1r2" || line.Epoch != 2 {
|
||||
t.Fatalf("the queued rebalance overrode the operator's failover: line %+v (apply: %v), want v1r2@2 kept", line, applyErr)
|
||||
}
|
||||
if !errors.Is(applyErr, ErrExpectedLineMoved) {
|
||||
t.Fatalf("the stale rebalance was refused with %v, want ErrExpectedLineMoved", applyErr)
|
||||
}
|
||||
}
|
||||
@@ -216,7 +216,7 @@ func TestNVMePairedFlushCrashRecovery(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// Opt-in serial tp04 proxy; neither a guest filesystem benchmark nor a gate.
|
||||
// Opt-in serial lab-host proxy; neither a guest filesystem benchmark nor a gate.
|
||||
func TestNVMePairedFlushLatency(t *testing.T) {
|
||||
if os.Getenv("SW_BLOCK_SYNC_PERF") != "1" {
|
||||
t.Skip("opt-in file-backed latency characterization")
|
||||
|
||||
@@ -21,7 +21,7 @@ func TestMasterTimeline_RecordsPlacementVerified(t *testing.T) {
|
||||
})
|
||||
defer closeTestMaster(t, h)
|
||||
seedObservationSnapshotVolume(t, h)
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "m01", "m02", "tp01")
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "node-a", "node-b", "node-c")
|
||||
ingestObservationSnapshotRF3(t, h, true, true, true)
|
||||
|
||||
if _, err := h.RunLifecycleProductTick(); err != nil {
|
||||
@@ -42,7 +42,7 @@ func TestMasterTimeline_RecordsPromotionCandidateEvaluation(t *testing.T) {
|
||||
})
|
||||
defer closeTestMaster(t, h)
|
||||
seedObservationSnapshotVolume(t, h)
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "m01", "m02", "tp01")
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "node-a", "node-b", "node-c")
|
||||
ingestObservationSnapshotRF3(t, h, true, true, true)
|
||||
if _, err := h.RunLifecycleProductTick(); err != nil {
|
||||
t.Fatalf("initial product tick: %v", err)
|
||||
@@ -65,7 +65,7 @@ func TestMasterTimeline_RecordsPromotionCandidateEvaluation(t *testing.T) {
|
||||
},
|
||||
},
|
||||
})
|
||||
ingestRF3ObservationForServersWithReady(t, h, "pvc-a", "m01", "m02", "tp01",
|
||||
ingestRF3ObservationForServersWithReady(t, h, "pvc-a", "node-a", "node-b", "node-c",
|
||||
false, false,
|
||||
true, true,
|
||||
true, true)
|
||||
@@ -91,7 +91,7 @@ func TestMasterTimeline_RecordsAuthorityPublishedAfterMint(t *testing.T) {
|
||||
})
|
||||
defer closeTestMaster(t, h)
|
||||
seedObservationSnapshotVolume(t, h)
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "m01", "m02", "tp01")
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "node-a", "node-b", "node-c")
|
||||
ingestObservationSnapshotRF3(t, h, true, true, true)
|
||||
|
||||
if _, err := h.RunLifecycleProductTick(); err != nil {
|
||||
@@ -114,7 +114,7 @@ func TestClusterEvidenceService_WatchClusterEventsCursor(t *testing.T) {
|
||||
})
|
||||
defer closeTestMaster(t, h)
|
||||
seedObservationSnapshotVolume(t, h)
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "m01", "m02", "tp01")
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "node-a", "node-b", "node-c")
|
||||
ingestObservationSnapshotRF3(t, h, true, true, true)
|
||||
|
||||
if _, err := h.RunLifecycleProductTick(); err != nil {
|
||||
@@ -164,7 +164,7 @@ func TestClusterEvidenceService_WatchClusterEventsStreamsNewEvents(t *testing.T)
|
||||
})
|
||||
defer closeTestMaster(t, h)
|
||||
seedObservationSnapshotVolume(t, h)
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "m01", "m02", "tp01")
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "node-a", "node-b", "node-c")
|
||||
ingestObservationSnapshotRF3(t, h, true, true, true)
|
||||
|
||||
if _, err := h.RunLifecycleProductTick(); err != nil {
|
||||
@@ -198,7 +198,7 @@ func TestClusterEvidenceService_WatchClusterEventsStreamsNewEvents(t *testing.T)
|
||||
EventType: "csi_reattach_observed",
|
||||
Severity: "info",
|
||||
VolumeId: "pvc-a",
|
||||
NodeName: "m02",
|
||||
NodeName: "node-b",
|
||||
NewValue: "10.0.0.2:3260",
|
||||
}); err != nil {
|
||||
t.Fatalf("report event: %v", err)
|
||||
|
||||
@@ -174,7 +174,7 @@ func (h *Host) formatLevel() uint32 { return h.format.v.Load() }
|
||||
// formatEligible reports whether server may be GRANTED work (an authority
|
||||
// line published to it, and with it its lease) at the cluster's format
|
||||
// level: its own report says its binary reads that level; no report means
|
||||
// no grant (r2.875: NoStrand holds at grant). At level 0 every server is.
|
||||
// no grant (NoStrand holds at the grant). At level 0 every server is.
|
||||
func (h *Host) formatEligible(server string) bool {
|
||||
level := h.formatLevel()
|
||||
if level == 0 {
|
||||
@@ -277,7 +277,7 @@ func (h *Host) grantWaits(now time.Time) map[string][]grantWaitEntry {
|
||||
|
||||
// placementTooOld names why server may not be chosen as a placement target
|
||||
// (create, move, restore target, a failover candidate), or "" when it may:
|
||||
// only a KNOWN-old report refuses (r2.875). An unknown server is placeable,
|
||||
// only a KNOWN-old report refuses. An unknown server is placeable,
|
||||
// since with one process per volume and create-then-start a placement target
|
||||
// cannot have reported yet; the grant (formatTooOld) still needs its report.
|
||||
func (h *Host) placementTooOld(server string) string {
|
||||
|
||||
@@ -47,7 +47,7 @@ func binaryTooOld(err error) bool {
|
||||
}
|
||||
|
||||
// Every binary's heartbeat is taken and its read level recorded, at level 0
|
||||
// and at level 1 alike (r2.881: the refusal is at the grant, never at the
|
||||
// and at level 1 alike (the refusal is at the grant, never at the
|
||||
// heartbeat); at level 1 a host whose process reads only level 0 is then
|
||||
// known old, so placement skips it (its grant is refused at the publication
|
||||
// boundary: TestThePublicationBoundaryRefusesAnAskForAnOldServer).
|
||||
@@ -95,7 +95,7 @@ func TestFormatGateRefusesPlacementAndMoveOntoAnOldHost(t *testing.T) {
|
||||
TargetServerId: "node-b", TargetDataAddr: "127.0.0.1:19301", TargetCtrlAddr: "127.0.0.1:19302", Kind: "clean"})
|
||||
if level == 0 || !reported {
|
||||
// level 0, or an unknown (silent) host at level 1: placeable
|
||||
// (r2.875: placement refuses only a known-old report; the
|
||||
// (placement refuses only a known-old report; the
|
||||
// grant needs the holder's report).
|
||||
if placeErr != nil {
|
||||
t.Fatalf("%s: placement refused: %v", name, placeErr)
|
||||
@@ -142,7 +142,7 @@ func TestFormatGateRefusesPlacementAndMoveOntoAnOldHost(t *testing.T) {
|
||||
|
||||
// At level 1 the product loop never places a new volume on a host known to
|
||||
// read a lower level, and does on one that reads it, or that has not
|
||||
// reported yet (r2.875: unknown is placeable; the grant waits for its report).
|
||||
// reported yet (unknown is placeable; the grant waits for its report).
|
||||
func TestFormatGateProductLoopPlacesOnlyOnHostsThatReadTheLevel(t *testing.T) {
|
||||
const silent = ^uint32(0)
|
||||
for _, reads := range []uint32{0, 1, silent} {
|
||||
|
||||
@@ -74,7 +74,7 @@ func TestANewClusterStartsAtTheCurrentFormatLevel(t *testing.T) {
|
||||
// placement) and shows as awaiting report; it is not granted until its own
|
||||
// report: the publication of its line is refused and its publish never runs;
|
||||
// after its first heartbeat (reads level 1) the line is published and the
|
||||
// condition is gone (r2.875).
|
||||
// condition is gone.
|
||||
func TestANewClusterPlacesAnUnreportedNodeAndGrantsAfterItsReport(t *testing.T) {
|
||||
r := newIsolationRig(t, false, t.TempDir(), t.TempDir())
|
||||
if r.m.formatLevel() != 1 {
|
||||
@@ -206,7 +206,7 @@ func TestTheGrantReadsTheHoldersOwnReportNotASiblings(t *testing.T) {
|
||||
// On a new cluster an idle unreported host is info: the cluster stays ok. A
|
||||
// host that holds a placed volume waiting for its grant past the startup
|
||||
// window is a warning: the nodes degrade the cluster and the condition names
|
||||
// the volume and its wait (r2.877). Before the window it is still info.
|
||||
// the volume and its wait. Before the window it is still info.
|
||||
func TestAnIdleUnreportedHostLeavesTheClusterOKALateGrantDegradesIt(t *testing.T) {
|
||||
r := newIsolationRig(t, false, t.TempDir(), t.TempDir())
|
||||
if _, err := r.m.Lifecycle().Nodes.RegisterNode(lifecycle.NodeRegistration{ServerID: "node-b", DataAddr: "127.0.0.1:19321", CtrlAddr: "127.0.0.1:19322"}); err != nil {
|
||||
|
||||
@@ -326,7 +326,7 @@ func New(cfg Config) (*Host, error) {
|
||||
_ = boot.Close()
|
||||
return nil, fmt.Errorf("master.New: lifecycle stores: %w", err)
|
||||
}
|
||||
// A new cluster starts at the current level (r2.869): with no prior
|
||||
// A new cluster starts at the current level: with no prior
|
||||
// state in any master store (no authority record reloaded or skipped, no
|
||||
// attestation file, no volume, node, placement or deletion in the
|
||||
// lifecycle stores), the master writes the level-1 envelope durably now,
|
||||
|
||||
@@ -21,7 +21,7 @@ func TestClusterEvidenceService_GetClusterStatusSharesObservationSnapshot(t *tes
|
||||
})
|
||||
defer closeTestMaster(t, h)
|
||||
seedObservationSnapshotVolume(t, h)
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "m01", "m02", "tp01")
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "node-a", "node-b", "node-c")
|
||||
ingestObservationSnapshotRF3(t, h, true, true, true)
|
||||
if _, err := h.RunLifecycleProductTick(); err != nil {
|
||||
t.Fatalf("product tick: %v", err)
|
||||
@@ -57,7 +57,7 @@ func TestClusterEvidenceService_GetClusterStatusSharesObservationSnapshot(t *tes
|
||||
|
||||
func TestNodeEvidenceToWirePreservesFrontendAddress(t *testing.T) {
|
||||
wire := nodeEvidenceToWire(ops.NodeEvidence{
|
||||
NodeName: "m01",
|
||||
NodeName: "node-a",
|
||||
InternalIP: "192.168.1.181",
|
||||
FrontendIP: "10.0.0.1",
|
||||
FrontendNetworkClass: "100gbe_tcp",
|
||||
@@ -84,7 +84,7 @@ func TestClusterEvidenceService_GRPCRegistered(t *testing.T) {
|
||||
})
|
||||
defer closeTestMaster(t, h)
|
||||
seedObservationSnapshotVolume(t, h)
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "m01", "m02", "tp01")
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "node-a", "node-b", "node-c")
|
||||
ingestObservationSnapshotRF3(t, h, true, true, true)
|
||||
if _, err := h.RunLifecycleProductTick(); err != nil {
|
||||
t.Fatalf("product tick: %v", err)
|
||||
@@ -113,7 +113,7 @@ func TestClusterEvidenceService_ListVolumesAndGetVolumeStatus(t *testing.T) {
|
||||
})
|
||||
defer closeTestMaster(t, h)
|
||||
seedObservationSnapshotVolume(t, h)
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "m01", "m02", "tp01")
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "node-a", "node-b", "node-c")
|
||||
ingestObservationSnapshotRF3(t, h, true, true, false)
|
||||
if _, err := h.RunLifecycleProductTick(); err != nil {
|
||||
t.Fatalf("product tick: %v", err)
|
||||
@@ -176,7 +176,7 @@ func TestObservationService_ReportClusterEventAppearsInVolumeTimeline(t *testing
|
||||
EventTime: timestamppb.New(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
|
||||
VolumeId: "pvc-a",
|
||||
ReplicaId: "r2",
|
||||
NodeName: "m02",
|
||||
NodeName: "node-b",
|
||||
EventType: "csi_reattach_observed",
|
||||
Severity: "warning",
|
||||
Message: "authority_published spoof",
|
||||
@@ -232,7 +232,7 @@ func TestObservationService_ReportClusterEventRejectsAuthorityOwnedType(t *testi
|
||||
|
||||
_, err := newServices(h).ReportClusterEvent(context.Background(), &control.ClusterEvent{
|
||||
VolumeId: "pvc-a",
|
||||
NodeName: "m02",
|
||||
NodeName: "node-b",
|
||||
EventType: "authority_published",
|
||||
Severity: "info",
|
||||
})
|
||||
@@ -246,7 +246,7 @@ func TestObservationService_ReportClusterEventRejectsCSIEventWithoutVolumeOrNode
|
||||
defer closeTestMaster(t, h)
|
||||
|
||||
_, err := newServices(h).ReportClusterEvent(context.Background(), &control.ClusterEvent{
|
||||
NodeName: "m02",
|
||||
NodeName: "node-b",
|
||||
EventType: "csi_reattach_observed",
|
||||
Severity: "info",
|
||||
})
|
||||
|
||||
@@ -37,7 +37,7 @@ func (h *Host) ObservationSnapshot(now time.Time) ops.ClusterEvidence {
|
||||
}
|
||||
// Info while the node is idle or its placed volumes wait within their
|
||||
// startup window; a warning (the cluster degraded) once one has waited
|
||||
// for its grant past the window (r2.877). Each wait is shown, before
|
||||
// for its grant past the window. Each wait is shown, before
|
||||
// it is late too.
|
||||
severity := "info"
|
||||
message := fmt.Sprintf("awaiting report: no grant to a process of this node before its own report (cluster format level %d)", h.formatLevel())
|
||||
|
||||
@@ -15,7 +15,7 @@ func TestMasterObservationSnapshot_RF3HealthyReadOnly(t *testing.T) {
|
||||
})
|
||||
defer closeTestMaster(t, h)
|
||||
seedObservationSnapshotVolume(t, h)
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "m01", "m02", "tp01")
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "node-a", "node-b", "node-c")
|
||||
ingestObservationSnapshotRF3(t, h, true, true, true)
|
||||
|
||||
if _, err := h.RunLifecycleProductTick(); err != nil {
|
||||
@@ -66,17 +66,17 @@ func TestMasterObservationSnapshot_SeparatesManagementAndFrontendNodeAddress(t *
|
||||
h := newTestMaster(t, t.TempDir())
|
||||
defer closeTestMaster(t, h)
|
||||
if _, err := h.Lifecycle().Nodes.RegisterNode(lifecycle.NodeRegistration{
|
||||
ServerID: "m01",
|
||||
ServerID: "node-a",
|
||||
DataAddr: "10.0.0.181:19101",
|
||||
CtrlAddr: "192.168.1.181:19102",
|
||||
Labels: map[string]string{
|
||||
lifecycle.KubernetesNodeNameLabel: "m01",
|
||||
lifecycle.KubernetesNodeNameLabel: "node-a",
|
||||
lifecycle.ManagementIPLabel: "192.168.1.181",
|
||||
lifecycle.FrontendIPLabel: "10.0.0.181",
|
||||
lifecycle.FrontendNetworkClassLabel: "100gbe_tcp",
|
||||
},
|
||||
Pools: []lifecycle.StoragePool{{
|
||||
PoolID: "pool-m01",
|
||||
PoolID: "pool-node-a",
|
||||
TotalBytes: 1 << 30,
|
||||
FreeBytes: 1 << 30,
|
||||
BlockSize: 4096,
|
||||
@@ -104,7 +104,7 @@ func TestMasterObservationSnapshot_MissingReplicaIsDegraded(t *testing.T) {
|
||||
})
|
||||
defer closeTestMaster(t, h)
|
||||
seedObservationSnapshotVolume(t, h)
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "m01", "m02", "tp01")
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "node-a", "node-b", "node-c")
|
||||
ingestObservationSnapshotRF3(t, h, true, true, false)
|
||||
|
||||
if _, err := h.RunLifecycleProductTick(); err != nil {
|
||||
@@ -139,7 +139,7 @@ func TestMasterObservationSnapshot_PrimaryMustConfirmReadiness(t *testing.T) {
|
||||
})
|
||||
defer closeTestMaster(t, h)
|
||||
seedObservationSnapshotVolume(t, h)
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "m01", "m02", "tp01")
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "node-a", "node-b", "node-c")
|
||||
ingestObservationSnapshotRF3(t, h, true, true, true)
|
||||
|
||||
if _, err := h.RunLifecycleProductTick(); err != nil {
|
||||
@@ -203,7 +203,7 @@ func TestMasterObservationSnapshot_PreservesNVMeFrontendIdentityInVolumeEvidence
|
||||
DesiredRF: 1,
|
||||
Candidates: []lifecycle.PlacementCandidate{{
|
||||
VolumeID: "pvc-nvme",
|
||||
ServerID: "m01",
|
||||
ServerID: "node-a",
|
||||
ReplicaID: "r1",
|
||||
Source: lifecycle.PlacementSourceExistingReplica,
|
||||
}},
|
||||
@@ -211,7 +211,7 @@ func TestMasterObservationSnapshot_PreservesNVMeFrontendIdentityInVolumeEvidence
|
||||
t.Fatalf("apply placement: %v", err)
|
||||
}
|
||||
if err := ingestV11(h, authority.Observation{
|
||||
ServerID: "m01",
|
||||
ServerID: "node-a",
|
||||
ObservedAt: time.Now().UTC(),
|
||||
Server: authority.ServerFact{Reachable: true, Eligible: true},
|
||||
Slots: []authority.SlotFact{{
|
||||
@@ -264,9 +264,9 @@ func seedObservationSnapshotVolume(t *testing.T, h *Host) {
|
||||
serverID string
|
||||
ip string
|
||||
}{
|
||||
{serverID: "m01", ip: "192.168.1.181"},
|
||||
{serverID: "m02", ip: "192.168.1.184"},
|
||||
{serverID: "tp01", ip: "192.168.1.188"},
|
||||
{serverID: "node-a", ip: "192.168.1.181"},
|
||||
{serverID: "node-b", ip: "192.168.1.184"},
|
||||
{serverID: "node-c", ip: "192.168.1.188"},
|
||||
} {
|
||||
if _, err := h.Lifecycle().Nodes.RegisterNode(lifecycle.NodeRegistration{
|
||||
ServerID: node.serverID,
|
||||
@@ -312,9 +312,9 @@ func ingestObservationSnapshotReplica(t *testing.T, h *Host, replica string, rea
|
||||
ip string
|
||||
score uint64
|
||||
}{
|
||||
"r1": {serverID: "m01", ip: "192.168.1.181", score: 30},
|
||||
"r2": {serverID: "m02", ip: "192.168.1.184", score: 29},
|
||||
"r3": {serverID: "tp01", ip: "192.168.1.188", score: 28},
|
||||
"r1": {serverID: "node-a", ip: "192.168.1.181", score: 30},
|
||||
"r2": {serverID: "node-b", ip: "192.168.1.184", score: 29},
|
||||
"r3": {serverID: "node-c", ip: "192.168.1.188", score: 28},
|
||||
}[replica]
|
||||
if !ok {
|
||||
t.Fatalf("unknown replica %s", replica)
|
||||
|
||||
@@ -166,7 +166,7 @@ func TestPortalAndPrimaryComeFromTheLineServerNotTheFreshestHeartbeat(t *testing
|
||||
h := newTestMasterWithControllerConfig(t, t.TempDir(), authority.TopologyControllerConfig{ExpectedSlotsPerVolume: 3})
|
||||
defer closeTestMaster(t, h)
|
||||
seedObservationSnapshotVolume(t, h)
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "m01", "m02", "tp01")
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "node-a", "node-b", "node-c")
|
||||
ingestObservationSnapshotRF3(t, h, true, true, true)
|
||||
if _, err := h.RunLifecycleProductTick(); err != nil {
|
||||
t.Fatalf("product tick: %v", err)
|
||||
@@ -179,7 +179,7 @@ func TestPortalAndPrimaryComeFromTheLineServerNotTheFreshestHeartbeat(t *testing
|
||||
}
|
||||
holderAddr := own.Frontends[0].Addr
|
||||
stale := ""
|
||||
for _, server := range []string{"m01", "m02", "tp01"} { // the fixture's placement servers
|
||||
for _, server := range []string{"node-a", "node-b", "node-c"} { // the fixture's placement servers
|
||||
if server != holder {
|
||||
stale = server
|
||||
break
|
||||
@@ -348,7 +348,7 @@ func TestCSIPublishesNoTargetWhenThePrimaryFrontendIsMissingOrRejected(t *testin
|
||||
h := newTestMasterWithControllerConfig(t, t.TempDir(), authority.TopologyControllerConfig{ExpectedSlotsPerVolume: 3})
|
||||
defer closeTestMaster(t, h)
|
||||
seedObservationSnapshotVolume(t, h)
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "m01", "m02", "tp01")
|
||||
seedRF3PlacementForServers(t, h, "pvc-a", "node-a", "node-b", "node-c")
|
||||
ingestObservationSnapshotRF3(t, h, true, true, true)
|
||||
if _, err := h.RunLifecycleProductTick(); err != nil {
|
||||
t.Fatalf("product tick: %v", err)
|
||||
|
||||
@@ -555,7 +555,7 @@ func (s *services) ReportHeartbeat(ctx context.Context, r *control.HeartbeatRepo
|
||||
return nil, status.Error(codes.FailedPrecondition, err.Error())
|
||||
}
|
||||
// The format gate: the reporting process's read level is recorded and
|
||||
// the heartbeat accepted whatever it reads (r2.881). An old binary is
|
||||
// the heartbeat accepted whatever it reads. An old binary is
|
||||
// refused where it matters: placement skips a host known to read a
|
||||
// lower level, and the grant (publication) refuses a holder process
|
||||
// whose own report is below the cluster's level, typed binary_too_old.
|
||||
|
||||
@@ -108,7 +108,7 @@ func loadStoreAttestations(dir string) (*storeAttestations, error) {
|
||||
// newClusterAtStart says a starting master holds no prior state in any of
|
||||
// its stores: no authority record reloaded or skipped, no attestation file,
|
||||
// and empty lifecycle stores. Only then does it start at the current format
|
||||
// level (r2.869, FormatGate Init); any existing state reads its own level
|
||||
// level (FormatGate Init); any existing state reads its own level
|
||||
// (an upgrade starts at 0; an empty authority store over an existing
|
||||
// inventory is not new).
|
||||
func newClusterAtStart(reloaded, skipped int, attestationAbsent, lifecycleEmpty bool) bool {
|
||||
|
||||
@@ -5,7 +5,7 @@ import "github.com/seaweedfs/seaweed-block/core/authority"
|
||||
// ingestV11 ingests obs as a v1.1 volume host's heartbeat delivers it: the
|
||||
// facts, and the reads_level (1) of each slot's process, which the
|
||||
// heartbeat carries and a direct ingest skips. A new cluster starts at
|
||||
// format level 1 (r2.869), where a server with no reported level counts as
|
||||
// format level 1, where a server with no reported level counts as
|
||||
// old; the tests' fake hosts are v1.1 hosts unless a test says otherwise.
|
||||
func ingestV11(h *Host, obs authority.Observation) error {
|
||||
server := obs.ServerID
|
||||
|
||||
@@ -281,7 +281,7 @@ func (h *Host) admitWorkspacePublicationNow(ask authority.AssignmentAsk, publish
|
||||
epoch = line.Epoch
|
||||
}
|
||||
server := h.workspaceSourceHost(ask.VolumeID, ask.ReplicaID, epoch)
|
||||
// The format gate at the grant (r2.875): an authority line is published
|
||||
// The format gate at the grant: an authority line is published
|
||||
// only to a server whose own report reads the cluster's level; no report
|
||||
// means no grant (the ask waits for it), and an ask decided on
|
||||
// observations taken before its server reported a lower level is not
|
||||
|
||||
@@ -464,7 +464,7 @@ func (s *services) workspaceMoveCheckLocked(q *control.WorkspaceMove) (req autho
|
||||
case !replay && s.host.colocatedTargetRefused(target.ServerID):
|
||||
refusal.text = fmt.Sprintf("move target node %q shares the authority store's file system (strict journal isolation)", target.ServerID)
|
||||
case !replay && s.host.placementTooOld(target.ServerID) != "":
|
||||
// Only a known-old report refuses a move target (r2.875); the
|
||||
// Only a known-old report refuses a move target; the
|
||||
// target's line is granted only after its own report.
|
||||
refusal = moveRefusal{"move target " + s.host.placementTooOld(target.ServerID), s.host.formatTooOldReason(target.ServerID)}
|
||||
case !matched:
|
||||
|
||||
@@ -14,23 +14,23 @@ func TestPhase37D2KubernetesNodeEvidenceEnrichesReadyAndBlockedNodes(t *testing.
|
||||
switch r.URL.Path {
|
||||
case "/api/v1/nodes":
|
||||
_, _ = w.Write([]byte(`{"items":[
|
||||
{"metadata":{"name":"m01"},"spec":{},"status":{"addresses":[{"type":"InternalIP","address":"192.168.1.181"}],"conditions":[{"type":"Ready","status":"True"}]}},
|
||||
{"metadata":{"name":"m02"},"spec":{"unschedulable":true},"status":{"addresses":[{"type":"InternalIP","address":"192.168.1.184"}],"conditions":[{"type":"Ready","status":"False"}]}}
|
||||
{"metadata":{"name":"node-a"},"spec":{},"status":{"addresses":[{"type":"InternalIP","address":"192.168.1.181"}],"conditions":[{"type":"Ready","status":"True"}]}},
|
||||
{"metadata":{"name":"node-b"},"spec":{"unschedulable":true},"status":{"addresses":[{"type":"InternalIP","address":"192.168.1.184"}],"conditions":[{"type":"Ready","status":"False"}]}}
|
||||
]}`))
|
||||
case "/api/v1/namespaces/kube-system/pods":
|
||||
if got := r.URL.Query().Get("labelSelector"); got != "app=sw-block-csi-node" {
|
||||
t.Fatalf("labelSelector=%q", got)
|
||||
}
|
||||
_, _ = w.Write([]byte(`{"items":[
|
||||
{"metadata":{"name":"csi-m01"},"spec":{"nodeName":"m01"},"status":{"conditions":[{"type":"Ready","status":"True"}]}},
|
||||
{"metadata":{"name":"csi-m02"},"spec":{"nodeName":"m02"},"status":{"conditions":[{"type":"Ready","status":"True"}]}}
|
||||
{"metadata":{"name":"csi-node-a"},"spec":{"nodeName":"node-a"},"status":{"conditions":[{"type":"Ready","status":"True"}]}},
|
||||
{"metadata":{"name":"csi-node-b"},"spec":{"nodeName":"node-b"},"status":{"conditions":[{"type":"Ready","status":"True"}]}}
|
||||
]}`))
|
||||
case "/apis/storage.k8s.io/v1/csidrivers/block.csi.seaweedfs.com":
|
||||
_, _ = w.Write([]byte(`{"metadata":{"name":"block.csi.seaweedfs.com"}}`))
|
||||
case "/apis/storage.k8s.io/v1/csinodes":
|
||||
_, _ = w.Write([]byte(`{"items":[
|
||||
{"metadata":{"name":"m01"},"spec":{"drivers":[{"name":"block.csi.seaweedfs.com"}]}},
|
||||
{"metadata":{"name":"m02"},"spec":{"drivers":[{"name":"block.csi.seaweedfs.com"}]}}
|
||||
{"metadata":{"name":"node-a"},"spec":{"drivers":[{"name":"block.csi.seaweedfs.com"}]}},
|
||||
{"metadata":{"name":"node-b"},"spec":{"drivers":[{"name":"block.csi.seaweedfs.com"}]}}
|
||||
]}`))
|
||||
default:
|
||||
t.Fatalf("unexpected Kubernetes API path %s", r.URL.String())
|
||||
@@ -42,8 +42,8 @@ func TestPhase37D2KubernetesNodeEvidenceEnrichesReadyAndBlockedNodes(t *testing.
|
||||
cluster := ClusterEvidence{
|
||||
CapturedAt: time.Date(2026, 6, 6, 12, 0, 0, 0, time.UTC),
|
||||
Nodes: []NodeEvidence{{
|
||||
NodeName: "m01",
|
||||
KubernetesNode: "m01",
|
||||
NodeName: "node-a",
|
||||
KubernetesNode: "node-a",
|
||||
LastHeartbeatAt: time.Date(2026, 6, 6, 11, 59, 0, 0, time.UTC),
|
||||
ReplicaCount: 1,
|
||||
}},
|
||||
@@ -56,32 +56,32 @@ func TestPhase37D2KubernetesNodeEvidenceEnrichesReadyAndBlockedNodes(t *testing.
|
||||
if len(enriched.Nodes) != 2 {
|
||||
t.Fatalf("nodes=%+v", enriched.Nodes)
|
||||
}
|
||||
m01 := nodeByKubernetesName(t, enriched.Nodes, "m01")
|
||||
if !m01.Ready || !m01.Schedulable || m01.InternalIP != "192.168.1.181" || m01.ReplicaCount != 1 {
|
||||
t.Fatalf("m01 evidence=%+v", m01)
|
||||
nodeA := nodeByKubernetesName(t, enriched.Nodes, "node-a")
|
||||
if !nodeA.Ready || !nodeA.Schedulable || nodeA.InternalIP != "192.168.1.181" || nodeA.ReplicaCount != 1 {
|
||||
t.Fatalf("nodeA evidence=%+v", nodeA)
|
||||
}
|
||||
status, reason := classifyNodeReadiness(m01)
|
||||
status, reason := classifyNodeReadiness(nodeA)
|
||||
if status != ManagedVolumeStatusReady || reason != ReasonNodeReady {
|
||||
t.Fatalf("m01 status=%s reason=%s", status, reason)
|
||||
t.Fatalf("nodeA status=%s reason=%s", status, reason)
|
||||
}
|
||||
m02 := nodeByKubernetesName(t, enriched.Nodes, "m02")
|
||||
if m02.Ready || m02.Schedulable {
|
||||
t.Fatalf("m02 raw facts=%+v", m02)
|
||||
nodeB := nodeByKubernetesName(t, enriched.Nodes, "node-b")
|
||||
if nodeB.Ready || nodeB.Schedulable {
|
||||
t.Fatalf("nodeB raw facts=%+v", nodeB)
|
||||
}
|
||||
status, reason = classifyNodeReadiness(m02)
|
||||
status, reason = classifyNodeReadiness(nodeB)
|
||||
if status != ManagedVolumeStatusUnknown || reason != ReasonNodeNotReady {
|
||||
t.Fatalf("m02 status=%s reason=%s", status, reason)
|
||||
t.Fatalf("nodeB status=%s reason=%s", status, reason)
|
||||
}
|
||||
if !conditionReason(m02.Conditions, ReasonNodeNotReady) || !conditionReason(m02.Conditions, ReasonNodeSchedulingDisabled) {
|
||||
t.Fatalf("m02 conditions=%+v", m02.Conditions)
|
||||
if !conditionReason(nodeB.Conditions, ReasonNodeNotReady) || !conditionReason(nodeB.Conditions, ReasonNodeSchedulingDisabled) {
|
||||
t.Fatalf("nodeB conditions=%+v", nodeB.Conditions)
|
||||
}
|
||||
assertCRDSafeNodeConditions(t, m02.Conditions)
|
||||
assertCRDSafeNodeConditions(t, nodeB.Conditions)
|
||||
}
|
||||
|
||||
func TestPhase37D2NodeNotReadyTakesPrecedenceOverCSIPodSymptoms(t *testing.T) {
|
||||
node := NodeEvidence{
|
||||
NodeName: "tp01",
|
||||
KubernetesNode: "tp01",
|
||||
NodeName: "node-c",
|
||||
KubernetesNode: "node-c",
|
||||
Ready: false,
|
||||
Schedulable: true,
|
||||
Conditions: []ObservationCondition{
|
||||
@@ -104,20 +104,20 @@ func TestPhase37D2KubernetesNodeEvidenceProjectsCSIRegistrationBlockers(t *testi
|
||||
switch r.URL.Path {
|
||||
case "/api/v1/nodes":
|
||||
_, _ = w.Write([]byte(`{"items":[
|
||||
{"metadata":{"name":"m01"},"spec":{},"status":{"conditions":[{"type":"Ready","status":"True"}]}},
|
||||
{"metadata":{"name":"m02"},"spec":{},"status":{"conditions":[{"type":"Ready","status":"True"}]}}
|
||||
{"metadata":{"name":"node-a"},"spec":{},"status":{"conditions":[{"type":"Ready","status":"True"}]}},
|
||||
{"metadata":{"name":"node-b"},"spec":{},"status":{"conditions":[{"type":"Ready","status":"True"}]}}
|
||||
]}`))
|
||||
case "/api/v1/namespaces/kube-system/pods":
|
||||
_, _ = w.Write([]byte(`{"items":[
|
||||
{"metadata":{"name":"csi-m01"},"spec":{"nodeName":"m01"},"status":{"conditions":[{"type":"Ready","status":"True"}]}},
|
||||
{"metadata":{"name":"csi-m02"},"spec":{"nodeName":"m02"},"status":{"conditions":[{"type":"Ready","status":"False"}]}}
|
||||
{"metadata":{"name":"csi-node-a"},"spec":{"nodeName":"node-a"},"status":{"conditions":[{"type":"Ready","status":"True"}]}},
|
||||
{"metadata":{"name":"csi-node-b"},"spec":{"nodeName":"node-b"},"status":{"conditions":[{"type":"Ready","status":"False"}]}}
|
||||
]}`))
|
||||
case "/apis/storage.k8s.io/v1/csidrivers/block.csi.seaweedfs.com":
|
||||
_, _ = w.Write([]byte(`{"metadata":{"name":"block.csi.seaweedfs.com"}}`))
|
||||
case "/apis/storage.k8s.io/v1/csinodes":
|
||||
_, _ = w.Write([]byte(`{"items":[
|
||||
{"metadata":{"name":"m01"},"spec":{"drivers":[{"name":"block.csi.seaweedfs.com"}]}},
|
||||
{"metadata":{"name":"m02"},"spec":{"drivers":[]}}
|
||||
{"metadata":{"name":"node-a"},"spec":{"drivers":[{"name":"block.csi.seaweedfs.com"}]}},
|
||||
{"metadata":{"name":"node-b"},"spec":{"drivers":[]}}
|
||||
]}`))
|
||||
default:
|
||||
t.Fatalf("unexpected Kubernetes API path %s", r.URL.String())
|
||||
@@ -130,21 +130,21 @@ func TestPhase37D2KubernetesNodeEvidenceProjectsCSIRegistrationBlockers(t *testi
|
||||
if err != nil {
|
||||
t.Fatalf("enrich: %v", err)
|
||||
}
|
||||
m02 := nodeByKubernetesName(t, enriched.Nodes, "m02")
|
||||
if !conditionReason(m02.Conditions, ReasonCSIDriverNotRegistered) || !conditionReason(m02.Conditions, ReasonCSINodePodNotReady) {
|
||||
t.Fatalf("m02 conditions=%+v", m02.Conditions)
|
||||
nodeB := nodeByKubernetesName(t, enriched.Nodes, "node-b")
|
||||
if !conditionReason(nodeB.Conditions, ReasonCSIDriverNotRegistered) || !conditionReason(nodeB.Conditions, ReasonCSINodePodNotReady) {
|
||||
t.Fatalf("nodeB conditions=%+v", nodeB.Conditions)
|
||||
}
|
||||
status, reason := classifyNodeReadiness(m02)
|
||||
status, reason := classifyNodeReadiness(nodeB)
|
||||
if status != ManagedVolumeStatusBlocked || reason != ReasonCSIDriverNotRegistered {
|
||||
t.Fatalf("m02 status=%s reason=%s conditions=%+v", status, reason, m02.Conditions)
|
||||
t.Fatalf("nodeB status=%s reason=%s conditions=%+v", status, reason, nodeB.Conditions)
|
||||
}
|
||||
crd := swBlockNodeStatuses([]NodeEvidence{m02})[0]
|
||||
crd := swBlockNodeStatuses([]NodeEvidence{nodeB})[0]
|
||||
if crd.Status != ManagedVolumeStatusBlocked || crd.ReasonCode != ReasonCSIDriverNotRegistered {
|
||||
t.Fatalf("CRD node status=%+v", crd)
|
||||
}
|
||||
assertCondition(t, crd.Conditions, ConditionReady, "False", ReasonCSIDriverNotRegistered)
|
||||
assertCondition(t, crd.Conditions, ConditionBlocked, "True", ReasonCSIDriverNotRegistered)
|
||||
if len(crd.EvidenceRefs) == 0 || !strings.Contains(strings.Join(crd.EvidenceRefs, ","), "kubernetes/csinode/m02") {
|
||||
if len(crd.EvidenceRefs) == 0 || !strings.Contains(strings.Join(crd.EvidenceRefs, ","), "kubernetes/csinode/node-b") {
|
||||
t.Fatalf("missing CRD evidence refs: %+v", crd.EvidenceRefs)
|
||||
}
|
||||
assertCRDSafeNodeConditions(t, crd.Conditions)
|
||||
@@ -154,13 +154,13 @@ func TestPhase37D2KubernetesNodeEvidenceProjectsMissingCSIDriver(t *testing.T) {
|
||||
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.URL.Path {
|
||||
case "/api/v1/nodes":
|
||||
_, _ = w.Write([]byte(`{"items":[{"metadata":{"name":"m01"},"spec":{},"status":{"conditions":[{"type":"Ready","status":"True"}]}}]}`))
|
||||
_, _ = w.Write([]byte(`{"items":[{"metadata":{"name":"node-a"},"spec":{},"status":{"conditions":[{"type":"Ready","status":"True"}]}}]}`))
|
||||
case "/api/v1/namespaces/kube-system/pods":
|
||||
_, _ = w.Write([]byte(`{"items":[{"metadata":{"name":"csi-m01"},"spec":{"nodeName":"m01"},"status":{"conditions":[{"type":"Ready","status":"True"}]}}]}`))
|
||||
_, _ = w.Write([]byte(`{"items":[{"metadata":{"name":"csi-node-a"},"spec":{"nodeName":"node-a"},"status":{"conditions":[{"type":"Ready","status":"True"}]}}]}`))
|
||||
case "/apis/storage.k8s.io/v1/csidrivers/block.csi.seaweedfs.com":
|
||||
http.NotFound(w, r)
|
||||
case "/apis/storage.k8s.io/v1/csinodes":
|
||||
_, _ = w.Write([]byte(`{"items":[{"metadata":{"name":"m01"},"spec":{"drivers":[{"name":"block.csi.seaweedfs.com"}]}}]}`))
|
||||
_, _ = w.Write([]byte(`{"items":[{"metadata":{"name":"node-a"},"spec":{"drivers":[{"name":"block.csi.seaweedfs.com"}]}}]}`))
|
||||
default:
|
||||
t.Fatalf("unexpected Kubernetes API path %s", r.URL.String())
|
||||
}
|
||||
@@ -172,11 +172,11 @@ func TestPhase37D2KubernetesNodeEvidenceProjectsMissingCSIDriver(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("enrich: %v", err)
|
||||
}
|
||||
m01 := nodeByKubernetesName(t, enriched.Nodes, "m01")
|
||||
if status, reason := classifyNodeReadiness(m01); status != ManagedVolumeStatusBlocked || reason != ReasonCSIDriverNotRegistered {
|
||||
t.Fatalf("m01 status=%s reason=%s conditions=%+v", status, reason, m01.Conditions)
|
||||
nodeA := nodeByKubernetesName(t, enriched.Nodes, "node-a")
|
||||
if status, reason := classifyNodeReadiness(nodeA); status != ManagedVolumeStatusBlocked || reason != ReasonCSIDriverNotRegistered {
|
||||
t.Fatalf("nodeA status=%s reason=%s conditions=%+v", status, reason, nodeA.Conditions)
|
||||
}
|
||||
assertCRDSafeNodeConditions(t, m01.Conditions)
|
||||
assertCRDSafeNodeConditions(t, nodeA.Conditions)
|
||||
}
|
||||
|
||||
func TestPhase37D3KubernetesNodeEvidenceProjectsCSIImagePullBlocker(t *testing.T) {
|
||||
@@ -184,12 +184,12 @@ func TestPhase37D3KubernetesNodeEvidenceProjectsCSIImagePullBlocker(t *testing.T
|
||||
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.URL.Path {
|
||||
case "/api/v1/nodes":
|
||||
_, _ = w.Write([]byte(`{"items":[{"metadata":{"name":"m02"},"spec":{},"status":{"conditions":[{"type":"Ready","status":"True"}]}}]}`))
|
||||
_, _ = w.Write([]byte(`{"items":[{"metadata":{"name":"node-b"},"spec":{},"status":{"conditions":[{"type":"Ready","status":"True"}]}}]}`))
|
||||
case "/api/v1/namespaces/kube-system/pods":
|
||||
_, _ = w.Write([]byte(`{"items":[{
|
||||
"metadata":{"name":"sw-block-csi-node-m02"},
|
||||
"metadata":{"name":"sw-block-csi-node-b"},
|
||||
"spec":{
|
||||
"nodeName":"m02",
|
||||
"nodeName":"node-b",
|
||||
"initContainers":[{"image":"ghcr.io/seaweedfs/seaweed-block-csi:registrar"}],
|
||||
"containers":[{"image":"` + missingImage + `"}]
|
||||
},
|
||||
@@ -201,7 +201,7 @@ func TestPhase37D3KubernetesNodeEvidenceProjectsCSIImagePullBlocker(t *testing.T
|
||||
case "/apis/storage.k8s.io/v1/csidrivers/block.csi.seaweedfs.com":
|
||||
_, _ = w.Write([]byte(`{"metadata":{"name":"block.csi.seaweedfs.com"}}`))
|
||||
case "/apis/storage.k8s.io/v1/csinodes":
|
||||
_, _ = w.Write([]byte(`{"items":[{"metadata":{"name":"m02"},"spec":{"drivers":[]}}]}`))
|
||||
_, _ = w.Write([]byte(`{"items":[{"metadata":{"name":"node-b"},"spec":{"drivers":[]}}]}`))
|
||||
default:
|
||||
t.Fatalf("unexpected Kubernetes API path %s", r.URL.String())
|
||||
}
|
||||
@@ -213,7 +213,7 @@ func TestPhase37D3KubernetesNodeEvidenceProjectsCSIImagePullBlocker(t *testing.T
|
||||
if err != nil {
|
||||
t.Fatalf("enrich: %v", err)
|
||||
}
|
||||
node := nodeByKubernetesName(t, enriched.Nodes, "m02")
|
||||
node := nodeByKubernetesName(t, enriched.Nodes, "node-b")
|
||||
if len(node.MissingImages) != 1 || node.MissingImages[0] != missingImage {
|
||||
t.Fatalf("missing images=%+v", node.MissingImages)
|
||||
}
|
||||
@@ -233,7 +233,7 @@ func TestPhase37D3KubernetesNodeEvidenceProjectsCSIImagePullBlocker(t *testing.T
|
||||
}
|
||||
assertCondition(t, crd.Conditions, ConditionReady, "False", ReasonImageMissingOnNode)
|
||||
assertCondition(t, crd.Conditions, ConditionBlocked, "True", ReasonImageMissingOnNode)
|
||||
if !strings.Contains(strings.Join(crd.EvidenceRefs, ","), "kubernetes/pod/kube-system/sw-block-csi-node-m02") {
|
||||
if !strings.Contains(strings.Join(crd.EvidenceRefs, ","), "kubernetes/pod/kube-system/sw-block-csi-node-b") {
|
||||
t.Fatalf("missing pod evidence refs: %+v", crd.EvidenceRefs)
|
||||
}
|
||||
assertCRDSafeNodeConditions(t, crd.Conditions)
|
||||
|
||||
@@ -22,7 +22,7 @@ func TestManagedVolumeProjection_HealthyFirstVolumeReady(t *testing.T) {
|
||||
},
|
||||
Replicas: []ReplicaFact{{
|
||||
ReplicaID: "r1",
|
||||
KubernetesNode: "m02",
|
||||
KubernetesNode: "node-b",
|
||||
Role: "primary",
|
||||
Observed: true,
|
||||
DurableFrontierKnown: true,
|
||||
@@ -30,7 +30,7 @@ func TestManagedVolumeProjection_HealthyFirstVolumeReady(t *testing.T) {
|
||||
FrontendAddr: "127.0.0.1:3260",
|
||||
}},
|
||||
CSIStages: []CSIStageFact{{
|
||||
NodeName: "m02",
|
||||
NodeName: "node-b",
|
||||
Target: "127.0.0.1:3260",
|
||||
}},
|
||||
Workload: &WorkloadCheckFact{
|
||||
@@ -161,7 +161,7 @@ func TestManagedVolumeProjection_BlocksMissingNVMeMultipath(t *testing.T) {
|
||||
FrontendNSID: 1,
|
||||
}},
|
||||
CSIStages: []CSIStageFact{{
|
||||
NodeName: "m02",
|
||||
NodeName: "node-b",
|
||||
Target: "/var/lib/kubelet/plugins/kubernetes.io/csi",
|
||||
}},
|
||||
Workload: &WorkloadCheckFact{
|
||||
@@ -220,18 +220,18 @@ func TestManagedVolumeProjection_LoopbackCrossNodeBlocked(t *testing.T) {
|
||||
},
|
||||
Replicas: []ReplicaFact{{
|
||||
ReplicaID: "r1",
|
||||
KubernetesNode: "m01",
|
||||
KubernetesNode: "node-a",
|
||||
Role: "primary",
|
||||
Observed: true,
|
||||
FrontendAddr: "127.0.0.1:3260",
|
||||
}},
|
||||
CSIStages: []CSIStageFact{{
|
||||
NodeName: "m02",
|
||||
NodeName: "node-b",
|
||||
Target: "127.0.0.1:3260",
|
||||
}},
|
||||
PodMounts: []PodMountFact{{
|
||||
PodName: "writer",
|
||||
NodeName: "m02",
|
||||
NodeName: "node-b",
|
||||
Phase: "Pending",
|
||||
}},
|
||||
})
|
||||
@@ -271,7 +271,7 @@ func TestManagedVolumeProjection_NVMeLoopbackCrossNodeBlocked(t *testing.T) {
|
||||
},
|
||||
Replicas: []ReplicaFact{{
|
||||
ReplicaID: "r1",
|
||||
KubernetesNode: "m02",
|
||||
KubernetesNode: "node-b",
|
||||
Role: "primary",
|
||||
Observed: true,
|
||||
FrontendProtocol: "nvme",
|
||||
@@ -280,12 +280,12 @@ func TestManagedVolumeProjection_NVMeLoopbackCrossNodeBlocked(t *testing.T) {
|
||||
FrontendNSID: 1,
|
||||
}},
|
||||
CSIStages: []CSIStageFact{{
|
||||
NodeName: "m01",
|
||||
NodeName: "node-a",
|
||||
Target: "127.0.0.1:4420",
|
||||
}},
|
||||
PodMounts: []PodMountFact{{
|
||||
PodName: "writer",
|
||||
NodeName: "m01",
|
||||
NodeName: "node-a",
|
||||
Phase: "Pending",
|
||||
}},
|
||||
})
|
||||
@@ -349,7 +349,7 @@ func TestManagedVolumeProjection_WriterFailedMountBlocked(t *testing.T) {
|
||||
},
|
||||
PodMounts: []PodMountFact{{
|
||||
PodName: "writer",
|
||||
NodeName: "m02",
|
||||
NodeName: "node-b",
|
||||
Phase: "Pending",
|
||||
Reason: ReasonWriterMountFailed,
|
||||
Message: "MountVolume.MountDevice failed",
|
||||
@@ -374,7 +374,7 @@ func TestManagedVolumeProjection_CSINodeImagePullBlocked(t *testing.T) {
|
||||
Phase: "Bound",
|
||||
},
|
||||
KubernetesNodes: []KubernetesNodeFact{{
|
||||
NodeName: "m02",
|
||||
NodeName: "node-b",
|
||||
Ready: true,
|
||||
CSINodeReady: false,
|
||||
Reason: ReasonCSINodeImagePullFailed,
|
||||
@@ -414,24 +414,24 @@ func TestManagedVolumeProjection_TransparentISCSIALUARecovered(t *testing.T) {
|
||||
},
|
||||
Replicas: []ReplicaFact{{
|
||||
ReplicaID: "r1",
|
||||
KubernetesNode: "m01",
|
||||
KubernetesNode: "node-a",
|
||||
Role: "unavailable",
|
||||
Observed: false,
|
||||
StalePrimaryFenced: true,
|
||||
}, {
|
||||
ReplicaID: "r2",
|
||||
KubernetesNode: "m02",
|
||||
KubernetesNode: "node-b",
|
||||
Role: "primary",
|
||||
Observed: true,
|
||||
FrontendAddr: "192.168.1.184:3261",
|
||||
}, {
|
||||
ReplicaID: "r3",
|
||||
KubernetesNode: "tp01",
|
||||
KubernetesNode: "node-c",
|
||||
Role: "replica",
|
||||
Observed: true,
|
||||
}},
|
||||
HostPaths: []HostPathFact{{
|
||||
NodeName: "m02",
|
||||
NodeName: "node-b",
|
||||
Protocol: "iscsi",
|
||||
Target: "192.168.1.184:3261",
|
||||
State: HostPathStateActiveOptimized,
|
||||
@@ -468,7 +468,7 @@ func TestManagedVolumeProjection_MissingMultipathBlocksTransparentClaim(t *testi
|
||||
PublishTarget: "192.168.1.184:3261",
|
||||
},
|
||||
HostPaths: []HostPathFact{{
|
||||
NodeName: "m02",
|
||||
NodeName: "node-b",
|
||||
Protocol: "iscsi",
|
||||
Target: "192.168.1.184:3261",
|
||||
State: HostPathStateSinglePath,
|
||||
@@ -503,7 +503,7 @@ func TestManagedVolumeProjection_NVMeANASeamDoesNotInferTransparentRecovery(t *t
|
||||
PublishTarget: "10.0.0.1:4420",
|
||||
},
|
||||
HostPaths: []HostPathFact{{
|
||||
NodeName: "m02",
|
||||
NodeName: "node-b",
|
||||
Protocol: "nvme",
|
||||
Target: "nqn.2026-05.io.seaweedfs:pvc-nvme",
|
||||
State: HostPathStateANAOptimized,
|
||||
@@ -530,19 +530,19 @@ func TestManagedVolumeProjection_FactOrderIndependent(t *testing.T) {
|
||||
},
|
||||
Replicas: []ReplicaFact{{
|
||||
ReplicaID: "r1",
|
||||
KubernetesNode: "m01",
|
||||
KubernetesNode: "node-a",
|
||||
Role: "unavailable",
|
||||
Observed: false,
|
||||
StalePrimaryFenced: true,
|
||||
}, {
|
||||
ReplicaID: "r2",
|
||||
KubernetesNode: "m02",
|
||||
KubernetesNode: "node-b",
|
||||
Role: "primary",
|
||||
Observed: true,
|
||||
FrontendAddr: "192.168.1.184:3260",
|
||||
}},
|
||||
CSIStages: []CSIStageFact{{
|
||||
NodeName: "m02",
|
||||
NodeName: "node-b",
|
||||
Target: "192.168.1.184:3260",
|
||||
Reattach: true,
|
||||
}},
|
||||
@@ -569,11 +569,11 @@ func TestManagedVolumeProjection_ActionInvariantRefs(t *testing.T) {
|
||||
},
|
||||
Replicas: []ReplicaFact{{
|
||||
ReplicaID: "r1",
|
||||
KubernetesNode: "m01",
|
||||
KubernetesNode: "node-a",
|
||||
Role: "primary",
|
||||
Observed: true,
|
||||
}},
|
||||
CSIStages: []CSIStageFact{{NodeName: "m02", Target: "127.0.0.1:3260"}},
|
||||
CSIStages: []CSIStageFact{{NodeName: "node-b", Target: "127.0.0.1:3260"}},
|
||||
})
|
||||
|
||||
action := findManagedVolumeAction(blocked.Actions, ManagedVolumeActionReinstallExternalISCSI)
|
||||
@@ -644,13 +644,13 @@ func TestManagedVolumeProjection_NodeLossReattachRecovered(t *testing.T) {
|
||||
},
|
||||
Replicas: []ReplicaFact{{
|
||||
ReplicaID: "r1",
|
||||
KubernetesNode: "m01",
|
||||
KubernetesNode: "node-a",
|
||||
Role: "unavailable",
|
||||
Observed: false,
|
||||
StalePrimaryFenced: true,
|
||||
}, {
|
||||
ReplicaID: "r2",
|
||||
KubernetesNode: "m02",
|
||||
KubernetesNode: "node-b",
|
||||
Role: "primary",
|
||||
Observed: true,
|
||||
DurableFrontierKnown: true,
|
||||
@@ -658,14 +658,14 @@ func TestManagedVolumeProjection_NodeLossReattachRecovered(t *testing.T) {
|
||||
FrontendAddr: "192.168.1.184:3260",
|
||||
}, {
|
||||
ReplicaID: "r3",
|
||||
KubernetesNode: "tp01",
|
||||
KubernetesNode: "node-c",
|
||||
Role: "replica",
|
||||
Observed: true,
|
||||
DurableFrontierKnown: true,
|
||||
DurableFrontierLSN: 52,
|
||||
}},
|
||||
CSIStages: []CSIStageFact{{
|
||||
NodeName: "m02",
|
||||
NodeName: "node-b",
|
||||
Target: "192.168.1.184:3260",
|
||||
Epoch: 2,
|
||||
EndpointVersion: 1,
|
||||
@@ -709,7 +709,7 @@ func TestManagedVolumeProjection_ReturnedPreviousPrimaryStaysFrontendFenced(t *t
|
||||
},
|
||||
Replicas: []ReplicaFact{{
|
||||
ReplicaID: "r1",
|
||||
KubernetesNode: "m01",
|
||||
KubernetesNode: "node-a",
|
||||
Observed: true,
|
||||
Role: "replica",
|
||||
ReplicationRole: "ready",
|
||||
@@ -722,7 +722,7 @@ func TestManagedVolumeProjection_ReturnedPreviousPrimaryStaysFrontendFenced(t *t
|
||||
StalePrimaryFenced: true,
|
||||
}, {
|
||||
ReplicaID: "r2",
|
||||
KubernetesNode: "m02",
|
||||
KubernetesNode: "node-b",
|
||||
Observed: true,
|
||||
Role: "primary",
|
||||
DurableFrontierKnown: true,
|
||||
@@ -777,7 +777,7 @@ func TestManagedVolumeProjection_ReturnedReplicaFailbackActionAfterAckEligibilit
|
||||
StalePrimaryFenced: true,
|
||||
}, {
|
||||
ReplicaID: "r2",
|
||||
KubernetesNode: "m02",
|
||||
KubernetesNode: "node-b",
|
||||
Observed: true,
|
||||
Role: "primary",
|
||||
DurableFrontierKnown: true,
|
||||
@@ -843,19 +843,19 @@ func TestManagedVolumeProjection_InvalidDualPrimaryBeatsReady(t *testing.T) {
|
||||
},
|
||||
Replicas: []ReplicaFact{{
|
||||
ReplicaID: "r1",
|
||||
KubernetesNode: "m01",
|
||||
KubernetesNode: "node-a",
|
||||
Role: "primary",
|
||||
Observed: true,
|
||||
FrontendAddr: "192.168.1.181:3260",
|
||||
}, {
|
||||
ReplicaID: "r2",
|
||||
KubernetesNode: "m02",
|
||||
KubernetesNode: "node-b",
|
||||
Role: "primary",
|
||||
Observed: true,
|
||||
FrontendAddr: "192.168.1.184:3260",
|
||||
}},
|
||||
CSIStages: []CSIStageFact{{
|
||||
NodeName: "m02",
|
||||
NodeName: "node-b",
|
||||
Target: "192.168.1.181:3260",
|
||||
}},
|
||||
Workload: &WorkloadCheckFact{
|
||||
|
||||
@@ -30,7 +30,7 @@ func TestObservationBundle_RendersNodeLossRecoveryStory(t *testing.T) {
|
||||
{
|
||||
ReplicaID: "r1",
|
||||
ServerID: "node-loss-r1",
|
||||
NodeName: "m01",
|
||||
NodeName: "node-a",
|
||||
Observed: true,
|
||||
Protocol: "iscsi",
|
||||
FrontendAddress: "192.168.1.181:3260",
|
||||
@@ -42,7 +42,7 @@ func TestObservationBundle_RendersNodeLossRecoveryStory(t *testing.T) {
|
||||
{
|
||||
ReplicaID: "r2",
|
||||
ServerID: "node-loss-r2",
|
||||
NodeName: "m02",
|
||||
NodeName: "node-b",
|
||||
Observed: true,
|
||||
Protocol: "iscsi",
|
||||
FrontendAddress: "192.168.1.184:3260",
|
||||
@@ -64,7 +64,7 @@ func TestObservationBundle_RendersNodeLossRecoveryStory(t *testing.T) {
|
||||
{
|
||||
ReplicaID: "r3",
|
||||
ServerID: "node-loss-r3",
|
||||
NodeName: "tp01",
|
||||
NodeName: "node-c",
|
||||
Observed: true,
|
||||
Protocol: "iscsi",
|
||||
FrontendAddress: "192.168.1.188:3260",
|
||||
@@ -87,9 +87,9 @@ func TestObservationBundle_RendersNodeLossRecoveryStory(t *testing.T) {
|
||||
"node_loss_recovery_summary_version=1",
|
||||
"result=promoted",
|
||||
"ack_profile=sync-quorum",
|
||||
"before_primary=r1@m01",
|
||||
"failed=r1@m01",
|
||||
"promoted=r2@m02",
|
||||
"before_primary=r1@node-a",
|
||||
"failed=r1@node-a",
|
||||
"promoted=r2@node-b",
|
||||
"before_frontend=192.168.1.181:3260",
|
||||
"after_frontend=192.168.1.184:3260",
|
||||
"pod_recreate_used=true",
|
||||
@@ -111,7 +111,7 @@ func TestObservationBundle_RendersNodeLossRecoveryStory(t *testing.T) {
|
||||
text := RenderObservationExplainText(cluster)
|
||||
for _, want := range []string{
|
||||
"volume pvc-node-loss status=ok rf=3 ack=sync-quorum",
|
||||
"primary r2 on m02 frontend=192.168.1.184:3260",
|
||||
"primary r2 on node-b frontend=192.168.1.184:3260",
|
||||
"CSI target changed 192.168.1.181:3260 -> 192.168.1.184:3260",
|
||||
"old primary stale I/O success count is 0",
|
||||
"timeline:",
|
||||
@@ -133,7 +133,7 @@ func TestObservationBundle_RendersNodeLossRecoveryStory(t *testing.T) {
|
||||
func TestObservationBundle_RendersImagePullBlockedStoryWithoutInventory(t *testing.T) {
|
||||
dir := t.TempDir()
|
||||
mustWrite(t, filepath.Join(dir, "demo", KubeSystemPodsDeploysArtifact), `NAME READY STATUS RESTARTS AGE IP NODE
|
||||
pod/sw-block-csi-node-n948t 0/2 Init:ErrImagePull 0 2m3s 192.168.1.184 m02
|
||||
pod/sw-block-csi-node-n948t 0/2 Init:ErrImagePull 0 2m3s 192.168.1.184 node-b
|
||||
deployment.apps/sw-block-csi-controller 1/1 1 1 2m3s block-csi sw-block-csi:local`)
|
||||
|
||||
cluster, err := BuildObservationFromBundle(ObservationBundleOptions{Dir: dir, VolumeID: "pvc-blocked"})
|
||||
@@ -144,7 +144,7 @@ deployment.apps/sw-block-csi-controller 1/1 1 1 2m3s block-csi sw-block-csi:loca
|
||||
for _, want := range []string{
|
||||
"cluster status=blocked volumes=1 nodes=0",
|
||||
"volume pvc-blocked status=blocked rf=3 reason=csi_node_image_pull_failed",
|
||||
"waiting=ImagePullBackOff on node m02 image sw-block-csi:local",
|
||||
"waiting=ImagePullBackOff on node node-b image sw-block-csi:local",
|
||||
"next action: import sw-block-csi:local to the blocked node",
|
||||
} {
|
||||
if !strings.Contains(text, want) {
|
||||
@@ -211,7 +211,7 @@ func TestObservationBundle_ReplaysReturnedReplicaProjection(t *testing.T) {
|
||||
RequiredFrontierLSN: 52,
|
||||
Replicas: []ReplicaEvidence{{
|
||||
ReplicaID: "r1",
|
||||
KubernetesNode: "m01",
|
||||
KubernetesNode: "node-a",
|
||||
Observed: true,
|
||||
Role: "replica",
|
||||
ReplicationRole: "ready",
|
||||
@@ -222,7 +222,7 @@ func TestObservationBundle_ReplaysReturnedReplicaProjection(t *testing.T) {
|
||||
SupportBundlePath: "returned-replica-summary.txt",
|
||||
}, {
|
||||
ReplicaID: "r2",
|
||||
KubernetesNode: "m02",
|
||||
KubernetesNode: "node-b",
|
||||
Observed: true,
|
||||
Role: "primary",
|
||||
DurableFrontierKnown: true,
|
||||
@@ -280,7 +280,7 @@ func TestObservationBundle_ReturnedReplicaProjectionIsVolumeScoped(t *testing.T)
|
||||
RequiredFrontierLSN: 42,
|
||||
Replicas: []ReplicaEvidence{{
|
||||
ReplicaID: "a-r1",
|
||||
KubernetesNode: "m01",
|
||||
KubernetesNode: "node-a",
|
||||
Observed: true,
|
||||
Role: "previous_primary",
|
||||
ReplicationRole: "replica_ready",
|
||||
@@ -290,7 +290,7 @@ func TestObservationBundle_ReturnedReplicaProjectionIsVolumeScoped(t *testing.T)
|
||||
StalePrimaryFenced: true,
|
||||
}, {
|
||||
ReplicaID: "a-r2",
|
||||
KubernetesNode: "m02",
|
||||
KubernetesNode: "node-b",
|
||||
Observed: true,
|
||||
Role: "primary",
|
||||
Healthy: true,
|
||||
@@ -312,7 +312,7 @@ func TestObservationBundle_ReturnedReplicaProjectionIsVolumeScoped(t *testing.T)
|
||||
EndpointVersion: 1,
|
||||
Replicas: []ReplicaEvidence{{
|
||||
ReplicaID: "b-r1",
|
||||
KubernetesNode: "tp01",
|
||||
KubernetesNode: "node-c",
|
||||
Observed: true,
|
||||
Role: "primary",
|
||||
Healthy: true,
|
||||
@@ -376,7 +376,7 @@ func TestObservationBundle_ManagedVolumeUsesPrimaryFailureArtifactHints(t *testi
|
||||
PublishTarget: "192.168.1.184:3261",
|
||||
Replicas: []ReplicaEvidence{{
|
||||
ReplicaID: "r2",
|
||||
KubernetesNode: "m02",
|
||||
KubernetesNode: "node-b",
|
||||
Role: "primary",
|
||||
Observed: true,
|
||||
FrontendAddr: "192.168.1.184:3261",
|
||||
@@ -421,7 +421,7 @@ func TestObservationBundle_D7PrefersNewestRestartClusterEvidence(t *testing.T) {
|
||||
AckProfile: "sync-quorum",
|
||||
Status: ObservationStatusOK,
|
||||
PrimaryReplica: "r1",
|
||||
PrimaryNode: "m01",
|
||||
PrimaryNode: "node-a",
|
||||
PublishTarget: "192.168.1.181:3260",
|
||||
Epoch: 1,
|
||||
}}
|
||||
@@ -434,7 +434,7 @@ func TestObservationBundle_D7PrefersNewestRestartClusterEvidence(t *testing.T) {
|
||||
AckProfile: "sync-quorum",
|
||||
Status: ObservationStatusOK,
|
||||
PrimaryReplica: "r2",
|
||||
PrimaryNode: "m02",
|
||||
PrimaryNode: "node-b",
|
||||
PublishTarget: "192.168.1.184:3260",
|
||||
Epoch: 2,
|
||||
}}
|
||||
@@ -449,11 +449,11 @@ func TestObservationBundle_D7PrefersNewestRestartClusterEvidence(t *testing.T) {
|
||||
t.Fatalf("volumes=%+v", out.Volumes)
|
||||
}
|
||||
volume := out.Volumes[0]
|
||||
if volume.PrimaryReplica != "r2" || volume.PrimaryNode != "m02" || volume.PublishTarget != "192.168.1.184:3260" || volume.Epoch != 2 {
|
||||
if volume.PrimaryReplica != "r2" || volume.PrimaryNode != "node-b" || volume.PublishTarget != "192.168.1.184:3260" || volume.Epoch != 2 {
|
||||
t.Fatalf("expected post-restart evidence, got %+v", volume)
|
||||
}
|
||||
summary := RenderObservationReportSummary(out)
|
||||
if !strings.Contains(summary, "primary=r2@m02 frontend=192.168.1.184:3260") {
|
||||
if !strings.Contains(summary, "primary=r2@node-b frontend=192.168.1.184:3260") {
|
||||
t.Fatalf("summary used stale primary:\n%s", summary)
|
||||
}
|
||||
}
|
||||
@@ -533,20 +533,20 @@ func TestObservationBundle_CarriesHostPrereqEvidenceIntoNodeStatus(t *testing.T)
|
||||
dir := t.TempDir()
|
||||
cluster := NewClusterEvidence(time.Date(2026, 6, 8, 13, 0, 0, 0, time.UTC))
|
||||
cluster.Nodes = []NodeEvidence{{
|
||||
NodeName: "m02",
|
||||
KubernetesNode: "m02",
|
||||
NodeName: "node-b",
|
||||
KubernetesNode: "node-b",
|
||||
Ready: true,
|
||||
Schedulable: true,
|
||||
}, {
|
||||
NodeName: "tp01",
|
||||
KubernetesNode: "tp01",
|
||||
NodeName: "node-c",
|
||||
KubernetesNode: "node-c",
|
||||
Ready: true,
|
||||
Schedulable: true,
|
||||
}}
|
||||
writeClusterEvidenceArtifact(t, filepath.Join(dir, "status", ClusterEvidenceArtifact), cluster)
|
||||
mustWrite(t, filepath.Join(dir, "host", ObservationHostPrereqArtifact), strings.Join([]string{
|
||||
"node=m02 iscsi_prereq=missing multipath_prereq=ok command_iscsiadm=missing",
|
||||
"node=tp01 iscsi_prereq=ok multipath_prereq=missing command_multipath=missing",
|
||||
"node=node-b iscsi_prereq=missing multipath_prereq=ok command_iscsiadm=missing",
|
||||
"node=node-c iscsi_prereq=ok multipath_prereq=missing command_multipath=missing",
|
||||
}, "\n"))
|
||||
|
||||
out, err := BuildObservationFromBundle(ObservationBundleOptions{Dir: dir})
|
||||
@@ -559,16 +559,16 @@ func TestObservationBundle_CarriesHostPrereqEvidenceIntoNodeStatus(t *testing.T)
|
||||
}
|
||||
if snapshot.Cluster.Nodes[0].Status != ManagedVolumeStatusBlocked ||
|
||||
snapshot.Cluster.Nodes[0].ReasonCode != ReasonISCSIPrereqMissing {
|
||||
t.Fatalf("m02 node=%+v", snapshot.Cluster.Nodes[0])
|
||||
t.Fatalf("node-b node=%+v", snapshot.Cluster.Nodes[0])
|
||||
}
|
||||
if snapshot.Cluster.Nodes[1].Status != ManagedVolumeStatusBlocked ||
|
||||
snapshot.Cluster.Nodes[1].ReasonCode != ReasonMultipathPrereqMissing {
|
||||
t.Fatalf("tp01 node=%+v", snapshot.Cluster.Nodes[1])
|
||||
t.Fatalf("node-c node=%+v", snapshot.Cluster.Nodes[1])
|
||||
}
|
||||
summary := RenderObservationReportSummary(out)
|
||||
for _, want := range []string{
|
||||
"node=m02 k8s=m02 status=blocked reason=iscsi_prereq_missing",
|
||||
"node=tp01 k8s=tp01 status=blocked reason=multipath_prereq_missing",
|
||||
"node=node-b k8s=node-b status=blocked reason=iscsi_prereq_missing",
|
||||
"node=node-c k8s=node-c status=blocked reason=multipath_prereq_missing",
|
||||
} {
|
||||
if !strings.Contains(summary, want) {
|
||||
t.Fatalf("summary missing %q:\n%s", want, summary)
|
||||
@@ -585,11 +585,11 @@ func TestObservationBundle_CarriesUnsupportedLoopbackAttachIntoManagedStatus(t *
|
||||
ReplicationFactor: 1,
|
||||
Status: ObservationStatusOK,
|
||||
PrimaryReplica: "r1",
|
||||
PrimaryNode: "m01",
|
||||
PrimaryNode: "node-a",
|
||||
PublishTarget: "127.0.0.1:3260",
|
||||
Replicas: []ReplicaEvidence{{
|
||||
ReplicaID: "r1",
|
||||
KubernetesNode: "m01",
|
||||
KubernetesNode: "node-a",
|
||||
Observed: true,
|
||||
Role: "primary",
|
||||
FrontendAddr: "127.0.0.1:3260",
|
||||
@@ -597,8 +597,8 @@ func TestObservationBundle_CarriesUnsupportedLoopbackAttachIntoManagedStatus(t *
|
||||
}})
|
||||
mustWrite(t, filepath.Join(dir, "demo", ObservationLoopbackAttachArtifact), strings.Join([]string{
|
||||
"issue=unsupported_cross_node_loopback_attach",
|
||||
"app_node=m02",
|
||||
"blockvolume_node=m01",
|
||||
"app_node=node-b",
|
||||
"blockvolume_node=node-a",
|
||||
"frontend=127.0.0.1:3260",
|
||||
"volume_id=pvc-loopback",
|
||||
"replica_id=r1",
|
||||
@@ -655,7 +655,7 @@ func TestObservationBundle_CarriesUnsupportedLoopbackAttachIntoManagedStatus(t *
|
||||
|
||||
summary := RenderObservationReportSummary(cluster)
|
||||
for _, want := range []string{
|
||||
"volume=pvc-loopback status=blocked pvc=default/demo-pvc primary=r1@m01 frontend=127.0.0.1:3260",
|
||||
"volume=pvc-loopback status=blocked pvc=default/demo-pvc primary=r1@node-a frontend=127.0.0.1:3260",
|
||||
"managed_volume=pvc-loopback status=blocked reason=publish_target_loopback_cross_node",
|
||||
"managed_volume_condition=Ready status=False reason=publish_target_loopback_cross_node severity=warning",
|
||||
"managed_volume_action=safe_k8s.reinstall_external_iscsi mode=dry_run side_effect=safe_k8s executor=installer_or_operator decision=allowed",
|
||||
@@ -695,11 +695,11 @@ func TestObservationBundle_DeleteSafetyBlocksWithResidue(t *testing.T) {
|
||||
ReplicationFactor: 1,
|
||||
Status: ObservationStatusOK,
|
||||
PrimaryReplica: "r1",
|
||||
PrimaryNode: "m01",
|
||||
PrimaryNode: "node-a",
|
||||
PublishTarget: "192.168.1.181:3260",
|
||||
Replicas: []ReplicaEvidence{{
|
||||
ReplicaID: "r1",
|
||||
KubernetesNode: "m01",
|
||||
KubernetesNode: "node-a",
|
||||
Observed: true,
|
||||
Role: "primary",
|
||||
FrontendAddr: "192.168.1.181:3260",
|
||||
@@ -780,11 +780,11 @@ func TestObservationBundle_DeleteSafetyUnknownWithoutCleanupEvidence(t *testing.
|
||||
ReplicationFactor: 1,
|
||||
Status: ObservationStatusOK,
|
||||
PrimaryReplica: "r1",
|
||||
PrimaryNode: "m01",
|
||||
PrimaryNode: "node-a",
|
||||
PublishTarget: "192.168.1.181:3260",
|
||||
Replicas: []ReplicaEvidence{{
|
||||
ReplicaID: "r1",
|
||||
KubernetesNode: "m01",
|
||||
KubernetesNode: "node-a",
|
||||
Observed: true,
|
||||
Role: "primary",
|
||||
FrontendAddr: "192.168.1.181:3260",
|
||||
@@ -843,11 +843,11 @@ func TestObservationBundle_DeleteSafetyUnknownWithStaleCleanupEvidence(t *testin
|
||||
ReplicationFactor: 1,
|
||||
Status: ObservationStatusOK,
|
||||
PrimaryReplica: "r1",
|
||||
PrimaryNode: "m01",
|
||||
PrimaryNode: "node-a",
|
||||
PublishTarget: "192.168.1.181:3260",
|
||||
Replicas: []ReplicaEvidence{{
|
||||
ReplicaID: "r1",
|
||||
KubernetesNode: "m01",
|
||||
KubernetesNode: "node-a",
|
||||
Observed: true,
|
||||
Role: "primary",
|
||||
FrontendAddr: "192.168.1.181:3260",
|
||||
@@ -912,11 +912,11 @@ func TestObservationBundle_DeleteSafetyReleasableWithCleanCleanupEvidence(t *tes
|
||||
ReplicationFactor: 1,
|
||||
Status: ObservationStatusOK,
|
||||
PrimaryReplica: "r1",
|
||||
PrimaryNode: "m01",
|
||||
PrimaryNode: "node-a",
|
||||
PublishTarget: "192.168.1.181:3260",
|
||||
Replicas: []ReplicaEvidence{{
|
||||
ReplicaID: "r1",
|
||||
KubernetesNode: "m01",
|
||||
KubernetesNode: "node-a",
|
||||
Observed: true,
|
||||
Role: "primary",
|
||||
FrontendAddr: "192.168.1.181:3260",
|
||||
@@ -973,7 +973,7 @@ func TestObservationBundle_LoopbackAttachTargetsNamedVolume(t *testing.T) {
|
||||
PVCName: "pvc-a",
|
||||
Status: ObservationStatusOK,
|
||||
PrimaryReplica: "r1",
|
||||
PrimaryNode: "m01",
|
||||
PrimaryNode: "node-a",
|
||||
PublishTarget: "192.168.1.181:3260",
|
||||
},
|
||||
{
|
||||
@@ -982,14 +982,14 @@ func TestObservationBundle_LoopbackAttachTargetsNamedVolume(t *testing.T) {
|
||||
PVCName: "pvc-b",
|
||||
Status: ObservationStatusOK,
|
||||
PrimaryReplica: "r1",
|
||||
PrimaryNode: "m01",
|
||||
PrimaryNode: "node-a",
|
||||
PublishTarget: "127.0.0.1:3260",
|
||||
},
|
||||
})
|
||||
mustWrite(t, filepath.Join(dir, "demo", ObservationLoopbackAttachArtifact), strings.Join([]string{
|
||||
"issue=unsupported_cross_node_loopback_attach",
|
||||
"app_node=m02",
|
||||
"blockvolume_node=m01",
|
||||
"app_node=node-b",
|
||||
"blockvolume_node=node-a",
|
||||
"frontend=127.0.0.1:3260",
|
||||
"volume_id=pvc-b",
|
||||
"replica_id=r1",
|
||||
@@ -1023,11 +1023,11 @@ func TestManagedVolumeFactsFromEvidence_AllowsSameNodeLoopback(t *testing.T) {
|
||||
PVCName: "demo-pvc",
|
||||
Status: ObservationStatusOK,
|
||||
PrimaryReplica: "r1",
|
||||
PrimaryNode: "m02",
|
||||
PrimaryNode: "node-b",
|
||||
PublishTarget: "127.0.0.1:3260",
|
||||
Replicas: []ReplicaEvidence{{
|
||||
ReplicaID: "r1",
|
||||
KubernetesNode: "m02",
|
||||
KubernetesNode: "node-b",
|
||||
Observed: true,
|
||||
Role: "primary",
|
||||
FrontendAddr: "127.0.0.1:3260",
|
||||
@@ -1060,7 +1060,7 @@ func TestObservationBundle_D6ReplayGate_FirstVolumeBlockedAndRecovery(t *testing
|
||||
name: "blocked-image-pull",
|
||||
build: func(t *testing.T, dir string) {
|
||||
mustWrite(t, filepath.Join(dir, "demo", KubeSystemPodsDeploysArtifact), `NAME READY STATUS RESTARTS AGE IP NODE
|
||||
pod/sw-block-csi-node-n948t 0/2 Init:ErrImagePull 0 2m3s 192.168.1.184 m02
|
||||
pod/sw-block-csi-node-n948t 0/2 Init:ErrImagePull 0 2m3s 192.168.1.184 node-b
|
||||
deployment.apps/sw-block-csi-controller 1/1 1 1 2m3s block-csi sw-block-csi:local`)
|
||||
},
|
||||
wantStatus: ManagedVolumeStatusBlocked,
|
||||
@@ -1088,7 +1088,7 @@ deployment.apps/sw-block-csi-controller 1/1 1 1 2m3s block-csi sw-block-csi:loca
|
||||
PublishTarget: "192.168.1.184:3261",
|
||||
Replicas: []ReplicaEvidence{{
|
||||
ReplicaID: "r2",
|
||||
KubernetesNode: "m02",
|
||||
KubernetesNode: "node-b",
|
||||
Role: "primary",
|
||||
Observed: true,
|
||||
FrontendAddr: "192.168.1.184:3261",
|
||||
@@ -1182,7 +1182,7 @@ func TestObservationBundle_DashboardReplayGate_FirstVolumeBlockedAndRecovery(t *
|
||||
name: "blocked-image-pull",
|
||||
build: func(t *testing.T, dir string) {
|
||||
mustWrite(t, filepath.Join(dir, "demo", KubeSystemPodsDeploysArtifact), `NAME READY STATUS RESTARTS AGE IP NODE
|
||||
pod/sw-block-csi-node-n948t 0/2 Init:ErrImagePull 0 2m3s 192.168.1.184 m02
|
||||
pod/sw-block-csi-node-n948t 0/2 Init:ErrImagePull 0 2m3s 192.168.1.184 node-b
|
||||
deployment.apps/sw-block-csi-controller 1/1 1 1 2m3s block-csi sw-block-csi:local`)
|
||||
},
|
||||
wantHTML: ReasonCSINodeImagePullFailed,
|
||||
@@ -1212,7 +1212,7 @@ deployment.apps/sw-block-csi-controller 1/1 1 1 2m3s block-csi sw-block-csi:loca
|
||||
PublishTarget: "192.168.1.184:3261",
|
||||
Replicas: []ReplicaEvidence{{
|
||||
ReplicaID: "r2",
|
||||
KubernetesNode: "m02",
|
||||
KubernetesNode: "node-b",
|
||||
Role: "primary",
|
||||
Observed: true,
|
||||
FrontendAddr: "192.168.1.184:3261",
|
||||
@@ -1347,7 +1347,7 @@ func writeStatusEndpointUnreachableInventory(t *testing.T, dir string) {
|
||||
Replicas: []VolumeInventoryReplicaInput{{
|
||||
ReplicaID: "r1",
|
||||
ServerID: "node-r1",
|
||||
NodeName: "m01",
|
||||
NodeName: "node-a",
|
||||
Protocol: "iscsi",
|
||||
FrontendAddress: "192.168.1.181:3260",
|
||||
StatusAddress: "192.168.1.181:23260",
|
||||
|
||||
@@ -13,8 +13,8 @@ func TestObservation_RenderHealthyVolumeTextAndJSON(t *testing.T) {
|
||||
text := RenderVolumeEvidenceText(volume)
|
||||
for _, want := range []string{
|
||||
"volume pvc-healthy status=ok rf=3 ack=sync-quorum",
|
||||
"primary r1 on m01 frontend=192.168.1.181:3260",
|
||||
"r2 m02 unknown replica_ready durable_lsn=44 candidate_ready=true",
|
||||
"primary r1 on node-a frontend=192.168.1.181:3260",
|
||||
"r2 node-b unknown replica_ready durable_lsn=44 candidate_ready=true",
|
||||
"next action: none",
|
||||
} {
|
||||
if !strings.Contains(text, want) {
|
||||
@@ -50,14 +50,14 @@ func TestObservation_RenderRecoveringNodeLossStory(t *testing.T) {
|
||||
Status: ObservationStatusRecovering,
|
||||
Reason: ReasonPrimaryNodeLost,
|
||||
PrimaryReplica: "r2",
|
||||
PrimaryNode: "m02",
|
||||
PrimaryNode: "node-b",
|
||||
PublishTarget: "192.168.1.184:3260",
|
||||
Epoch: 2,
|
||||
EndpointVersion: 1,
|
||||
Replicas: []ReplicaEvidence{
|
||||
{
|
||||
ReplicaID: "r1",
|
||||
KubernetesNode: "m01",
|
||||
KubernetesNode: "node-a",
|
||||
Role: "unavailable",
|
||||
ReplicationRole: "unavailable",
|
||||
StalePrimaryFenced: true,
|
||||
@@ -71,7 +71,7 @@ func TestObservation_RenderRecoveringNodeLossStory(t *testing.T) {
|
||||
},
|
||||
{
|
||||
ReplicaID: "r2",
|
||||
KubernetesNode: "m02",
|
||||
KubernetesNode: "node-b",
|
||||
Role: "primary",
|
||||
ReplicationRole: "none",
|
||||
DurableFrontierKnown: true,
|
||||
@@ -91,8 +91,8 @@ func TestObservation_RenderRecoveringNodeLossStory(t *testing.T) {
|
||||
text := RenderVolumeEvidenceText(volume)
|
||||
for _, want := range []string{
|
||||
"volume pvc-recovering status=recovering rf=3 ack=sync-quorum reason=primary_node_lost",
|
||||
"primary r2 on m02 frontend=192.168.1.184:3260",
|
||||
"r1 m01 unavailable unavailable stale_primary_fenced=true",
|
||||
"primary r2 on node-b frontend=192.168.1.184:3260",
|
||||
"r1 node-a unavailable unavailable stale_primary_fenced=true",
|
||||
"condition Recovery severity=info reason=primary_node_lost CSI target changed 192.168.1.181:3260 -> 192.168.1.184:3260",
|
||||
"next action: wait for app pod readiness, then collect support bundle if stuck",
|
||||
} {
|
||||
@@ -106,8 +106,8 @@ func TestObservation_RenderBlockedImagePullStory(t *testing.T) {
|
||||
cluster := NewClusterEvidence(time.Date(2026, 5, 16, 16, 3, 6, 0, time.UTC))
|
||||
cluster.Status = ObservationStatusBlocked
|
||||
cluster.Nodes = []NodeEvidence{{
|
||||
NodeName: "m02",
|
||||
KubernetesNode: "m02",
|
||||
NodeName: "node-b",
|
||||
KubernetesNode: "node-b",
|
||||
InternalIP: "192.168.1.184",
|
||||
Schedulable: true,
|
||||
Ready: true,
|
||||
@@ -118,7 +118,7 @@ func TestObservation_RenderBlockedImagePullStory(t *testing.T) {
|
||||
Status: "false",
|
||||
Reason: ReasonImageMissingOnNode,
|
||||
Severity: "error",
|
||||
Message: "node m02 missing image sw-block-csi:local",
|
||||
Message: "node node-b missing image sw-block-csi:local",
|
||||
}},
|
||||
}}
|
||||
cluster.Volumes = []VolumeEvidence{{
|
||||
@@ -135,7 +135,7 @@ func TestObservation_RenderBlockedImagePullStory(t *testing.T) {
|
||||
Severity: "error",
|
||||
Message: "pod kube-system/sw-block-csi-node-abc waiting=ImagePullBackOff",
|
||||
}},
|
||||
NextActions: []string{"import the image to m02 or use a registry reachable by all nodes"},
|
||||
NextActions: []string{"import the image to node-b or use a registry reachable by all nodes"},
|
||||
}}
|
||||
|
||||
text := RenderClusterEvidenceText(cluster)
|
||||
@@ -143,7 +143,7 @@ func TestObservation_RenderBlockedImagePullStory(t *testing.T) {
|
||||
"cluster status=blocked volumes=1 nodes=1",
|
||||
"volume pvc-blocked status=blocked rf=3 reason=csi_node_image_pull_failed",
|
||||
"condition Attach severity=error reason=csi_node_image_pull_failed pod kube-system/sw-block-csi-node-abc waiting=ImagePullBackOff",
|
||||
"next action: import the image to m02 or use a registry reachable by all nodes",
|
||||
"next action: import the image to node-b or use a registry reachable by all nodes",
|
||||
} {
|
||||
if !strings.Contains(text, want) {
|
||||
t.Fatalf("text missing %q:\n%s", want, text)
|
||||
@@ -202,14 +202,14 @@ func healthyObservationVolume() VolumeEvidence {
|
||||
ObservedReplicas: 3,
|
||||
Status: ObservationStatusOK,
|
||||
PrimaryReplica: "r1",
|
||||
PrimaryNode: "m01",
|
||||
PrimaryNode: "node-a",
|
||||
PublishTarget: "192.168.1.181:3260",
|
||||
Epoch: 1,
|
||||
EndpointVersion: 1,
|
||||
Replicas: []ReplicaEvidence{
|
||||
{
|
||||
ReplicaID: "r1",
|
||||
KubernetesNode: "m01",
|
||||
KubernetesNode: "node-a",
|
||||
Role: "primary",
|
||||
ReplicationRole: "none",
|
||||
DurableFrontierKnown: true,
|
||||
@@ -217,7 +217,7 @@ func healthyObservationVolume() VolumeEvidence {
|
||||
},
|
||||
{
|
||||
ReplicaID: "r2",
|
||||
KubernetesNode: "m02",
|
||||
KubernetesNode: "node-b",
|
||||
Role: "unknown",
|
||||
ReplicationRole: "replica_ready",
|
||||
DurableFrontierKnown: true,
|
||||
@@ -227,7 +227,7 @@ func healthyObservationVolume() VolumeEvidence {
|
||||
},
|
||||
{
|
||||
ReplicaID: "r3",
|
||||
KubernetesNode: "tp01",
|
||||
KubernetesNode: "node-c",
|
||||
Role: "unknown",
|
||||
ReplicationRole: "replica_ready",
|
||||
DurableFrontierKnown: true,
|
||||
|
||||
@@ -94,11 +94,11 @@ func TestOperatorFoundationSnapshot_BlockedVolumeCarriesWarningEvent(t *testing.
|
||||
Status: ObservationStatusBlocked,
|
||||
Reason: ReasonPublishTargetLoopbackCrossNode,
|
||||
PrimaryReplica: "r1",
|
||||
PrimaryNode: "m01",
|
||||
PrimaryNode: "node-a",
|
||||
PublishTarget: "127.0.0.1:3260",
|
||||
Replicas: []ReplicaEvidence{{
|
||||
ReplicaID: "r1",
|
||||
KubernetesNode: "m01",
|
||||
KubernetesNode: "node-a",
|
||||
Observed: true,
|
||||
Role: "primary",
|
||||
FrontendAddr: "127.0.0.1:3260",
|
||||
@@ -154,16 +154,16 @@ func TestOperatorFoundationSnapshot_CountsStaleEvidenceVolumes(t *testing.T) {
|
||||
func TestOperatorFoundationSnapshot_IncludesNodeReadiness(t *testing.T) {
|
||||
cluster := NewClusterEvidence(time.Date(2026, 6, 5, 16, 30, 0, 0, time.UTC))
|
||||
cluster.Nodes = []NodeEvidence{{
|
||||
NodeName: "m02",
|
||||
KubernetesNode: "m02",
|
||||
NodeName: "node-b",
|
||||
KubernetesNode: "node-b",
|
||||
InternalIP: "192.168.1.184",
|
||||
Schedulable: true,
|
||||
Ready: true,
|
||||
ReplicaCount: 1,
|
||||
RequiredImages: []string{"sw-block:local"},
|
||||
}, {
|
||||
NodeName: "tp01",
|
||||
KubernetesNode: "tp01",
|
||||
NodeName: "node-c",
|
||||
KubernetesNode: "node-c",
|
||||
InternalIP: "192.168.1.188",
|
||||
Schedulable: true,
|
||||
Ready: true,
|
||||
|
||||
@@ -19,7 +19,7 @@ func TestPhase32D3ReadyStatusSurfacesAgree(t *testing.T) {
|
||||
AckProfile: "best-effort",
|
||||
Status: ObservationStatusOK,
|
||||
PrimaryReplica: "r1",
|
||||
PrimaryNode: "m02",
|
||||
PrimaryNode: "node-b",
|
||||
PublishTarget: "127.0.0.1:3260",
|
||||
Epoch: 1,
|
||||
EndpointVersion: 1,
|
||||
@@ -38,7 +38,7 @@ func TestPhase32D3ReadyStatusSurfacesAgree(t *testing.T) {
|
||||
Epoch: 1,
|
||||
EndpointVersion: 1,
|
||||
},
|
||||
CSIStages: []CSIStageFact{{NodeName: "m02", Target: "127.0.0.1:3260"}},
|
||||
CSIStages: []CSIStageFact{{NodeName: "node-b", Target: "127.0.0.1:3260"}},
|
||||
Workload: &WorkloadCheckFact{WriterVerified: true, ReaderVerified: true},
|
||||
EvidenceRefs: []string{"writer.log", "reader.log"},
|
||||
})}
|
||||
@@ -104,7 +104,7 @@ func TestPhase32D4BlockedStatusSurfacesAgree(t *testing.T) {
|
||||
PVCName: "demo-pvc",
|
||||
PVC: &PVCFact{Phase: "Bound"},
|
||||
KubernetesNodes: []KubernetesNodeFact{{
|
||||
NodeName: "m02",
|
||||
NodeName: "node-b",
|
||||
Ready: true,
|
||||
Schedulable: true,
|
||||
CSINodeReady: false,
|
||||
@@ -178,7 +178,7 @@ func TestPhase32D5RestartPromotionStatusSurfacesAgree(t *testing.T) {
|
||||
Status: ObservationStatusOK,
|
||||
Reason: "authority_persisted",
|
||||
PrimaryReplica: "r2",
|
||||
PrimaryNode: "m02",
|
||||
PrimaryNode: "node-b",
|
||||
PublishTarget: "192.168.1.184:3260",
|
||||
Epoch: 2,
|
||||
EndpointVersion: 1,
|
||||
@@ -202,13 +202,13 @@ func TestPhase32D5RestartPromotionStatusSurfacesAgree(t *testing.T) {
|
||||
},
|
||||
Replicas: []ReplicaFact{{
|
||||
ReplicaID: "r1",
|
||||
KubernetesNode: "m01",
|
||||
KubernetesNode: "node-a",
|
||||
Role: "unavailable",
|
||||
Observed: false,
|
||||
StalePrimaryFenced: true,
|
||||
}, {
|
||||
ReplicaID: "r2",
|
||||
KubernetesNode: "m02",
|
||||
KubernetesNode: "node-b",
|
||||
Role: "primary",
|
||||
Observed: true,
|
||||
DurableFrontierKnown: true,
|
||||
@@ -216,14 +216,14 @@ func TestPhase32D5RestartPromotionStatusSurfacesAgree(t *testing.T) {
|
||||
FrontendAddr: "192.168.1.184:3260",
|
||||
}, {
|
||||
ReplicaID: "r3",
|
||||
KubernetesNode: "tp01",
|
||||
KubernetesNode: "node-c",
|
||||
Role: "replica",
|
||||
Observed: true,
|
||||
DurableFrontierKnown: true,
|
||||
DurableFrontierLSN: 52,
|
||||
}},
|
||||
CSIStages: []CSIStageFact{{
|
||||
NodeName: "m02",
|
||||
NodeName: "node-b",
|
||||
Target: "192.168.1.184:3260",
|
||||
Epoch: 2,
|
||||
EndpointVersion: 1,
|
||||
@@ -235,7 +235,7 @@ func TestPhase32D5RestartPromotionStatusSurfacesAgree(t *testing.T) {
|
||||
|
||||
summary := RenderObservationReportSummary(cluster)
|
||||
for _, want := range []string{
|
||||
"volume=pvc-restart status=ok pvc=default/demo-pvc primary=r2@m02 frontend=192.168.1.184:3260 rf=3 ack=sync-quorum",
|
||||
"volume=pvc-restart status=ok pvc=default/demo-pvc primary=r2@node-b frontend=192.168.1.184:3260 rf=3 ack=sync-quorum",
|
||||
"managed_volume=pvc-restart status=recovered reason=csi_reattach_recovered",
|
||||
"managed_volume_condition=Ready status=True reason=csi_reattach_recovered severity=info",
|
||||
"managed_volume_condition=Recovered status=True reason=csi_reattach_recovered severity=info",
|
||||
@@ -261,9 +261,9 @@ func TestPhase32D5RestartPromotionStatusSurfacesAgree(t *testing.T) {
|
||||
func TestPhase32D6MultiVolumeStatusSurfacesKeepVolumesIndependent(t *testing.T) {
|
||||
cluster := NewClusterEvidence(time.Date(2026, 5, 25, 22, 15, 0, 0, time.UTC))
|
||||
cluster.Volumes = []VolumeEvidence{
|
||||
phase32VolumeEvidence("pvc-a", "app-a", "r1", "m01", "192.168.1.181:3260"),
|
||||
phase32VolumeEvidence("pvc-b", "app-b", "r2", "m02", "192.168.1.184:3260"),
|
||||
phase32VolumeEvidence("pvc-c", "app-c", "r3", "tp01", "192.168.1.188:3260"),
|
||||
phase32VolumeEvidence("pvc-a", "app-a", "r1", "node-a", "192.168.1.181:3260"),
|
||||
phase32VolumeEvidence("pvc-b", "app-b", "r2", "node-b", "192.168.1.184:3260"),
|
||||
phase32VolumeEvidence("pvc-c", "app-c", "r3", "node-c", "192.168.1.188:3260"),
|
||||
}
|
||||
cluster.ManagedVolumes = []ManagedVolumeProjection{
|
||||
phase32ReadyManagedProjection("pvc-a", "app-a", "r1", "192.168.1.181:3260"),
|
||||
@@ -298,9 +298,9 @@ func TestPhase32D6MultiVolumeStatusSurfacesKeepVolumesIndependent(t *testing.T)
|
||||
|
||||
summary := RenderObservationReportSummary(cluster)
|
||||
for _, want := range []string{
|
||||
"volume=pvc-a status=ok pvc=default/app-a primary=r1@m01 frontend=192.168.1.181:3260 rf=3 ack=sync-quorum",
|
||||
"volume=pvc-b status=ok pvc=default/app-b primary=r2@m02 frontend=192.168.1.184:3260 rf=3 ack=sync-quorum",
|
||||
"volume=pvc-c status=ok pvc=default/app-c primary=r3@tp01 frontend=192.168.1.188:3260 rf=3 ack=sync-quorum",
|
||||
"volume=pvc-a status=ok pvc=default/app-a primary=r1@node-a frontend=192.168.1.181:3260 rf=3 ack=sync-quorum",
|
||||
"volume=pvc-b status=ok pvc=default/app-b primary=r2@node-b frontend=192.168.1.184:3260 rf=3 ack=sync-quorum",
|
||||
"volume=pvc-c status=ok pvc=default/app-c primary=r3@node-c frontend=192.168.1.188:3260 rf=3 ack=sync-quorum",
|
||||
} {
|
||||
if !strings.Contains(summary, want) {
|
||||
t.Fatalf("summary missing %q:\n%s", want, summary)
|
||||
|
||||
@@ -326,7 +326,7 @@ func TestAFreshStoreAtLevelOneRunsNoUpgradePass(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// A store created at level 1 is born v1.1 (r2.882): its compare record is
|
||||
// A store created at level 1 is born v1.1: its compare record is
|
||||
// written as done, so a restart before its first cut (no longer created
|
||||
// this start) runs no pass either and its first cut is not held.
|
||||
func TestAStoreCreatedAtLevelOneNeverRunsTheUpgradePass(t *testing.T) {
|
||||
|
||||
@@ -55,7 +55,7 @@ func (l *chunkLayerImpl) openChunkRecordV11() (*chunkRecordShadow, error) {
|
||||
seed := &upgradeSeed{proof: l.cfg.CleanStop, head: l.head, ref: l.headRef, zero: l.zeroChunkSum()}
|
||||
err = upgradeChunkRecordSeeded(l.ctx, s, epoch, seed, l.attachProgress.add)
|
||||
}
|
||||
// A store this start created is born v1.1 (r2.882): there is nothing to
|
||||
// A store this start created is born v1.1: there is nothing to
|
||||
// compare (every chunk known-zero or absent), so its compare record is
|
||||
// written as done and the upgrade pass never runs for it, on this start
|
||||
// or a later one. A crash before this write leaves the upgrade's first
|
||||
|
||||
@@ -28,7 +28,7 @@ func chunkRecordStateCode(k chunkkernel.Kind) (uint8, error) {
|
||||
|
||||
// kindByCode is chunkRecordKind for a code the runtime itself stored (every
|
||||
// one valid): the record keeps each chunk's state as its one-byte page code,
|
||||
// not the kernel's string (16 B a chunk; r2.735).
|
||||
// not the kernel's string (16 B a chunk).
|
||||
var kindByCode = [6]chunkkernel.Kind{1: chunkkernel.Absent, 2: chunkkernel.Partial, 3: chunkkernel.Unknown, 4: chunkkernel.HashUnpublished, 5: chunkkernel.HashPublished}
|
||||
|
||||
func chunkRecordKind(code uint8) (chunkkernel.Kind, error) {
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
var errRefBeyondVolume = errors.New("storage: chunk reference beyond the volume")
|
||||
|
||||
// refTable is the holder's copy of the references HEAD names, one entry a
|
||||
// chunk, in fixed width (r2.777): what the flat chunk map held, without a
|
||||
// chunk, in fixed width: what the flat chunk map held, without a
|
||||
// per-entry key string or map overhead. It sits behind a narrow interface
|
||||
// (Get, Set, Delete, FillSegment, Len) so that a paged form can replace it
|
||||
// without touching its readers.
|
||||
@@ -37,7 +37,7 @@ type refTable struct {
|
||||
const prefixOther = ^uint16(0)
|
||||
|
||||
// chunkRefs is the narrow interface the layer reads HEAD's references
|
||||
// through (r2.777): a paged form can replace refTable behind it without
|
||||
// through: a paged form can replace refTable behind it without
|
||||
// touching a reader. Get, Set and Delete are O(1); FillSegment is O(its
|
||||
// range); Len is O(1).
|
||||
type chunkRefs interface {
|
||||
|
||||
@@ -141,7 +141,7 @@ func TestSpaceMeasurementControls(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// The SPACE baseline (V4-B PR 4's red, r2.736/r2.777): the holder's heap per
|
||||
// The SPACE baseline (V4-B PR 4's red): the holder's heap per
|
||||
// chunk for a 1 TiB volume's chunk count (262,144; one-block chunks, which
|
||||
// TestSpaceMeasurementControls shows stand for 4 MiB ones), every chunk
|
||||
// named by HEAD with canonical keys owned by the layer, after GC once the
|
||||
|
||||
@@ -13,7 +13,7 @@ It is intentionally small:
|
||||
- iSCSI mount into a pod
|
||||
- CSI `DeleteVolume` cleanup path exercised by the alpha smoke harness
|
||||
|
||||
The verified lab path is M02 single-node k3s. Treat this as an alpha MVP for
|
||||
The verified lab path is a single-node k3s cluster. Treat this as an alpha MVP for
|
||||
evaluation and contributor onboarding, not production storage.
|
||||
|
||||
## Current Storage Path
|
||||
|
||||
@@ -123,7 +123,7 @@ side payloads and preservation of other-prefix files/directories.
|
||||
## Backend proxy result
|
||||
|
||||
The source-identical `BenchmarkCutCOWProxy` was run parent/candidate interleaved
|
||||
three times, each row with three cuts, on tp04 (i7-13700, Go reports GOMAXPROCS
|
||||
three times, each row with three cuts, on a lab host (i7-13700, Go reports GOMAXPROCS
|
||||
24; actual work stays under the runner's quota). Parent is main d0e3895a plus
|
||||
only the benchmark, ref 3faecbd4. Candidate timing head is ee6c6f3b. Staging is
|
||||
disabled, copy/upload concurrency is 8, chunks are 4 MiB and each released
|
||||
|
||||
@@ -547,8 +547,6 @@ Tests: `TestMaintenanceKickRunsAPassNow`, `TestMaintenanceKickedBusyPassRetriesS
|
||||
`TestDefaultConfigCleansAfterEachSnapshotDelete`. Detach/fence/Close cancels and joins before
|
||||
catalog/storage release; only a still-current handle may re-arm after safe abort.
|
||||
A pass has no total deadline. Its one-minute no-progress window renews only on a strict advance of this pass's finite (phase, cursor) work position; a stalled pass answers `no_progress`. Each remote request has a separate 30 s deadline; request attempts never renew the window. The existing cursor resumes later; retention failure skips cleaning.
|
||||
A scoped GC pass traces the whole catalog but mutates only its target volume,
|
||||
with a separate scope/config-bound mark. Incomplete marks carry no coverage.
|
||||
|
||||
The scheduled-snapshot worker runs beside it under the same owner and join, on
|
||||
in-process monotonic time: `Armed -> Due -> Running -> Armed`. A success sets the
|
||||
@@ -1038,7 +1036,7 @@ Notes:
|
||||
| `INV-WS-HEAD-KEY-PROVENANCE-001` | RETIRED at the cut-over to the content-named store: intents are gone and a content name may be written again. Replaced by `INV-SNAPK-COMMIT-REACH-001`. | M5 Manifest → CAS | — (`PrepareManifest` and `core/frontend/chunkstore/manifest.go` were deleted) | — | — | ARCHIVED |
|
||||
| `INV-WS-REOPEN-FENCE-001` | Retired: the legacy same-holder reopen replaced HEAD generation. B fences by claim id and local-root lineage (`INV-SNAPK-START-ROOT-001`, `INV-SNAPK-START-CLAIM-001`, `INV-SNAPK-STALE-HOLDER-001`); an ordinary same-root reopen may leave HEAD unchanged. | legacy M4 | — | — | — | ARCHIVED |
|
||||
| `INV-WS-SEALED-REOPEN-001` | A same-epoch Start cannot reactivate a detached HEAD: it refuses before another HEAD update or serving, preserving its current root, position and detached state for a higher-epoch claimant. | M9 detached → higher-epoch idle | `core/frontend/chunkstore/layout/start.go` `Start`; `core/frontend/chunkstore/layout/claim.go` `Claim` | `TestCommitDetached_ProofAndLostReply`, `TestDetachedHEAD_RefusesEveryHolderTransition` (`core/frontend/chunkstore/layout/detached_test.go`); `TestRestoreEqualOwnerDetachedHEADStaysSealed` (`core/frontend/durable/provider_seed_order_test.go`) | `INV-SNAPK-DETACHED-001` | ACTIVE |
|
||||
| `INV-WS-SEAL-REPLAY-001` | A repeated plain seal, also after a same-epoch detached restart, succeeds only from a fresh B HEAD with exact epoch, holder and local claim id. It returns that HEAD/frontier without a new generation. An unreadable or mismatched proof cannot be answered from process memory. | B detached HEAD read | `core/frontend/durable/provider_seal_replay.go` `replayPlainSeal`, `readLayoutSeal`; `cmd/blockvolume/workspace_lease.go` `workspaceLayoutDetachedGeneration` | `TestLayoutPlainDetachReplayAfterRestartNeedsNoLegacyFactory` (`core/frontend/durable/provider_layout_plain_replay_test.go`); `TestWorkspaceLayoutDetachedProof` (`cmd/blockvolume/workspace_layout_proof_test.go`) | K1: detached proof belongs to the exact claim | ACTIVE |
|
||||
| `INV-WS-SEAL-REPLAY-001` | A repeated plain seal, also after a same-epoch detached restart, succeeds only from a fresh B HEAD with exact epoch, holder and local claim id. It returns that HEAD/frontier without a new generation. An unreadable or mismatched proof cannot be answered from process memory. | B detached HEAD read | `core/frontend/durable/provider_seal_replay.go` `replayPlainSeal`, `readLayoutSeal`; `cmd/blockvolume/workspace_lease.go` `workspaceLayoutDetachedGeneration` | `TestLayoutPlainDetachReplayAfterRestartNeedsNoLegacyFactory` (`core/frontend/durable/provider_layout_plain_replay_test.go`); `TestWorkspaceLayoutDetachedProof` (`cmd/blockvolume/workspace_layout_proof_test.go`) | K1: detached proof belongs to the exact claim; `PlainSealReplay` `SuccessNeedsFreshExactProof`, `ValidProofDoesNotNeedProcessMemory` (mutants `PlainSealReplay_memory`, `PlainSealReplay_no_exact`, `PlainSealReplay_layer`) | ACTIVE |
|
||||
| `INV-WS-CAS-UNKNOWN-001` | An unknown HEAD CAS outcome is settled by re-reading HEAD, never by a blind retry; until it is settled the proposal stays pending and its session stays open; settlement replays the same commit in it. | M5 CAS → Pending | `core/storage/chunk_layer.go` `captureLocked`, `resolvePending`; `core/frontend/chunkstore/layout_remote.go` | `TestChunkLayer_C6_UnknownNotAppliedNeverClaimsSuccess` (`core/storage/chunk_layer_contract_test.go`); `TestSession_UncertainCommitIsNotAbortedUntilSettled` (`core/storage/chunk_layer_session_test.go`); `TestLayoutRemote_LostReplyOfTheFirstCutIsNotAFence`, `TestLayoutRemote_LostReplyOfALaterCutWithAnInheritedChunkIsNotAFence`, `TestLayoutRemote_LostReplyOfANoOpCutIsNotAFence` (`core/frontend/chunkstore/layout_remote_same_proposal_test.go`); `TestLevelZeroCutRefusalDoesNotBecomeAnUnresolvedPublication` (`core/frontend/chunkstore/layout_format_refusal_test.go`); `TestARefusedReproposalDoesNotSettleAnEarlierUnknownWrite`, `TestARefusedConfirmationReadDoesNotUnpublishTheSuccessfulWrite` (`core/storage/chunk_head_refusal_test.go`) | — | ACTIVE |
|
||||
| `INV-WS-CLAIM-BEFORE-SERVE-001` | A new B holder claims HEAD at its issued epoch only after the local root is validated against the HEAD it updates; an older epoch or another holder at the same epoch is refused, and guest writes stay closed until assignment and claim. | M9 Start → Claim → Serving | `core/frontend/chunkstore/layout/start.go` `Start`; `core/frontend/durable/provider_layout.go` `startLayoutRoot` | `TestStart_ValidatesAgainstTheHeadItUpdates`, `TestStart_Refusals` (`core/frontend/chunkstore/layout/start_test.go`); `TestStart_TheClaimRechecksTheSeedRule` (`core/frontend/chunkstore/layout/start_seed_test.go`); `TestFreshStoreRefusesWriteBeforeAssignmentThenPublishesAfterClaim` (`core/frontend/durable/provider_restore_schedule_test.go`) | `INV-SNAPK-START-LINEAGE-001`, `INV-SNAPK-START-CLAIM-001` | ACTIVE |
|
||||
| `INV-VOL-GEOMETRY-FLAGS-RECORD-001` | A create-mode start whose `--durable-blocks`/`--durable-blocksize` disagree with the volume record exits 78 before any local store exists; an existing store is checked only at attach; an absent record keeps the create path; an unread record exits 75 (filer failed) or 78 (corrupt). | blockvolume startup (before the durable provider) | `cmd/blockvolume/main.go`; `cmd/blockvolume/chunk_remote.go` `geometryFlagsRefusal`; `core/frontend/chunkstore/layout/volume.go`, `start.go`, `create.go`; `core/frontend/chunkstore/catalog_b.go` | `TestGeometryFlagsRefusalComparesTheRecord`, `TestVolumeRequiresGeometry`, `TestVolumeGeometryChecksAndIsImmutable`, `TestStartGeometryMismatchPrecedesClaim`, `TestBCatalogRestoreCopiesVolumeGeometry`, `TestVolumeGeometryLivesOnlyInVolume` | K3: immutable required VOLUME geometry; Start checks the local persisted shape before claim; restores copy source geometry; no resize or compatibility path. | ACTIVE |
|
||||
@@ -1165,8 +1163,8 @@ Notes:
|
||||
| `INV-HOST-CUT-BUDGET-001` | A cooperating cut process holds a host OS slot from its admission, before staging or the capture barrier: see M7 free → admitted. | M7 free → admitted | `core/hostlimit/limiter.go` `Admit`; `core/storage/chunk_cut_budget.go`; blockvolume host-limit flags | `TestSlotsUrgentAndJoinedRelease` (`core/hostlimit/limiter_test.go`); `TestHostCutLimitDoesNotGateGuestIO` (`core/frontend/durable/host_limit_test.go`) | `HostBudget` HeldUntilJoined/PayloadBound/SpillBound (bounded OS-lock abstraction; fallback excluded) | ACTIVE |
|
||||
| `INV-HOST-CUT-BUDGET-RESERVE-001` | Each admitted slot, urgent included, carries at most PayloadBytes of cut payload and at most COWBytes of COW side bytes; a reservation beyond COWBytes revokes the slot and aborts its cut. | M7 admitted | `core/hostlimit/limiter.go` `Admit`, `ReserveCOW`; `core/storage/chunk_cut_budget.go` | `TestHostCOWCapAbortsCutAndRetainsPermitUntilJoin` (`core/storage/chunk_host_budget_test.go`); `TestSlotsUrgentAndJoinedRelease` (`core/hostlimit/limiter_test.go`) | `HostBudget` PayloadBound/SpillBound | ACTIVE |
|
||||
| `INV-HOST-CUT-BUDGET-SETTLE-001` | A slot's OS lock is released only after its cut's workers settle and Release is called; cancellation, hold expiry and limiter Close abort the cut but keep the slot until then. | M7 draining → joined → released | `core/hostlimit/limiter.go` `Release`, `releaseLoop`, `revoke`, `Close`; `core/storage/chunk_layer.go` `captureLocked` | `TestCOWAbortHoldsSlotUntilWorkerSettlement`, `TestHoldExpiryAndCloseDoNotSteal`, `TestKilledProcessReleasesButLiveHolderDoesNot` (`core/hostlimit/limiter_test.go`); `TestHostCOWCapAbortsCutAndRetainsPermitUntilJoin` (`core/storage/chunk_host_budget_test.go`) | `HostBudget` HeldUntilJoined | ACTIVE |
|
||||
| `INV-MAINTENANCE-BATCH-001` | Cleaning releases HEAD activity after min(1000 decisions, 5 s), checked between decisions. Preparation normally stays outside; re-entry validates its HEAD. Unknown close settles before cursor advancement. Busy answers are typed retryable layout_busy. | M8 Running → Running | `core/frontend/chunkstore/clean_b.go` `endCleanBatch`; `core/frontend/chunkstore/layout/remove.go` `ResetReachability` | `TestMaintenanceFiveSecondBatchLetsSnapshotDeleteFinish`, `TestMaintenanceSlowPreparationDoesNotHoldSession`, `TestMaintenanceBatchRefusesPublicationAfterPreparation`, `TestMaintenanceBatchPreparationAbsentHeadRefuses`, `TestMaintenanceLongPassReleasesLayoutBetweenBatches`, `TestMaintenanceBatchDropsReachabilityAfterPublication`, `TestMaintenanceBatchSettlesUnknownCloseBeforeReentry`, `TestMaintenanceDelayedClosePublicationInvalidatesNextPage`, `TestSnapshotDeleteLayoutBusyIsTypedRetryable`, `TestSnapshotDeleteCLILayoutBusyIsTypedRetryable`, `TestSnapshotDeleteCLIRetriesBusyWithSameIdentityWithinWindow` | SnapshotRemoval BeginClean/EndClean; StaleClean r2 159-161; r2.950(2), r2.955 | STUB |
|
||||
| `INV-MAINTENANCE-LIVENESS-001` | Three refusals without advancing the stuck page arm activity-held preparation for every revisit until that position advances. Its reads share the session hold cap. A waiting same-catalog publisher enters before the next batch; cancellation withdraws its mark. | M8 Running -> Running | `core/frontend/chunkstore/clean_b.go` `RemoveUnreachableAll`; `core/frontend/chunkstore/clean_admission.go`; `core/frontend/chunkstore/layout_remote.go` `beginSessionLocked` | `TestMaintenanceRepeatedPreparationPublicationFallsBackAfterThreeRefusals`, `TestMaintenanceFallbackPreparationSharesSessionCap`, `TestMaintenanceWaitingPublisherRunsBeforeNextBatch`, `TestMaintenanceCancelledPublisherWithdrawsItsMark`, `TestMaintenanceRetainPublisherPrecedesANewCleanPass`, `TestMaintenanceNestedCatalogPublishersDoNotSelfDeadlock`, `TestMaintenancePartialMultiVolumeAdmissionUnwindsOnCancellation`, `TestMaintenanceReleasedBatchContextCannotBypassANewBatch`, `TestMaintenanceCrossVolumeCallbackDoesNotWaitWhileHoldingAClean`, `TestBCatalog_OperatorSnapshotDeleteDuringACleaning` | CleanBatch r2 NoStarve / HoldCap / PubWaitOne; r2.956 | STUB |
|
||||
| `INV-MAINTENANCE-BATCH-001` | Cleaning releases HEAD activity after min(1000 decisions, 5 s), checked between decisions. Preparation normally stays outside; re-entry validates its HEAD. Unknown close settles before cursor advancement. Busy answers are typed retryable layout_busy. | M8 Running → Running | `core/frontend/chunkstore/clean_b.go` `endCleanBatch`; `core/frontend/chunkstore/layout/remove.go` `ResetReachability` | `TestMaintenanceFiveSecondBatchLetsSnapshotDeleteFinish`, `TestMaintenanceSlowPreparationDoesNotHoldSession`, `TestMaintenanceBatchRefusesPublicationAfterPreparation`, `TestMaintenanceBatchPreparationAbsentHeadRefuses`, `TestMaintenanceLongPassReleasesLayoutBetweenBatches`, `TestMaintenanceBatchDropsReachabilityAfterPublication`, `TestMaintenanceBatchSettlesUnknownCloseBeforeReentry`, `TestMaintenanceDelayedClosePublicationInvalidatesNextPage`, `TestSnapshotDeleteLayoutBusyIsTypedRetryable`, `TestSnapshotDeleteCLILayoutBusyIsTypedRetryable`, `TestSnapshotDeleteCLIRetriesBusyWithSameIdentityWithinWindow` | SnapshotRemoval BeginClean/EndClean; StaleClean r2 159-161 | STUB |
|
||||
| `INV-MAINTENANCE-LIVENESS-001` | Three refusals without advancing the stuck page arm activity-held preparation for every revisit until that position advances. Its reads share the session hold cap. A waiting same-catalog publisher enters before the next batch; cancellation withdraws its mark. | M8 Running -> Running | `core/frontend/chunkstore/clean_b.go` `RemoveUnreachableAll`; `core/frontend/chunkstore/clean_admission.go`; `core/frontend/chunkstore/layout_remote.go` `beginSessionLocked` | `TestMaintenanceRepeatedPreparationPublicationFallsBackAfterThreeRefusals`, `TestMaintenanceFallbackPreparationSharesSessionCap`, `TestMaintenanceWaitingPublisherRunsBeforeNextBatch`, `TestMaintenanceCancelledPublisherWithdrawsItsMark`, `TestMaintenanceRetainPublisherPrecedesANewCleanPass`, `TestMaintenanceNestedCatalogPublishersDoNotSelfDeadlock`, `TestMaintenancePartialMultiVolumeAdmissionUnwindsOnCancellation`, `TestMaintenanceReleasedBatchContextCannotBypassANewBatch`, `TestMaintenanceCrossVolumeCallbackDoesNotWaitWhileHoldingAClean`, `TestBCatalog_OperatorSnapshotDeleteDuringACleaning` | CleanBatch r2 NoStarve / HoldCap / PubWaitOne | STUB |
|
||||
| `INV-MAINTENANCE-NO-PROGRESS-001` | Maintenance has no total deadline. Only a strict advance of the finite (phase, cursor) work position renews its window; requests are separately bounded. No progress for the window fails typed no_progress; cancellation joins before release and the existing cursor resumes later. | M8 Running → Armed | `core/frontend/durable/maintenance_progress.go` `maintenancePass`; `core/frontend/chunkstore/layout/remove.go` `removePlanned`; `core/frontend/chunkstore/maintenance_request.go` `maintenanceCall` | `TestMaintenanceProgressingPastOneMinuteCompletes`, `TestMaintenanceRepeatedPositionDoesNotHideAStall`, `TestMaintenanceSilentPassReturnsTypedNoProgress`, `TestCleaningReportsProcessedObjects`, `TestRealMaintenanceProgressingPastOneMinuteCompletes`, `TestRealMaintenancePreparationAndRemovalEachOutliveWindow`, `TestMaintenanceListPreparationReportsOnlyAuthenticatedPages`, `TestMaintenanceReachabilityProgressesAcrossTheWindow`, `TestMaintenanceLookupRetriesItsOwnDeadlineWithoutProgress`, `TestMaintenanceReplayedPhaseCannotRenewWindow`, `TestMaintenanceFiniteStagesCanCompleteAcrossWindow`, `TestMaintenanceTagPositionCountsCompletedWorkOnly`, `TestMaintenanceIntentCursorAdvancesAcrossPages`, `TestMaintenanceProgressStateDoesNotAllocatePerObject`, `TestMaintenanceProgressRetainedBytesStayBounded`, `TestMaintenanceFenceWithNilSettlementDoesNotCountSuccess`, `TestMaintenanceUnknownCreateKeepsLinkedUploadAndSettles`, `TestMaintenanceBlobPutDoesNotRepeatUnknownAssignment` | CutTime window rule; GRID-v11-r8 maintenance pass × wall time | STUB |
|
||||
| `INV-HOST-HOLD-NO-PROGRESS-001` | A held slot is revoked only after its no-progress window passes with no reported progress of its work (a chunk compared, staged or uploaded by its cut): work that keeps progressing is never revoked, and a stalled hold is revoked within the window. | M7 admitted → draining (revoked) | `core/hostlimit/limiter.go` `Admit`, `Progress`, `expire`; `core/storage/chunk_cut_budget.go` `BudgetProgress`, `budgetProgress`; `core/storage/chunk_cut_observation.go` `progressed`; `core/storage/chunk_layer.go` `captureLocked` | `TestStalledHoldIsRevokedWithinTheWindow`, `TestProgressRenewsTheHold` (`core/hostlimit/limiter_progress_test.go`); `TestProgressRacingTheExpiryIsHonoured`, `TestProgressDoesNotWaitForTheLimiterLock`, `TestProgressStampIsMonotonicElapsed` (`core/hostlimit/limiter_review_test.go`); `TestCutReportsProgressToItsBudget` (`core/storage/chunk_cut_hold_progress_test.go`) | SlotShare (its progress-window rule; the share rule is a later change) | ACTIVE |
|
||||
| `INV-HOST-FETCH-CAP-001` | A chunk fetch holds one of the host's FetchSlots across its remote read only; a limiter's first fetch checks the host configuration (ErrConfig on a mismatch). With all held it waits, never refused: unordered, bounded by its context alone. Only non-blocking tries: an ended wait leaves nothing. | M7 (fetch slots, beside the cut slots) | `core/hostlimit/fetch.go` `HoldFetch`, `checkFetchConfig`, `waitFetch`; `core/hostlimit/limiter.go` `configGuard`; `core/storage/chunk_layer.go` `fillOnce`; `core/storage/chunk_cut_budget.go` `BudgetFetch` | `TestHoldFetchTakesAFreeSlotAtOnce`, `TestHoldFetchCapHoldsAcrossLimiters`, `TestHoldFetchAWaiterThatGivesUpLeavesNoSlotHeld`, `TestHoldFetchTakesAnotherSlotThatFreesFirst` (`core/hostlimit/fetch_test.go`); `TestHoldFetchFirstFetchChecksTheHostConfiguration`, `TestHoldFetchSlotDiesWithItsProcess`, `TestHoldFetchEndedWaitsLeaveNothingBehind`, `TestHoldFetchCancelledAtTheHandoffHoldsNothing`, `TestHoldFetchAPassedWaiterEndsByItsDeadline` (`core/hostlimit/fetch_review_test.go`); `TestChunkFetchHoldsAHostSlotAroundItsRemoteRead` (`core/storage/chunk_fetch_cap_test.go`) | — (a resource cap with no state of its own) | ACTIVE |
|
||||
@@ -1208,14 +1206,14 @@ Notes:
|
||||
| `INV-CUT-TIMER-SKIP-001` | A periodic cut decided from an older last cut is skipped under the capture lock: no automatic cut follows another within the interval. | M5 periodic trigger (before Admit) | `core/storage/chunk_periodic_cut.go` `CutUnlessCutSince`; `core/frontend/durable/provider_chunk.go` `chunkLoop` | `TestChunkPeriodicCut_SkipsAfterANewerCut`, `TestChunkPeriodicCut_SkipsANewerCutWithAnOlderStamp` (`core/storage/chunk_periodic_cut_test.go`); `TestWALStoreChunk_ExplicitCutOverlappingTheTimerRestartsIt` (`core/frontend/durable/provider_chunk_sched_test.go`) | — | ACTIVE |
|
||||
| `INV-CUT-TIMER-SLOT-WAIT-001` | A periodic cut refused for held host slots, pending urgent work or an earlier ticket is a wait, not a failure: no backoff or minimum spacing; it retries at the next poll in ticket order, and status reports the wait until any later cut succeeds. Other errors keep the backoff. | M5 periodic trigger (before Admit) | `core/frontend/durable/provider_chunk.go` `cutPolicy.after`, `chunkLoop`; `core/hostlimit/limiter.go` `ErrSlotsHeld` | `TestCutPolicy_HostSlotBusyIsAWaitNotAFailure`, `TestCutPolicy_SuccessDuringSlotWaitEndsTheWait`, `TestCutWaitSlot_StatusEndsTheWaitAfterALaterCut`, `TestCutPolicy_TicketOrderWaitBound` (`core/frontend/durable/cut_policy_test.go`); `TestTimerCutRunsSoonAfterHostSlotFrees`, `TestSlotWaitEndsWithASuccessfulDetachSeal` (`core/frontend/durable/host_slot_wait_test.go`); `TestAdmitClosedDuringPoolAcquisitionIsRevoked` (`core/hostlimit/limiter_test.go`) | — | ACTIVE |
|
||||
| `INV-SNAPSHOT-ANSWER-COUNT-001` | Newly produced snapshot creation and listing answers omit the uncomputed chunk count; no manifest scan is added to answer a snapshot. | M9 snapshot answer projection (no transition change) | `core/frontend/chunkstore/control_types.go`, `api.go`; `core/host/volume/chunk_control.go` | `TestSnapshotAfter200MiBWritesOmitsUncomputedChunkCount` (`core/host/volume/snapshot_chunk_count_test.go`) | NONE (pure projection of the published snapshot; no authority or persisted format change) | STUB |
|
||||
| `INV-SPEC-DELETE-RETIRE-001` | Retire spec-removed metadata only under a permanent reservation after no-live-lease and a subsequent HEAD read proves deleted or absent. Read errors, live HEAD and deleting HEAD keep the records. Retirement never removes the reservation or store data. | M4 delete retirement | `core/host/master/spec_retirement.go`; `core/authority/workspace_retirement.go`, `authority_store_file.go` | `TestSpecRetirementReadsHeadOnlyAfterLeaseAndKeepsTombstone`, `TestSpecRetirementRequiresDeletedOrAbsentAndReadableHead`, `TestSpecRetirementDoesNotUseAbsentHeadWithoutReservation`, `TestRetirementKeepsReservationAndWaitsForLiveLease`, `TestFileAuthorityRetirementSurvivesReloadAndKeepsOtherRecords`, `TestSpecRetirementBackgroundBoundsReadsAndCachesTerminalProof`, `TestSpecRetirementLocalFailureDoesNotStopOtherVolumesOrProductTick` | DeleteRetire.ReadOK; DeleteRetire.Retire; DeleteRetire.HostRetire | STUB |
|
||||
| `INV-SPEC-DELETE-RETRY-001` | Startup lease barriers schedule one more retirement pass after the latest observed barrier, independently of the product loop. The pass rechecks every lease and HEAD guard, logs skipped volumes, and is cancelled and joined before stores close. | M4 delete retirement scheduling | `core/host/master/host.go` `Start`, `Close`; `spec_retirement.go` `startPostFloorRetirement` | `TestStandaloneRestartRetriesSpecRetirementAfterLeaseFloor`, `TestRetirementLeaseBarrierIsOnlyASchedulingHint`, `TestPostFloorRetirementTimerJoinsOnCancellation` | DeleteRetire.ReadOK; DeleteRetire.Retire | STUB |
|
||||
| `INV-SPEC-DELETE-RETIRE-001` | Retire spec-removed metadata only under a permanent reservation after no-live-lease and a subsequent HEAD read proves deleted or absent. Read errors, live HEAD and deleting HEAD keep the records. Retirement never removes the reservation or store data. | M4 delete retirement | `core/host/master/spec_retirement.go`; `core/authority/workspace_retirement.go`, `authority_store_file.go` | `TestSpecRetirementReadsHeadOnlyAfterLeaseAndKeepsTombstone`, `TestSpecRetirementRequiresDeletedOrAbsentAndReadableHead`, `TestSpecRetirementDoesNotUseAbsentHeadWithoutReservation`, `TestRetirementKeepsReservationAndWaitsForLiveLease`, `TestFileAuthorityRetirementSurvivesReloadAndKeepsOtherRecords`, `TestSpecRetirementBackgroundBoundsReadsAndCachesTerminalProof`, `TestSpecRetirementLocalFailureDoesNotStopOtherVolumesOrProductTick` | DeleteRetire.ReadOK; DeleteRetire.RetireLine; DeleteRetire.RetirePlace; DeleteRetire.HostRetire | STUB |
|
||||
| `INV-SPEC-DELETE-RETRY-001` | Startup lease barriers schedule one more retirement pass after the latest observed barrier, independently of the product loop. The pass rechecks every lease and HEAD guard, logs skipped volumes, and is cancelled and joined before stores close. | M4 delete retirement scheduling | `core/host/master/host.go` `Start`, `Close`; `spec_retirement.go` `startPostFloorRetirement` | `TestStandaloneRestartRetriesSpecRetirementAfterLeaseFloor`, `TestRetirementLeaseBarrierIsOnlyASchedulingHint`, `TestPostFloorRetirementTimerJoinsOnCancellation` | DeleteRetire.ReadOK; DeleteRetire.RetireLine; DeleteRetire.RetirePlace | STUB |
|
||||
| `INV-SPEC-UNUSED-PLACEMENT-001` | A spec startup prunes an undesired placement only before serving and with no volume record, authority line, binding or deletion reservation, and no skipped authority recovery. The desired spec and seed are one keep set. | M4 registration input | `cmd/blockmaster/main.go`; `core/host/master/spec_retirement.go` | `TestClusterSpecImportRemovesUnusedPlacementMissingFromSpec`, `TestClusterSpecCleanupKeepsRecordsBindingsAuthorityAndSeed` | NONE (registration-only cleanup before controller activity) | STUB |
|
||||
| `INV-CHECK-DELETING-001` | A post-lease reserved volume with HEAD deleting, deleted or absent holds no serving work. Its status is informational and checks issue no lease or holder requests for it. Another volume's failures remain visible. | M9 delete observation | `core/host/master/observation_snapshot.go`, `journal_isolation.go`; `cmd/sw-block/shell_check.go` | `TestSpecRetirementRequiresDeletedOrAbsentAndReadableHead`, `TestSpecRetirementReadsHeadOnlyAfterLeaseAndKeepsTombstone`, `TestClusterCheckDoesNotProbeDeletingOrDeletedVolumes` | DeleteRetire.HostRetire | STUB |
|
||||
| `INV-CLI-DELETE-RETRY-001` | Only the final lease barrier after a committed volume-delete reservation permits retryable true/exit 75 at its horizon. A live-holder Reserve refusal requires stopping the volume first (not_admitted, non-retryable, exit 1). No lease guard is bypassed. | M9 delete admission result projection | `cmd/sw-block/chunk_volume_delete.go` `authorityErr`; `cmd/sw-block/chunk.go` `chunkResult` | `TestVolumeDeleteAdmissionRetryAnswer`; `TestOpsChunkVolumeDeleteRefusalSaysNothingWasPersisted` | MoveAdmission.DelRead; MoveAdmission.DelMark (unchanged guards) | STUB |
|
||||
| `INV-SNAPSHOT-REPLAY-FLAG-001` | A successful same-ID snapshot admission reports replayed true without changing HEAD or its retained outcome. First creation reports false; the flag decorates only the response. | M9 snapshot outcome projection | `core/host/volume/snapshot_operation.go`, `chunk_control.go`; `cmd/sw-block/snapshot_operation.go` | `TestSnapshotReplayFlagDoesNotRewriteOutcome`, `TestSnapshotCLIUsesReplayedAdmissionAnswer` | SnapOps.Poll; SnapOps.Start (no transition change) | STUB |
|
||||
| `INV-CLI-UNSENT-REQUEST-001` | An observed operation's initial typed dial failure sends no admission and is remote_unavailable (75) through the shared classifier. A lost answer after send, or a dial failure while polling an admitted handle, retains outcome_unknown. | CLI pre-admission error projection; no server transition | `cmd/sw-block/cut_progress_poll.go` `chunkObserveHandle`; `chunkTransportFailure`, `chunkFail` | `TestPlainDetachRefusedDialIsRemoteUnavailable`, `TestPlainDetachLostAnswerAfterSendStaysUnknown`, `TestPlainDetachPollDialFailureKeepsAdmittedOutcomeUnknown`, `TestOpsChunk_ErrorsAreJSONOnStdout` | CutTime Poll/CliGiveUp boundary; pre-admission transport proof | ACTIVE |
|
||||
| `INV-CLI-CATALOG-ERROR-001` | The chunk CLI reports filer/master transport failures as retryable remote_unavailable (exit 75), including census, dial, resolve and read failures; configuration refusals stay distinct. An absent v1.1 delete reports snapshot_not_found; its not_found receipt stays unchanged. | M9 client error projection; M4 census refusal, no transition change | `cmd/sw-block/chunk_transport.go` `chunkTransportFailure`; `cmd/sw-block/chunk.go` `chunkResult`; `cmd/sw-block/catalog_snapshot_operation.go` `catalogSnapshotDeleteRefusal`; `core/frontend/chunkstore/single_filer.go` `CheckSingleFiler`; `core/frontend/chunkstore/layout/delete.go` `RunMarkDeleting` | `TestOpsChunkTransportFailureMatrix`, `TestOpsChunkVerifyUnreachableCensusPreservesTransport`, `TestCheckSingleFilerKeepsTransportCause`, `TestSingleFilerConfigurationErrorDeadlineBetweenReads`, `TestCheckSingleFilerSlowDialOrdering`, `TestDialBCatalogKeepsCustomCallerDeadline`, `TestMasterCensusKeepsCustomCallerDeadline`, `TestCheckSingleFilerValidatesAllMasterAddressesBeforeCensus`; `TestOpsChunkCatalogUnavailableIsTyped`, `TestCatalogTransportClassificationKeepsDefiniteAnswers`, `TestSnapshotDeleteAbsentCLIUsesContractCodeAndKeepsReceipt` | SnapOps.Poll; r2.972 | STUB |
|
||||
| `INV-CLI-CATALOG-ERROR-001` | The chunk CLI reports filer/master transport failures as retryable remote_unavailable (exit 75), including census, dial, resolve and read failures; configuration refusals stay distinct. An absent v1.1 delete reports snapshot_not_found; its not_found receipt stays unchanged. | M9 client error projection; M4 census refusal, no transition change | `cmd/sw-block/chunk_transport.go` `chunkTransportFailure`; `cmd/sw-block/chunk.go` `chunkResult`; `cmd/sw-block/catalog_snapshot_operation.go` `catalogSnapshotDeleteRefusal`; `core/frontend/chunkstore/single_filer.go` `CheckSingleFiler`; `core/frontend/chunkstore/layout/delete.go` `RunMarkDeleting` | `TestOpsChunkTransportFailureMatrix`, `TestOpsChunkVerifyUnreachableCensusPreservesTransport`, `TestCheckSingleFilerKeepsTransportCause`, `TestSingleFilerConfigurationErrorDeadlineBetweenReads`, `TestCheckSingleFilerSlowDialOrdering`, `TestDialBCatalogKeepsCustomCallerDeadline`, `TestMasterCensusKeepsCustomCallerDeadline`, `TestCheckSingleFilerValidatesAllMasterAddressesBeforeCensus`; `TestOpsChunkCatalogUnavailableIsTyped`, `TestCatalogTransportClassificationKeepsDefiniteAnswers`, `TestSnapshotDeleteAbsentCLIUsesContractCodeAndKeepsReceipt` | SnapOps.Poll | STUB |
|
||||
| `INV-CLI-CHUNK-LOOP-001` | Above the per-request bound, sw-block ops chunk snapshot\|detach repeats the SAME request (same name and request id) only after a retryable or outcome_unknown answer. Manual cut and plain detach use the separate one-POST/read-only-poll contract. | client (no state machine): the CLI side of M5 requests | `cmd/sw-block/chunk_loop.go` `chunkPostLoop`; `cmd/sw-block/chunk.go` `chunkPostUntil` | `TestChunkSnapshotRepeatsTimedOutRequestsWithTheSameBody`, `TestChunkSnapshotLoopReusesTheGeneratedRequestID`, `TestChunkLoopRepeatsAnOutcomeUnknownNotMarkedRetryable` (`cmd/sw-block`) | — | ACTIVE |
|
||||
| `INV-CLI-CHUNK-LOOP-002` | Above the per-request bound, sw-block ops chunk snapshot\|detach stops at the first definite answer (success or non-retryable refusal). | client (no state machine): the CLI side of M5 cut requests | `cmd/sw-block/chunk_loop.go` `chunkPostLoop` | `TestChunkLoopStopsOnANonRetryableRefusal`, `TestChunkDetachOutcomeUnknownSettles` (`cmd/sw-block`) | — | ACTIVE |
|
||||
| `INV-CLI-CHUNK-LOOP-003` | Non-plain detach and snapshot admission obey a positive total --timeout. Snapshot observation keeps the same ID with bounded calls and no total deadline. Manual cut and plain detach use the separate inactivity-window contract. | client (no state machine): the CLI side of M5 cut requests | `cmd/sw-block/chunk_loop.go` `chunkPostLoop`; `cmd/sw-block/chunk.go` `chunkPostUntil` | `TestChunkLoopEndsAtTheTimeout`, `TestChunkLoopHeldProgressReadSendsNoRequestAfterTheTimeout`, `TestChunkLoopSlowAnswersAreBoundedByTheTimeout`, `TestChunkNonPositiveTimeoutIsRefused` (`cmd/sw-block`) | — | ACTIVE |
|
||||
|
||||
@@ -5,7 +5,7 @@ the common admission callback sampled `s.wal`, the legacy writer. V3 appends go
|
||||
to `s.v3.w`, so the inactive legacy occupancy stayed zero. A real provider and
|
||||
NVMe handler writing 128 KiB requests with Flush every 48 MiB hit WRITE
|
||||
InternalError / WAL region full at 66,977,792 submitted bytes. The same schedule
|
||||
reproduced on root WSL and non-root tp04. The preceding Flush and a direct Sync
|
||||
reproduced on root WSL and as non-root on a Linux lab host. The preceding Flush and a direct Sync
|
||||
after the failed Write succeeded. This does not establish the cause of the
|
||||
reported guest SyncAll EIO; a host fsync error is not by itself an observed
|
||||
backend Sync error.
|
||||
|
||||
@@ -398,11 +398,11 @@ Example healthy shape:
|
||||
```text
|
||||
volume pvc-... status=ok rf=3 ack=sync-quorum
|
||||
pvc default/mysql-data
|
||||
primary r1 on m01 frontend=192.168.1.181:3260
|
||||
primary r1 on node-a frontend=192.168.1.181:3260
|
||||
replicas desired=3 observed=3
|
||||
r1 m01 primary ready durable_lsn=44
|
||||
r2 m02 replica_ready candidate_ready=true durable_lsn=44
|
||||
r3 tp01 replica_ready candidate_ready=true durable_lsn=44
|
||||
r1 node-a primary ready durable_lsn=44
|
||||
r2 node-b replica_ready candidate_ready=true durable_lsn=44
|
||||
r3 node-c replica_ready candidate_ready=true durable_lsn=44
|
||||
next action: none
|
||||
```
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ as placeholders:
|
||||
|
||||
```bash
|
||||
NODES=$(awk '/^blockNodes:/{f=1; next} f && /^[^ -]/{f=0} f && /^ *- name:/{print $3}' values.day1.yaml)
|
||||
echo $NODES # your node names, for example az1-c4a az1-c4b az1-c4c
|
||||
echo $NODES # your node names, for example node-a node-b node-c
|
||||
bash scripts/k8s-alpha-certs.sh kube-system ~/.sw-block-alpha-tls $NODES
|
||||
```
|
||||
|
||||
|
||||
@@ -14,6 +14,38 @@ v1.1.1 is a fix release of the v1.1 line. None of its changes alters a stored fo
|
||||
- The `sw-block` commands that `mini` prints assume it is on `PATH`: in the extracted directory, run
|
||||
`export PATH="$PWD:$PATH"`. Its `weed shell` hint needs the full path of the `weed` binary given to `--weed`.
|
||||
|
||||
## Known issue: restarting blockmaster with many declared volumes
|
||||
|
||||
- **What happens:** when blockmaster restarts, it rewrites every declared volume's node and placement records to disk, one by one, before it answers again. With a few hundred declared volumes this can take longer than a running volume's lease. Running volumes then stop (`lease_expired`, exit 75), and the guest sees I/O errors on those volumes while they are stopped.
|
||||
- In our test with 999 declared volumes, blockmaster answered again after about 45 s; the 8 running volumes stopped 12–20 s after the restart.
|
||||
- With 33 declared volumes, nothing stopped.
|
||||
- No acknowledged data is lost.
|
||||
- **Recovery:** a stopped volume comes back only if it is supervised. The shipped systemd unit restarts a volume that exits 75; in our test the volumes were serving again within a minute. Otherwise, start the volume again yourself.
|
||||
- **Where it starts:** we estimate around 150 declared volumes; it depends on the disk under blockmaster's state directory.
|
||||
- **What to do:** restart blockmaster in a maintenance window if a cluster declares more than about 150 volumes. A fix is planned for v1.1.2; in our test with it, 999 volumes restarted in under 6 s including the stop, and no volume stopped.
|
||||
|
||||
## Known issue: blockmaster needs its filer to start
|
||||
|
||||
- blockmaster checks that its SeaweedFS filer answers before it starts. If the filer is unreachable, blockmaster stops with an error after about 60 s instead of starting.
|
||||
- While blockmaster cannot start, running volumes stop when their leases run out.
|
||||
- Start or fix the filer first, then start blockmaster.
|
||||
|
||||
## Known issue: `sw-block ops chunk detach --plain` waits for a scheduled periodic cut
|
||||
|
||||
- A scheduled periodic cut is not interrupted by `sw-block ops chunk detach --plain`. A detach issued while such a cut is capturing waits until the cut finishes, so on a volume with a long cut the detach takes correspondingly longer.
|
||||
- No data is lost. A fix is planned for a later v1.1.x release.
|
||||
|
||||
## Known issue: a walstore volume unit can reach its systemd start limit while blockmaster is unreachable
|
||||
|
||||
- Affects volumes on the walstore engine run by `sw-blockvolume.service`, `sw-blockvolume@.service` or `sw-blockvolume-ublk.service` (`StartLimitBurst=10` in 600 s, `RestartSec=5s`). Chunk-store volumes wait for blockmaster in process and are not affected.
|
||||
- A walstore volume that starts while blockmaster is unreachable exits with 75 after about 10 s and is restarted by systemd. After about 10 attempts (about 150 s) the unit stays failed, even once blockmaster is back.
|
||||
- No data is lost. Recover with `systemctl reset-failed <unit>`, then `systemctl start <unit>`. A fix is planned for v1.1.2.
|
||||
|
||||
## Known issue: startup retirement reads can delay blockmaster
|
||||
|
||||
- At startup blockmaster checks volumes that are reserved for deletion and hold no workspace lease, one at a time, before it serves. Each check reads the filer, so a slow filer delays the start: in our test, 100 such volumes with a 100 ms filer delay added about 20 s. Volumes in normal use are skipped without a read.
|
||||
- No data is lost. A fix is planned for v1.1.2.
|
||||
|
||||
## Upgrade notes
|
||||
|
||||
- **Order: the CLI first, then blockmaster, then each holder**, as in
|
||||
|
||||
@@ -355,7 +355,7 @@ normalization only. Those are prior author runs, not a claim that this PR reran
|
||||
TLC. This is an abstraction: physical fsync success, byte layout, crash recovery,
|
||||
both-slot retirement, timing and multiple writers remain covered by their other
|
||||
models and actual Go controls. Do not treat finite liveness checking as an
|
||||
end-to-end wall-clock latency guarantee. Keep long model runs off tp04.
|
||||
end-to-end wall-clock latency guarantee. Keep long model runs off the shared CI runner.
|
||||
|
||||
## HostBudget
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CutTime r8b (a lost publish answer settled by read-back; r2.942; detach: preempt a scheduled cut, wait behind a manual one; r2.939, r2.938; the poll handle; r2.931, r2.929): U = 2 per-object steps, W = 3 window steps, P = 2 per-call deadline, MaxAtt = 2; mutants' total bound CapT = 4; total capped at TCap = 4; DL = 0 (none) or 3 (deadline rows); Prompt = TRUE with Wc = 4 unless stated; every row starts with no other cut, a running scheduled cut, or a running manual cut; Kind = cut unless stated; K = 2
|
||||
CutTime r8b (a lost publish answer settled by read-back; detach: preempt a scheduled cut, wait behind a manual one; the poll handle): U = 2 per-object steps, W = 3 window steps, P = 2 per-call deadline, MaxAtt = 2; mutants' total bound CapT = 4; total capped at TCap = 4; DL = 0 (none) or 3 (deadline rows); Prompt = TRUE with Wc = 4 unless stated; every row starts with no other cut, a running scheduled cut, or a running manual cut; Kind = cut unless stated; K = 2
|
||||
safe_cut OK (NoEarlyFail, NoSilentStall, NoLongCall, ProgressKept, CliNoEarlyExit, CliNoSilentWait, CliUnknownOnlySilent, NoQueuedStall, BusyOnlyWhenHeld, CliBusyNotOwn, NoManualPreempt, NoFalseFailure)
|
||||
safe_cut_deadline OK (the same rules, with the user's absolute deadline DL = 3)
|
||||
safe_detach OK (the same rules, Kind = detach: preempts a scheduled cut, waits behind a manual one)
|
||||
|
||||
@@ -103,7 +103,7 @@ cmd/sw-block/volume_release.go releaseLease context.WithTimeout 1 per-call NONE:
|
||||
cmd/sw-block/volume_release.go releaseLease context.WithTimeout 2 availability-contract NONE: no model row maps this file yet the wait for the recorded release: one lease validity plus slack, since the holder acknowledges at its next renewal within the lease
|
||||
cmd/sw-block/volume_release.go releaseLease time.After 1 control-timer NONE: no model row maps this file yet lease record poll during the release wait
|
||||
cmd/sw-block/volume_resolve.go runOpsVolume context.WithTimeout 1 per-call NONE: no model row maps this file yet one CLI request (operator --timeout)
|
||||
cmd/sw-block/volume_start_release.go prepareVolumeStart context.WithTimeout 1 availability-contract StopAndRestart.IssueClean; StopAndRestart.ReadClean; StopAndRestart.SameEpochReopen lease-query/clean-move setup (10 s), before enabling the unit; no volume data is processed
|
||||
cmd/sw-block/volume_start_release.go prepareVolumeStart context.WithTimeout 1 availability-contract StopAndRestart.IssueClean; StopAndRestart.ReadClean; StopAndRestart.CrashRestart lease-query/clean-move setup (10 s), before enabling the unit; no volume data is processed
|
||||
cmd/sw-block/volume_verbs.go runVolume http.Client.Timeout 1 per-call CutTime.Poll one HTTP request
|
||||
cmd/sw-block/volume_verbs.go volumeStart time.Now().Add 1 per-call CutTime.Poll volume start: the operator's --wait for it to serve
|
||||
cmd/sw-block/volume_verbs.go volumeStart time.After 1 control-timer CutTime.Poll volume start poll
|
||||
@@ -204,7 +204,7 @@ core/host/master/host.go New http.Server.IdleTimeout 1 per-call NONE: no model r
|
||||
core/host/master/probe_round.go roundEvidenceProvider.round time.NewTimer 1 per-call FencingRound.Deliver; FencingRound.Open one probe round's evidence wait
|
||||
core/host/master/services.go services.deleteHolderEvidence context.WithTimeout 1 per-call FormatGate.Report one RPC or request
|
||||
core/host/master/spec_retirement.go Host.reconcileDeletedSpecVolumes context.WithTimeout 1 per-call DeleteRetire.ReadOK one fresh HEAD read after the no-live-lease barrier
|
||||
core/host/master/spec_retirement.go Host.startPostFloorRetirement time.NewTimer 1 control-timer DeleteRetire.ReadOK; DeleteRetire.Retire one startup retry at the latest authority lease barrier; every guard is rechecked
|
||||
core/host/master/spec_retirement.go Host.startPostFloorRetirement time.NewTimer 1 control-timer DeleteRetire.ReadOK; DeleteRetire.RetireLine one startup retry at the latest authority lease barrier; every guard is rechecked
|
||||
core/host/master/spec_retirement.go Host.refreshHostDeletionProofs context.WithTimeout 1 per-call DeleteRetire.ReadOK one post-lease HEAD read for a requested host candidate; error retains work
|
||||
core/host/master/workspace_service.go services.AckWorkspaceRevoked context.WithTimeout 1 per-call FormatGate.Place; MoveAdmission.ReadForMove; StopAndRestart.ReadClean one RPC or request
|
||||
core/host/master/workspace_service.go services.MoveWorkspace context.WithTimeout 1 per-call FormatGate.Place; MoveAdmission.ReadForMove; StopAndRestart.ReadClean one RPC or request
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 49 and column 123.
|
@@ -439,6 +439,9 @@ Use this checklist when changing the feature.
|
||||
| `same-node-alpha-attach-chain.yaml` | loopback same-node accepted path |
|
||||
| `same-node-alpha-attach-negative-chain.yaml` | cross-node loopback blocked as unsupported |
|
||||
|
||||
The last three run only against the project's lab and are kept in a private test repository; the first three
|
||||
are in `testops/scenarios/`.
|
||||
|
||||
The runner must not pass a Stage 2 gate by grepping only lines it wrote itself.
|
||||
It needs independent evidence: pod UID, host sessions, multipath map, RTPG
|
||||
state, stale-I/O probe, and cleanup verifier.
|
||||
|
||||
@@ -85,7 +85,6 @@ Prefer gates that compare at least two surfaces:
|
||||
| Area | Path |
|
||||
|---|---|
|
||||
| scenario definitions | `testops/scenarios/` |
|
||||
| suites | `testops/suites/` |
|
||||
| runner contracts | `internal/docs/ref/testops-runner-binary-contract.md` |
|
||||
| control/data contract | `internal/docs/ref/testops-control-data-contract.md` |
|
||||
| QA sign-offs | `internal/docs/qa-assignments/` |
|
||||
|
||||
@@ -27,6 +27,9 @@ injection.
|
||||
| Cleanup | `cleanup-residue-chain.yaml` and cleanup verifier | zero-residue contract |
|
||||
| Protocol | `iscsi-*`, `nvme-*` | frontend-specific gates |
|
||||
|
||||
Scenarios that run against the project's lab are kept in a private test repository. This repository keeps
|
||||
the ones its own tests and scripts use; [testops/README.md](../../testops/README.md) lists them and the settings each needs.
|
||||
|
||||
## Release Evidence
|
||||
|
||||
Release claims should point to:
|
||||
|
||||
@@ -37,10 +37,6 @@ Public-facing docs belong in `docs/`.
|
||||
| `finished-plans/` | Closed phase/topic plans retained for PM history. |
|
||||
| `ref/product-spec-gate-template.md` | Cold spec-gate template for product semantics, non-negotiables, allowed simplifications, and drift checks. |
|
||||
| `ref/stage2-transparent-multipath-host-failover-spec.md` | Stage 2 product spec for iSCSI ALUA/dm-multipath Kubernetes host-path failover without pod recreate. |
|
||||
| `ref/node-loss-survival-mvp-spec.md` | Node-loss survival product spec: RF3 sync-quorum recovery across distinct Kubernetes nodes with non-loopback frontends. |
|
||||
| `ref/node-loss-lab-setup.md` | Lab setup note for the Node-Loss D3/D4 gates, including 3 Kubernetes nodes on 2 physical machines and physical-host disclosure. |
|
||||
| `ref/control-plane-observation-api-mvp.md` | Dashboard-grade read-only observation API spec: cluster status, volume timeline, event stream, and support-bundle UX. |
|
||||
| `finished-plans/phase1_finishedplan_frontend_protocol_readiness.md` | Historical iSCSI/NVMe protocol-readiness plan closed by the protocol release gate. |
|
||||
| `finished-plans/phase2_finishedplan_beta_hardening_seed.md` | Historical beta hardening seed plan. |
|
||||
| `finished-plans/phase3_finishedplan_beta_seed_stabilization.md` | Historical beta seed stabilization plan. |
|
||||
| `finished-plans/phase4_finishedplan_fast_gates_operations_contract_prep.md` | Historical fast-gates and operations contract prep plan. |
|
||||
@@ -48,8 +44,6 @@ Public-facing docs belong in `docs/`.
|
||||
| `finished-plans/phase6_finishedplan_iscsi_os_initiator_compatibility.md` | Historical iSCSI OS initiator compatibility plan closed by Linux and Windows validation. |
|
||||
| `finished-plans/phase7_finishedplan_iscsi_session_backend_pressure.md` | Historical iSCSI session/backend pressure plan closed by fast protocol, L2 restart, and Linux OS initiator gates. |
|
||||
| `finished-plans/phase8_finishedplan_main_merge_pr_readiness.md` | Historical main-merge readiness plan closed by PR #46 squash merge. |
|
||||
| `finished-plans/phase9_finishedplan_light_use_operations_mvp.md` | Historical light-use operations MVP plan closed by local CLI, bundle, and TestOps control-data validation. |
|
||||
| `finished-plans/phase10_finishedplan_light_use_install_lifecycle_operations_mvp.md` | Historical light-use install/lifecycle operations MVP plan closed by strict first-volume runbook and scenario validation. |
|
||||
| `finished-plans/phase11_finishedplan_cluster_ops_inventory_lifecycle_visibility_mvp.md` | Historical cluster operations inventory and lifecycle visibility MVP plan closed by strict multi-volume inventory validation. |
|
||||
| `finished-plans/phase12_finishedplan_product_owned_blockvolume_lifecycle_mvp.md` | Historical product-owned blockvolume lifecycle MVP plan closed by lifecycle ownership and scoped delete validation. |
|
||||
| `finished-plans/phase13_finishedplan_durable_volume_restart_reattach_mvp.md` | Historical durable volume restart/reattach MVP plan closed by RF=1 durable hostPath restart gates. |
|
||||
@@ -57,13 +51,8 @@ Public-facing docs belong in `docs/`.
|
||||
| `finished-plans/phase15_finishedplan_basic_mounted_failover_and_reattach_mvp.md` | Historical RF=2 mounted app baseline plus controlled primary-failure safe-refusal plan. |
|
||||
| `finished-plans/phase16_finishedplan_stage1_mounted_recovery_ack_profile_mvp.md` | Historical Stage 1 mounted recovery ACK profile plan: RF=2 best-effort demo recovery and RF=3 sync-quorum beta recovery through CSI/pod recreate. |
|
||||
| `finished-plans/phase17_finishedplan_stage2_transparent_multipath_host_failover_mvp.md` | Historical Stage 2 transparent mounted failover plan: RF=3 sync-quorum iSCSI ALUA/dm-multipath recovery without pod recreate. |
|
||||
| `finished-plans/phase18_finishedplan_node_loss_survival_mvp.md` | Historical Node-Loss Survival plan: RF=3 sync-quorum Kubernetes-node-loss recovery through CSI/pod recreate on a surviving node. |
|
||||
| `finished-plans/phase19_finishedplan_control_plane_observation_ai_readable_ops_mvp.md` | Historical Control-Plane Observation plan: read-only master evidence API, AI-readable CLI export, product-owned event stream, and support-bundle evidence. |
|
||||
| `finished-plans/phase20_finishedplan_activation_day1_ops_mvp.md` | Historical Activation / Day-1 Ops plan: script-based v0.2 alpha install, first PVC, writer/reader checksum, read-only report, release note, and cleanup evidence. |
|
||||
| `ref/production-readiness-plan.md` | Longer readiness reference and iSCSI P1-P6 detail. |
|
||||
| `ref/light-use-block-storage-ux-research.md` | Comparison of Longhorn, OpenEBS, Rook/Ceph, Piraeus/LINSTOR, and EBS CSI light-user install/operations UX. |
|
||||
| `ref/blockvolume-lifecycle-ownership-contract.md` | Product-owned generated blockvolume workload lifecycle ownership contract for the current plan. |
|
||||
| `ref/iscsi-os-initiator-compat-plan.md` | Detailed iSCSI P1 OS-initiator compatibility plan and evidence. |
|
||||
| `ref/iscsi-v2-coverage-gap-audit.md` | V2-to-V3 iSCSI coverage gap audit and prioritized test backlog. |
|
||||
| `ref/v2-frontend-protocol-gap-audit.md` | Broader V2 frontend protocol feature gap audit. |
|
||||
|
||||
-411
@@ -1,411 +0,0 @@
|
||||
# Finished Plan: Light-Use Install And Lifecycle Operations MVP
|
||||
|
||||
Status: finished. Strict QA close passed at product commit `fe0de8d`.
|
||||
|
||||
Opened after closing
|
||||
`finished-plans/phase9_finishedplan_light_use_operations_mvp.md`.
|
||||
|
||||
## Product Question
|
||||
|
||||
Can an early developer use Seaweed Block as a basic Kubernetes block product
|
||||
without reading internal scripts, and can they diagnose the first failure with
|
||||
one product-owned status bundle?
|
||||
|
||||
The previous plan proved the observe/report/coordinate loop. This plan must
|
||||
prove the user-facing operational loop:
|
||||
|
||||
```text
|
||||
install/launch -> create PVC -> attach app pod -> write/read -> delete ->
|
||||
verify cleanup -> collect status bundle on failure
|
||||
```
|
||||
|
||||
If this plan closes, the claim is still narrow:
|
||||
|
||||
```text
|
||||
Single-node Kubernetes light-use path: a user can install/launch the alpha
|
||||
stack, create one PVC, run app write/read, delete resources, and verify cleanup
|
||||
with a documented command path and TestOps gate.
|
||||
```
|
||||
|
||||
It is not a production HA, performance, upgrade, multi-node, or operator-grade
|
||||
claim.
|
||||
|
||||
## Current Honest State
|
||||
|
||||
What already works in separate gates:
|
||||
|
||||
- CSI dynamic PVC create/delete works.
|
||||
- iSCSI and NVMe protocol paths are release-gated.
|
||||
- App write/read through PVC exists in the K8s demo path.
|
||||
- Linux and Windows OS iSCSI initiator compatibility have evidence.
|
||||
- `sw-block ops status` can produce a self-describing bundle for one volume.
|
||||
- TestOps can coordinate shared-lab runs with active/history records and locks.
|
||||
|
||||
What is still weak for a light-use product:
|
||||
|
||||
- The user path is scattered across docs, alpha scripts, TestOps scenarios, and
|
||||
QA reports.
|
||||
- Cleanup is partly product behavior and partly harness discipline.
|
||||
- There is no single user-facing "first volume" claim with one fresh-run gate.
|
||||
- Failure diagnosis is not yet stitched into the first-volume workflow.
|
||||
|
||||
## Research Baseline
|
||||
|
||||
See `ref/light-use-block-storage-ux-research.md`.
|
||||
|
||||
The useful comparison set is Longhorn, OpenEBS, Rook/Ceph, Piraeus/LINSTOR, and
|
||||
EKS EBS CSI. The common light-user shape is:
|
||||
|
||||
```text
|
||||
preflight -> install -> wait/verify components -> create StorageClass/PVC ->
|
||||
create app -> verify bound/running/I/O -> inspect status -> teardown ->
|
||||
collect support data on failure
|
||||
```
|
||||
|
||||
Design rules for this plan:
|
||||
|
||||
- Pick one default path first: iSCSI + `walstore` + single-node k3s.
|
||||
- Add preflight checks before install instead of discovering missing host
|
||||
dependencies late.
|
||||
- Verify every boundary, not just final PASS: pods, StorageClass, PVC,
|
||||
generated `blockvolume`, app checksum, status bundle, cleanup.
|
||||
- Treat `sw-block ops status` as the support-bundle step for failures after
|
||||
volume identity exists.
|
||||
- Keep cleanup attribution explicit: product/Kubernetes cleanup vs TestOps
|
||||
guardrail cleanup.
|
||||
- Do not start a UI/dashboard in this plan; stabilize CLI/runbook/status
|
||||
contracts first.
|
||||
|
||||
## Target User Experience
|
||||
|
||||
An early user should be able to:
|
||||
|
||||
1. Start from a fresh checkout or released artifact on the supported lab shape.
|
||||
2. Run one documented launch/install path.
|
||||
3. Apply or generate a StorageClass/PVC and an app pod.
|
||||
4. Observe the PVC becoming usable.
|
||||
5. Write data, replace the app pod, and read the data back.
|
||||
6. Delete the app/PVC resources.
|
||||
7. Verify no obvious product or host residue remains.
|
||||
8. If the flow fails, run or receive a status bundle that explains what was
|
||||
checked, what was unchecked, and what artifacts to attach.
|
||||
|
||||
## Scope
|
||||
|
||||
In scope:
|
||||
|
||||
- Refresh the first-volume quickstart/runbook around the actual supported path.
|
||||
- Make the claimed path executable by a TestOps scenario.
|
||||
- Separate product-owned lifecycle behavior from TestOps-only cleanup.
|
||||
- Add or tighten fast tests for any new parser, wrapper, or artifact contract.
|
||||
- Keep the operations status bundle wired into the failure path.
|
||||
- Add QA assignment for adversarial user-path validation.
|
||||
|
||||
Out of scope:
|
||||
|
||||
- Full Kubernetes operator/controller.
|
||||
- Upgrade/uninstall story.
|
||||
- Multi-node attach.
|
||||
- HA failover claim for this user path.
|
||||
- Performance/SLO claim.
|
||||
- UI/dashboard.
|
||||
- Mutating repair/admin controls.
|
||||
|
||||
## Top Blocking Issues
|
||||
|
||||
### P0: First-Volume Path Must Be One Coherent User Story
|
||||
|
||||
Today the pieces exist, but the user story is fragmented.
|
||||
|
||||
Close requirement: one runbook and one scenario prove the same flow.
|
||||
|
||||
### P0: Lifecycle Cleanup Must Be Attributed Correctly
|
||||
|
||||
The plan must not hide script-owned cleanup behind a product claim.
|
||||
|
||||
Close requirement: the final evidence explicitly marks which cleanup happened
|
||||
because Kubernetes/product ownership worked and which cleanup was TestOps
|
||||
guardrail cleanup.
|
||||
|
||||
### P0: Failure Bundle Must Be Attached To The User Path
|
||||
|
||||
The previous plan built `sw-block ops status`; this plan must show where it fits
|
||||
when the first-volume path fails.
|
||||
|
||||
Close requirement: the TestOps scenario captures the relevant status/support
|
||||
artifacts on failure or records why they are unavailable.
|
||||
|
||||
### P1: Keep Integration Time Under Control
|
||||
|
||||
The scenario may use M01/M02 or k3s, but most logic should be component-tested.
|
||||
|
||||
Close requirement: new code has fast tests; long integration is reserved for
|
||||
the end-to-end user claim.
|
||||
|
||||
## Deliverables
|
||||
|
||||
### D1: First-Volume Runbook
|
||||
|
||||
Status: draft attached in `docs/quickstart-kubernetes.md`; dev-run validated
|
||||
through hardened `light-use-first-volume-chain` at run
|
||||
`20260511-200544-dca5`. Still needs QA new-user review before final close.
|
||||
|
||||
Update or add a concise runbook that answers:
|
||||
|
||||
- preflight checks,
|
||||
- prerequisites,
|
||||
- exact launch/install command path,
|
||||
- exact app/PVC path,
|
||||
- boundary verification commands after install/PVC/app/cleanup,
|
||||
- expected success line,
|
||||
- expected cleanup result,
|
||||
- how to collect `sw-block ops status` artifacts,
|
||||
- non-claims.
|
||||
|
||||
Preferred source to refresh first: `docs/quickstart-kubernetes.md`.
|
||||
|
||||
### D2: Runner-Native First-Volume Scenario
|
||||
|
||||
Status: initial scenario attached as
|
||||
`testops/scenarios/light-use-first-volume-chain.yaml`.
|
||||
|
||||
Dev validation:
|
||||
|
||||
```text
|
||||
run_id: 20260511-200544-dca5
|
||||
result: PASS
|
||||
wall: 3m30s
|
||||
actions: 35/35 passed
|
||||
host: m02
|
||||
```
|
||||
|
||||
The scenario proved runnable structured preflight, alpha image build/import,
|
||||
documented `run-k8s-demo.sh`, writer checksum, reader replacement checksum,
|
||||
generated iSCSI blockvolume manifest, no active iSCSI session after delete,
|
||||
line-level cleanup attribution, and final process/session assertions.
|
||||
|
||||
Add a TestOps scenario for the same user path.
|
||||
|
||||
Expected scenario shape:
|
||||
|
||||
```text
|
||||
pre_clean
|
||||
pin_or_verify_build
|
||||
install_or_launch
|
||||
create_pvc_and_app
|
||||
verify_write_read
|
||||
delete_and_verify_cleanup
|
||||
collect_ops_bundle_on_failure
|
||||
collect_and_cleanup(always)
|
||||
```
|
||||
|
||||
The scenario should emit normal result/status bundles and participate in the
|
||||
shared control-data lock model.
|
||||
|
||||
### D3: Product-vs-Harness Cleanup Evidence
|
||||
|
||||
Status: line-level attribution script attached as
|
||||
`scripts/summarize-alpha-demo-cleanup.sh`; scenario now uses it. Dev run found
|
||||
the important boundary: active iSCSI sessions are removed by the demo flow, but
|
||||
an iSCSI node database entry can remain until TestOps guardrail cleanup deletes
|
||||
it. That is recorded as guardrail cleanup, not product-owned cleanup.
|
||||
|
||||
The artifact bundle should include a short cleanup summary:
|
||||
|
||||
- Kubernetes resources deleted by normal owner references,
|
||||
- iSCSI/NVMe host residue check,
|
||||
- generated blockvolume deployment/state residue check,
|
||||
- TestOps cleanup actions, if any,
|
||||
- non-claims.
|
||||
|
||||
### D4: Failure Diagnosis Hook
|
||||
|
||||
Status: controlled failure-bundle path attached as
|
||||
`testops/scenarios/light-use-first-volume-failure-bundle-chain.yaml`.
|
||||
|
||||
Dev validation:
|
||||
|
||||
```text
|
||||
run_id: 20260511-202259-86e9
|
||||
result: PASS
|
||||
wall: 1m05s
|
||||
actions: 38/38 passed
|
||||
host: m02
|
||||
```
|
||||
|
||||
The chain stops the first-volume demo after the generated blockvolume target is
|
||||
ready, collects `sw-block ops status` while the target is still live, verifies
|
||||
`ops-status-bundle.json` and `volume-status-summary.txt`, then proves cleanup in
|
||||
both normal and always-phase assertions. The collected bundle may be
|
||||
`status=unhealthy` at this stop point because the writer has not completed yet;
|
||||
that is expected and still useful diagnostic evidence.
|
||||
|
||||
When the first-volume flow fails after a volume identity is known, capture the
|
||||
operations status bundle or a clear explanation:
|
||||
|
||||
```text
|
||||
ops-status-unavailable: no volume id reached
|
||||
ops-status-collected: <path>
|
||||
```
|
||||
|
||||
### D5: Fast Gates And Review
|
||||
|
||||
Use TDD for new parsing/wrapper/status logic:
|
||||
|
||||
- component tests for artifact summary parsing,
|
||||
- component tests for cleanup-attribution summary,
|
||||
- validate scenario YAML,
|
||||
- internal review agent before merge if code changes are non-trivial.
|
||||
|
||||
### D6: Retry / Idempotency Gate
|
||||
|
||||
Status: attached as
|
||||
`testops/scenarios/light-use-first-volume-retry-chain.yaml`.
|
||||
|
||||
Dev validation:
|
||||
|
||||
```text
|
||||
run_id: 20260511-204348-ccc4
|
||||
result: PASS
|
||||
wall: 4m10s
|
||||
actions: 43/43 passed
|
||||
host: m02
|
||||
```
|
||||
|
||||
The chain starts from a verified clean state, intentionally stops the
|
||||
first-volume demo after the generated blockvolume is ready, keeps the PVC and
|
||||
generated blockvolume Deployment in place, runs the documented uninstall path,
|
||||
proves those stale resources are gone, and then reruns the normal first-volume
|
||||
demo successfully with writer and reader checksum evidence.
|
||||
|
||||
The user-facing uninstall path now deletes the demo PVC-scoped generated
|
||||
blockvolume by volume label. Broad `app=sw-blockvolume` deletion is only enabled
|
||||
when TestOps sets `SW_BLOCK_UNINSTALL_DELETE_ALL_BLOCKVOLUMES=1`, so broad lab
|
||||
guardrails stay separate from user cleanup.
|
||||
|
||||
### D7: QA Close Assignment
|
||||
|
||||
Ask QA to validate as a new user, not just as an executor:
|
||||
|
||||
- run the documented path from a clean state,
|
||||
- run the runner-native scenario,
|
||||
- inspect the cleanup attribution,
|
||||
- intentionally break one prerequisite and confirm the failure bundle is useful,
|
||||
- report any confusing step or over-claim.
|
||||
|
||||
### D8: Adversarial Break-Class Gate
|
||||
|
||||
Status: attached as
|
||||
`testops/scenarios/light-use-first-volume-breaks-chain.yaml`.
|
||||
|
||||
Dev validation:
|
||||
|
||||
```text
|
||||
run_id: 20260511-210727-5cb9
|
||||
result: PASS
|
||||
wall: 3m57s
|
||||
actions: 36/36 passed
|
||||
host: m02
|
||||
```
|
||||
|
||||
This chain covers the three HG-10 fixtures:
|
||||
|
||||
- forced missing `iscsiadm` preflight, with remediation text;
|
||||
- unpullable product image, with `ops-status-unavailable: no volume id reached`
|
||||
and `no-such-tag` image evidence;
|
||||
- mid-app attach failure by deleting the generated blockvolume via the
|
||||
generated volume label, with a collected `sw-block ops status` bundle showing
|
||||
status endpoint connection refusal and no host residue.
|
||||
|
||||
The scenario also validates final cleanup and uses scoped generated-volume
|
||||
deletion for the attach break instead of broad `app=sw-blockvolume` sweeps.
|
||||
|
||||
### D9: Manual Runbook / Scenario Consistency
|
||||
|
||||
Status: QA PASS at product commit `ec76385`.
|
||||
|
||||
QA ran the documented runbook manually and the runner-native
|
||||
`light-use-first-volume-chain` back-to-back on m02:
|
||||
|
||||
```text
|
||||
manual run: sw-block-app-demo-20260512T055732Z
|
||||
scenario run: 20260511-225935-0ff4
|
||||
result: PASS / PASS
|
||||
```
|
||||
|
||||
The demo artifact file list was identical inside the artifact directory. The
|
||||
final PASS line was byte-identical, writer and reader checksums matched, and
|
||||
the only functional differences were run id, timestamp, PVC UUID, and I/O
|
||||
timing noise. QA found one documented residue boundary: manual uninstall can
|
||||
leave non-active iSCSI node database entries or `/var/lib/sw-block/` clean-lab
|
||||
state, while TestOps guardrails attribute and remove that residue.
|
||||
|
||||
## Gates To Close
|
||||
|
||||
This plan closes only when:
|
||||
|
||||
1. The first-volume runbook is accurate from a fresh supported lab state.
|
||||
2. A runner-native scenario proves the same flow.
|
||||
3. The app write/read and pod replacement check pass.
|
||||
4. Delete/cleanup evidence is explicit and attributed.
|
||||
5. The operations status bundle is captured on failure, or the bundle explains
|
||||
why no volume identity existed yet.
|
||||
6. Fast tests cover new logic.
|
||||
7. QA validates the user experience independently and reports no blocking
|
||||
usability issue.
|
||||
|
||||
## Success Statement
|
||||
|
||||
After this plan, Seaweed Block can make a narrow light-use product claim:
|
||||
|
||||
```text
|
||||
On the supported single-node Kubernetes lab shape, an early user can follow one
|
||||
documented path to launch the alpha stack, create and use one block-backed PVC,
|
||||
delete it, verify cleanup, and collect a useful support bundle if it fails.
|
||||
```
|
||||
|
||||
That is the bridge from "our tests pass" to "a user can try the product."
|
||||
|
||||
## Close Report
|
||||
|
||||
Formal QA close report:
|
||||
`internal/docs/qa-assignments/light-use-mvp-close-report.md`.
|
||||
|
||||
QA verdict:
|
||||
|
||||
```text
|
||||
PASS
|
||||
```
|
||||
|
||||
Close evidence:
|
||||
|
||||
- Happy path: `20260511-200544-dca5`.
|
||||
- Failure bundle: `20260511-203619-885f`.
|
||||
- Retry/idempotency: `20260511-204348-ccc4`.
|
||||
- Break classes: `20260511-210727-5cb9`.
|
||||
- Manual runbook: `sw-block-app-demo-20260512T055732Z`.
|
||||
- Scenario consistency run: `20260511-225935-0ff4`.
|
||||
|
||||
Initial QA cleared all HG-0 through HG-12 clauses. A later strict reading found
|
||||
three gaps; dev addressed them and QA revalidated them as strict PASS:
|
||||
|
||||
- HG-2: `docs/quickstart-kubernetes.md` now verifies
|
||||
`apply-k8s-alpha-blockvolumes.sh` with an explicit generated Deployment
|
||||
readiness command and expected `1/1` output.
|
||||
- HG-4: `docs/quickstart-kubernetes.md` now includes per-boundary commands and
|
||||
expected lines for CSI controller, CSI node, StorageClass, PVC, generated
|
||||
Deployment, writer, reader, delete, and iSCSI residue.
|
||||
- HG-9: `testops/scenarios/light-use-first-volume-retry-chain.yaml` now has a
|
||||
named `rerun_after_success_no_cleanup` phase for "successful run, run again
|
||||
immediately".
|
||||
|
||||
Strict close revalidation:
|
||||
|
||||
```text
|
||||
run_id: 20260512-005836-0998
|
||||
result: PASS
|
||||
phases: 9/9
|
||||
actions: 50/50
|
||||
```
|
||||
|
||||
QA re-issued the close report as `PASS (strict)`.
|
||||
-78
@@ -1,78 +0,0 @@
|
||||
# Phase 121 Finished Plan: Data-Plane Address Capability
|
||||
|
||||
Status: closed, QA PASS on 2026-07-02.
|
||||
|
||||
## Problem
|
||||
|
||||
Phase 120 measured NVMe/TCP through the default Kubernetes InternalIP path,
|
||||
which in the lab resolves to management LAN addresses such as
|
||||
`192.168.1.181:4420`. That is valid functional evidence, but it is not a
|
||||
100GbE performance baseline and must not be confused with RoCE/NVMe-RDMA.
|
||||
|
||||
## What Changed
|
||||
|
||||
- `sw-block ops generate-helm-values` can now accept:
|
||||
|
||||
```text
|
||||
--frontend-ip-map m01=10.0.0.181,m02=10.0.0.184,tp01=10.0.0.188
|
||||
--frontend-network-class 100gbe_tcp
|
||||
```
|
||||
|
||||
- Helm values now carry optional `managementIP`, `frontendIP`, and
|
||||
`frontendNetworkClass` per block node.
|
||||
|
||||
- The chart renders:
|
||||
|
||||
```text
|
||||
data_addr = frontendIP:dataPort
|
||||
ctrl_addr = internalIP:controlPort
|
||||
labels:
|
||||
sw-block.seaweedfs.com/management-ip
|
||||
sw-block.seaweedfs.com/frontend-ip
|
||||
sw-block.seaweedfs.com/frontend-network-class
|
||||
```
|
||||
|
||||
- Master observation, operator-snapshot, and `SwBlockCluster.status.nodes[]`
|
||||
preserve `internalIP` as management evidence while optionally surfacing
|
||||
`frontendIP` and `frontendNetworkClass`.
|
||||
|
||||
- CRD and values schema were updated so the new status/config fields are not
|
||||
pruned by Kubernetes schema validation.
|
||||
|
||||
## Verification
|
||||
|
||||
Source/local checks:
|
||||
|
||||
```text
|
||||
go test ./core/host/master ./core/lifecycle ./core/ops ./cmd/sw-block
|
||||
helm lint charts/seaweed-block
|
||||
helm template ... frontendIP=10.0.0.181 ...
|
||||
```
|
||||
|
||||
Phase gate:
|
||||
|
||||
```text
|
||||
phase121_data_plane_address_capability_status=ok
|
||||
management_ip_m01=192.168.1.181
|
||||
publish_target_ip_m01=10.0.0.181
|
||||
publish_target_network_class=100gbe_tcp
|
||||
publish_target_source=configured_data_plane
|
||||
frontend_transport=tcp
|
||||
nvme_rdma_supported=false
|
||||
roce_claim_allowed=false
|
||||
internal_ip_not_reused_as_performance_target=true
|
||||
cleanup_status=ok
|
||||
```
|
||||
|
||||
QA sign-off:
|
||||
|
||||
```text
|
||||
internal/docs/qa-assignments/phase121-data-plane-address-capability-qa-signoff.md
|
||||
```
|
||||
|
||||
## Non-Claims
|
||||
|
||||
Phase 121 does not implement NVMe/RDMA, RoCE I/O, GPU Direct, NIXL, cufile,
|
||||
cuObject, performance SLOs, broad host compatibility, or a live throughput
|
||||
baseline. It only makes the address/capability model explicit enough for the
|
||||
next live 100GbE NVMe/TCP baseline.
|
||||
-630
@@ -1,630 +0,0 @@
|
||||
# Current Plan: Node-Loss Survival MVP
|
||||
|
||||
Status: active, opened after closing
|
||||
`finished-plans/phase17_finishedplan_stage2_transparent_multipath_host_failover_mvp.md`,
|
||||
96% complete. D1 cold product spec and D2 strict QA hard gate are drafted. D3
|
||||
topology eligibility and D4 conservative node-loss recovery scenarios are
|
||||
authored. The lab has been expanded to three Ready Kubernetes nodes (`m02`
|
||||
control-plane plus `m01` and `tp01` workers), the node-loss preflight passes,
|
||||
and QA has now passed the D4 RF3 sync-quorum node-loss recovery gate through
|
||||
CSI/pod recreate after the inventory attribution and image-import fixes:
|
||||
|
||||
- `ref/node-loss-survival-mvp-spec.md`
|
||||
- `ref/node-loss-lab-setup.md`
|
||||
- `qa-assignments/node-loss-survival-mvp-close-hard-gate.md`
|
||||
|
||||
QA needed now: formal close report against
|
||||
`qa-assignments/node-loss-survival-mvp-close-hard-gate.md`.
|
||||
|
||||
## Product Question
|
||||
|
||||
Can a Kubernetes user lose the node that hosts the active Seaweed Block primary
|
||||
and still recover the same PVC data through a documented path, with evidence
|
||||
that authority moved safely, stale paths were fenced, and the data check used a
|
||||
surviving replica on another node?
|
||||
|
||||
Stage 2 proved:
|
||||
|
||||
```text
|
||||
same physical node
|
||||
-> multiple logical replicas
|
||||
-> iSCSI ALUA + dm-multipath
|
||||
-> primary blockvolume pod stop
|
||||
-> same mounted writer pod survives without recreate
|
||||
```
|
||||
|
||||
This plan must move to the user-visible HA question:
|
||||
|
||||
```text
|
||||
primary Kubernetes node becomes unavailable
|
||||
-> surviving replica on another Kubernetes node is promoted
|
||||
-> workload recovers through the declared mechanism
|
||||
-> same PVC data verifies
|
||||
```
|
||||
|
||||
## Product Position
|
||||
|
||||
This plan serves `ref/product-positioning-v1.md`: mature block storage cannot
|
||||
stop at same-node process failover. A credible Kubernetes block product must
|
||||
name what happens when a node fails.
|
||||
|
||||
The value is not "the master selected a different replica." The value is:
|
||||
|
||||
```text
|
||||
an operator can run a documented RF3 sync-quorum Kubernetes path, inject primary
|
||||
node loss, and see the PVC recover with support-bundle evidence for placement,
|
||||
authority, CSI target movement, stale-primary fencing, and data integrity.
|
||||
```
|
||||
|
||||
## Scope Decision
|
||||
|
||||
First close uses the conservative recovery mechanism:
|
||||
|
||||
```text
|
||||
CSI / pod recreate reattach
|
||||
```
|
||||
|
||||
Reason:
|
||||
|
||||
- It isolates the new problem: real multi-node placement and non-loopback
|
||||
target selection.
|
||||
- Stage 2 already proved transparent multipath on one physical node; combining
|
||||
real node loss and transparent multipath immediately would mix too many
|
||||
failure axes.
|
||||
- Users still get a valuable claim: PVC data recovers after primary node loss,
|
||||
with no manual promote/repair.
|
||||
|
||||
Transparent multipath node-loss is a later gate or follow-up plan:
|
||||
|
||||
```text
|
||||
same mounted pod -> primary node loss -> host multipath switches to surviving node
|
||||
```
|
||||
|
||||
Lab topology precision:
|
||||
|
||||
- The D3/D4 MVP may run on three Kubernetes nodes spread across two physical
|
||||
machines if the artifacts disclose the physical-host shape.
|
||||
- That is a Kubernetes-node-loss proof, not a full physical-host-loss proof.
|
||||
- The stronger physical-host-loss claim requires the failed primary and all
|
||||
surviving promotion candidates to be on distinct physical fault domains, and
|
||||
must be gated separately before external positioning uses that wording.
|
||||
|
||||
## Target Claim
|
||||
|
||||
Narrow beta-facing claim after close:
|
||||
|
||||
```text
|
||||
For the documented RF3 sync-quorum Kubernetes topology with non-loopback
|
||||
frontends, Seaweed Block can recover a PVC after controlled primary-node loss
|
||||
through CSI/pod recreate reattach, and the support bundle proves authority
|
||||
movement, surviving-node target selection, stale-primary fencing, and data
|
||||
integrity.
|
||||
```
|
||||
|
||||
## Explicit Non-Claims
|
||||
|
||||
- No transparent mounted I/O continuation under node loss in the first close.
|
||||
- No NVMe ANA node-loss claim.
|
||||
- No Windows MPIO claim.
|
||||
- No broad multi-distro compatibility claim.
|
||||
- No RTO/RPO/SLO claim beyond bounded gate timings.
|
||||
- No automatic rebuild, reintegration, or failback claim.
|
||||
- No arbitrary multi-failure or network-partition tolerance unless a later gate
|
||||
explicitly proves it.
|
||||
- No production HA claim outside the documented lab topology.
|
||||
- No full physical-host-loss claim when multiple Kubernetes nodes share one
|
||||
physical machine; that topology is an intermediate Kubernetes-node-loss lab.
|
||||
|
||||
## D1: Topology And Placement Audit
|
||||
|
||||
Audit before code:
|
||||
|
||||
- Does the active TestOps/k3s lab have at least two schedulable Kubernetes
|
||||
nodes?
|
||||
- How does `blockmaster` cluster-spec name physical nodes and server IDs?
|
||||
- Can launcher place RF3 replicas across distinct Kubernetes nodes today?
|
||||
- Can generated `blockvolume` frontends use non-loopback addresses reachable
|
||||
from CSI nodes?
|
||||
- Does CSI publish lookup select a frontend reachable from the consuming node?
|
||||
- Can inventory prove replica -> server -> Kubernetes node -> frontend mapping?
|
||||
- What should count as controlled node failure in the lab: cordon/drain,
|
||||
kubelet stop, node network isolation, or deleting the node's blockvolume pods?
|
||||
|
||||
Exit criteria:
|
||||
|
||||
- update this plan with the honest current state,
|
||||
- identify the smallest implementation slice,
|
||||
- do not write recovery code until the topology gap is clear.
|
||||
|
||||
### D1 Audit Result
|
||||
|
||||
Current local Kubernetes context is a single Rancher Desktop/k3s node
|
||||
(`ping-r13`, internal IP `192.168.127.2`). That context cannot run the
|
||||
node-loss gate. Prior QA runs used the m02 lab, but this branch does not yet
|
||||
have a runner-native proof that the active QA lab has multiple schedulable
|
||||
Kubernetes nodes for this plan.
|
||||
|
||||
Code audit findings:
|
||||
|
||||
- `scripts/install-k8s-alpha.sh` renders every logical server onto one
|
||||
Kubernetes node (`SW_BLOCK_ALPHA_NODE_NAME`, defaulting to the first node
|
||||
from `kubectl get nodes`) and emits `127.0.0.1` data/control addresses.
|
||||
- `core/lifecycle` and `core/host/master` already have a useful base for
|
||||
distinct physical nodes: `NodeRegistration` carries
|
||||
`kubernetes.io/hostname`, `DataAddr`, and `CtrlAddr`, and
|
||||
`TestMountedFailover_WorkloadPlanAllocatesPortsByPhysicalNodeAcrossRF2Volumes`
|
||||
proves per-node port allocation across `k8s-a`/`k8s-b`.
|
||||
- `core/launcher/k8s_renderer.go` still renders generated blockvolume
|
||||
frontends as loopback-only (`--iscsi-listen=127.0.0.1:<port>`,
|
||||
`--status-addr=127.0.0.1:<port>`, and NVMe similarly). That was correct for
|
||||
Stage 2 same-node ALUA, but it is invalid for node-loss attach from another
|
||||
Kubernetes node.
|
||||
- `cmd/blockvolume` enforces loopback-only frontend binds for iSCSI/NVMe.
|
||||
The code already has `--iscsi-portal-addr` and CHAP support, but an external
|
||||
bind is deliberately rejected. Node-loss needs an explicit opt-in external
|
||||
frontend mode, not an accidental bypass.
|
||||
- Promotion/status probing is also loopback-shaped today. The generated
|
||||
`--status-addr=127.0.0.1:<port>` is reachable only through local/pod
|
||||
context, and master promotion evidence must not depend on a failed node's
|
||||
loopback. D3 must include a routable status/probe path or an explicitly
|
||||
documented Kubernetes port-forward/service model.
|
||||
- Replication data/control addresses must be routable across physical nodes.
|
||||
If only iSCSI is external but `DataAddr`/`CtrlAddr` remain loopback, RF3
|
||||
sync-quorum can render three frontends but still fail the actual replication
|
||||
and promotion-readiness contract.
|
||||
- CSI already passes `nodeID` into `LookupPublishTarget`, but
|
||||
`core/csi/master_backend.go` currently ignores it and selects published
|
||||
frontends without validating reachability from the consuming node.
|
||||
- Inventory can already print replica `server`, Kubernetes `node`, `frontend`,
|
||||
`status_addr`, and promotion evidence. The node-loss gate should add stable
|
||||
derived lines such as `replicas_on_distinct_nodes=true` and
|
||||
`frontends_non_loopback=true` so QA does not infer eligibility from ad-hoc
|
||||
greps.
|
||||
|
||||
Conclusion: the next slice is not recovery logic. The next slice is a topology
|
||||
eligibility implementation that makes cross-node targets real and auditable.
|
||||
|
||||
Smallest implementation slice:
|
||||
|
||||
```text
|
||||
alpha cluster-spec can describe multiple Kubernetes nodes with routable data/control addrs
|
||||
-> generated blockvolume Deployments bind/listen through explicit external iSCSI mode
|
||||
-> status/probe endpoints are routable or explicitly service/port-forwarded
|
||||
-> iSCSI advertises a routable portal address for each node
|
||||
-> CSI rejects loopback targets for the node-loss profile and selects the current primary target
|
||||
-> inventory emits distinct-node and non-loopback eligibility markers
|
||||
-> runner gate proves RF3 placement and attach eligibility without failure injection
|
||||
```
|
||||
|
||||
Security boundary for the external iSCSI mode:
|
||||
|
||||
- external bind must be opt-in and refused by default,
|
||||
- the first node-loss gate should require CHAP for external iSCSI unless a
|
||||
later security review approves a narrower lab-only exception,
|
||||
- CHAP must be plumbed on both sides: generated blockvolume target secret and
|
||||
CSI `NodeStage` secret delivery,
|
||||
- NVMe external bind remains non-claimed for this plan.
|
||||
|
||||
D3a implementation started:
|
||||
|
||||
- `cmd/blockvolume` now has an explicit `--allow-external-iscsi-bind` flag.
|
||||
External iSCSI remains rejected by default, and opt-in external iSCSI requires
|
||||
target-side CHAP.
|
||||
- `core/launcher` can render external iSCSI listens from the placement node
|
||||
address only when `K8sRenderConfig.ExternalISCSI` is enabled and a CHAP Secret
|
||||
is configured.
|
||||
- `cmd/blockmaster` exposes `--launcher-external-iscsi` to pass that renderer
|
||||
mode.
|
||||
- `scripts/install-k8s-alpha.sh` and `scripts/run-alpha-app-demo.sh` now accept
|
||||
explicit multi-node cluster-spec input through `SW_BLOCK_ALPHA_NODE_SPECS`
|
||||
entries shaped as `server_id|kubernetes_node|host_or_ip|pool_id`. This keeps
|
||||
the old single-node default intact while giving the node-loss runner a way to
|
||||
render routable `data_addr` / `ctrl_addr` values.
|
||||
- The same scripts can inject `--launcher-external-iscsi` and
|
||||
`--launcher-iscsi-chap-secret-name=<name>` via
|
||||
`SW_BLOCK_LAUNCHER_EXTERNAL_ISCSI=1`.
|
||||
- `scripts/run-alpha-app-demo.sh` now wires external iSCSI CHAP end-to-end for
|
||||
the app path: requires username/secret, creates the Secret in app and
|
||||
blockvolume namespaces, injects `csi.storage.k8s.io/node-stage-secret-*` into
|
||||
the rendered StorageClass, and cleans the Secret up.
|
||||
- `scripts/install-k8s-alpha.sh` now refuses external iSCSI without CHAP
|
||||
credentials and creates the configured CHAP Secret for standalone install
|
||||
flows.
|
||||
- CSI now has an explicit `--reject-loopback-publish-targets` guard. When
|
||||
enabled, master-backed publish lookup skips loopback or malformed frontend
|
||||
addresses and fails closed if no routable target remains.
|
||||
- The alpha install/demo scripts can inject
|
||||
`--reject-loopback-publish-targets` through
|
||||
`SW_BLOCK_REJECT_LOOPBACK_PUBLISH_TARGETS=1`.
|
||||
- `cmd/blockvolume` now has an explicit `--allow-external-status-bind` flag.
|
||||
The unauthenticated status API remains loopback-only by default; node-loss
|
||||
gates can opt into a concrete, non-loopback node-address bind so blockmaster
|
||||
can probe surviving replicas across nodes.
|
||||
- `core/launcher` can render external status endpoints from the same placement
|
||||
node address when `ExternalStatus` is enabled alongside external iSCSI. The
|
||||
generated workload receives both `--status-addr=<node-ip>:<port>` and
|
||||
`--allow-external-status-bind`.
|
||||
- `cmd/blockmaster` exposes `--launcher-external-status` and passes that mode
|
||||
to both the renderer and the workload-plan promotion evidence provider, so
|
||||
promotion probes use node-address status endpoints instead of
|
||||
`127.0.0.1:<port>`.
|
||||
- The alpha install/demo scripts can inject `--launcher-external-status` via
|
||||
`SW_BLOCK_LAUNCHER_EXTERNAL_STATUS=1`.
|
||||
- External node-loss mode now rejects loopback/unspecified node-spec hosts at
|
||||
the script, renderer, blockvolume bind, status bind, and promotion-probe
|
||||
boundaries. A bad `SW_BLOCK_ALPHA_NODE_SPECS` entry must fail early instead
|
||||
of producing fake cross-node evidence.
|
||||
- `scripts/uninstall-k8s-alpha.sh` now deletes the configured iSCSI CHAP Secret
|
||||
from app and `kube-system` namespaces so standalone external-iSCSI installs
|
||||
do not leave credentials behind.
|
||||
- Master status now publishes observed frontends for all assigned replicas, with
|
||||
the current primary replica first. This keeps multipath consumers able to see
|
||||
every path while making the conservative CSI/pod-recreate reattach path select
|
||||
the promoted primary instead of a stale topology-first replica.
|
||||
- CSI's single-target control-status lookup now has a node-loss guard test that
|
||||
consumes the first routable frontend as the current-primary target when
|
||||
loopback rejection is enabled.
|
||||
- Inventory now emits stable topology eligibility evidence per volume:
|
||||
`replicas_on_distinct_nodes=<bool>` and `frontends_non_loopback=<bool>` in
|
||||
both JSON and the summary. These are evidence markers, not health classifiers,
|
||||
so older single-node/non-node-loss paths are not made unhealthy by the marker.
|
||||
- `scripts/preflight-node-loss-lab.sh` now provides a reusable lab readiness
|
||||
check. It emits `NODE_SPECS`, selected writer app node, selected survivor
|
||||
reader node, Kubernetes-node placement, physical-domain shape, and
|
||||
`physical_host_loss_claimed=false`. The D3/D4 scenarios call this helper
|
||||
instead of carrying private discovery logic.
|
||||
- `scripts/run-alpha-app-demo.sh` now supports
|
||||
`SW_BLOCK_DEMO_READER_NODE_NAME` so conservative pod-recreate recovery can
|
||||
schedule the replacement reader onto a surviving node after the primary node
|
||||
is cordoned.
|
||||
- `scripts/run-alpha-app-demo.sh` now supports
|
||||
`SW_BLOCK_DEMO_FAIL_PRIMARY_BEFORE_READER=cordon-node-scale-primary-to-zero`.
|
||||
The mode derives the primary node from live inventory, cordons that
|
||||
Kubernetes node, scales the primary blockvolume Deployment to zero, records
|
||||
`failure_class=primary-kubernetes-node-cordoned-blockvolume-stop`, and
|
||||
uncordons the node during cleanup.
|
||||
|
||||
Still open before QA can produce live validation:
|
||||
|
||||
- QA validation of the runner-native multi-node eligibility scenario:
|
||||
`testops/scenarios/node-loss-topology-eligibility-chain.yaml`. The scenario
|
||||
supplies real `SW_BLOCK_ALPHA_NODE_SPECS`, enables external iSCSI/status plus
|
||||
loopback publish-target rejection, and asserts RF3 placement with
|
||||
`replicas_on_distinct_nodes=true` and `frontends_non_loopback=true`.
|
||||
- QA validation of the runner-native conservative recovery scenario:
|
||||
`testops/scenarios/node-loss-survival-rf3-reattach-chain.yaml`. It uses the
|
||||
same topology, cordons the live primary node, stops the primary blockvolume
|
||||
workload, recreates the reader on a survivor node, and requires
|
||||
`data_check_after_node_loss=reader_checksum_passed`.
|
||||
- optional stronger publish-target identity. Current-primary-first ordering
|
||||
closes the immediate conservative reattach path, but `FrontendTarget` still
|
||||
does not encode server/node identity; add that only if D3 evidence needs more
|
||||
than stable ordering plus inventory markers.
|
||||
|
||||
## D2: QA Hard Gate
|
||||
|
||||
Hard gate is drafted at
|
||||
`qa-assignments/node-loss-survival-mvp-close-hard-gate.md`.
|
||||
|
||||
It fails if:
|
||||
|
||||
- all replicas run on one physical node,
|
||||
- any cross-node target is loopback,
|
||||
- the proof uses only a pod stop instead of node failure/isolation,
|
||||
- reader attaches to the old failed-node frontend,
|
||||
- authority movement is not visible,
|
||||
- stale primary is untested,
|
||||
- cleanup leaves unexplained residue.
|
||||
|
||||
## D3: Multi-Node Topology Eligibility Gate
|
||||
|
||||
Add the first runner-native gate only after D1 audit:
|
||||
|
||||
```text
|
||||
RF3 PVC
|
||||
-> replicas placed on distinct Kubernetes nodes
|
||||
-> non-loopback frontends
|
||||
-> inventory shows mapping
|
||||
-> no node failure injection yet
|
||||
```
|
||||
|
||||
This gate proves the topology is eligible for node-loss recovery.
|
||||
|
||||
D3 scenario authored:
|
||||
|
||||
```text
|
||||
testops/scenarios/node-loss-topology-eligibility-chain.yaml
|
||||
```
|
||||
|
||||
It fails fast unless the lab has three Ready schedulable Kubernetes nodes with
|
||||
non-loopback InternalIPs. Those nodes may share two physical machines for this
|
||||
MVP gate, but the scenario records `physical_domain_count`,
|
||||
`physical_domain_shape`, and `physical_host_loss_claimed=false` so the evidence
|
||||
cannot be misread as full physical-host-loss proof. It then runs RF3
|
||||
sync-quorum with external iSCSI, external status, CHAP, and loopback
|
||||
publish-target rejection. It stops after writer verification and asserts the
|
||||
inventory eligibility markers before cleanup.
|
||||
|
||||
D3 QA run 20260515-204300-c892:
|
||||
|
||||
```text
|
||||
pre_clean PASS
|
||||
preflight PASS
|
||||
discover_multinode_topology FAIL
|
||||
collect_and_cleanup PASS
|
||||
```
|
||||
|
||||
Reason:
|
||||
|
||||
```text
|
||||
node-loss topology gate requires at least 3 Ready schedulable nodes with
|
||||
non-loopback InternalIP; found 1
|
||||
```
|
||||
|
||||
This is an intentional fail-closed lab-capacity result. It did not exercise the
|
||||
RF3 external iSCSI/status, CHAP, loopback-rejection, writer, or inventory
|
||||
eligibility assertions. It must not be treated as product validation.
|
||||
|
||||
Lab update 2026-05-16:
|
||||
|
||||
```text
|
||||
m02 Ready control-plane 192.168.1.184 physical-host=m02
|
||||
m01 Ready worker 192.168.1.181 physical-host=m01
|
||||
tp01 Ready worker 192.168.1.188 physical-host=tp01
|
||||
```
|
||||
|
||||
Fabric boundary: this is a LAN TCP/iSCSI topology using `192.168.1.x`.
|
||||
`tp01` does not have RoCE and must not be used for any `10.0.0.x` RDMA fabric,
|
||||
NVMe/RDMA, or performance claim in this plan.
|
||||
|
||||
`scripts/preflight-node-loss-lab.sh --min-k8s-nodes 3` now passes and emits:
|
||||
|
||||
```text
|
||||
node_loss_topology_eligible=true
|
||||
selected_node_count=3
|
||||
physical_domain_count=3
|
||||
physical_domain_shape=full-physical-host
|
||||
replica=r1 server=node-loss-r1 node=m01 host=192.168.1.181 physical_host=m01
|
||||
replica=r2 server=node-loss-r2 node=m02 host=192.168.1.184 physical_host=m02
|
||||
replica=r3 server=node-loss-r3 node=tp01 host=192.168.1.188 physical_host=tp01
|
||||
```
|
||||
|
||||
Next unblocker:
|
||||
|
||||
```text
|
||||
rerun node-loss-topology-eligibility-chain.yaml
|
||||
-> only then proceed to D4 node-loss recovery
|
||||
```
|
||||
|
||||
D3 QA run 20260516-134043-becf on the expanded lab advanced past topology
|
||||
discovery and failed in `rf3_external_topology` because `sw-blockmaster`
|
||||
scheduled on `m01`, where `sw-block:local` had not been imported. This was a
|
||||
real multi-node alpha pipeline gap: `scripts/build-alpha-images.sh` imported
|
||||
local images only into m02's k3s containerd.
|
||||
|
||||
Fix implemented and smoke-validated:
|
||||
|
||||
```text
|
||||
preflight emits K3S_IMPORT_NODES=<selected node IPs>
|
||||
-> D3/D4 pin_build sources node-specs.env
|
||||
-> build-alpha-images imports sw-block and sw-block-csi into each selected k3s node over SSH
|
||||
```
|
||||
|
||||
This keeps the scheduler free to place blockmaster and blockvolume workloads on
|
||||
any eligible node while avoiding a registry dependency for the lab.
|
||||
|
||||
Focused dev smoke on m02:
|
||||
|
||||
```text
|
||||
K3S_IMPORT_NODES=192.168.1.181,192.168.1.184,192.168.1.188
|
||||
build-alpha-images exit=0
|
||||
m01: sw-block:local and sw-block-csi:local present in k3s containerd
|
||||
m02: sw-block:local and sw-block-csi:local present in k3s containerd
|
||||
tp01: sw-block:local and sw-block-csi:local present in k3s containerd
|
||||
```
|
||||
|
||||
Dev rerun of D4 also exercises the same image-import path successfully, so D3's
|
||||
prior image-locality blocker is considered fixed pending QA rerun.
|
||||
|
||||
An acceptable intermediate lab can be:
|
||||
|
||||
```text
|
||||
m02 control-plane + m01 worker + one VM/containerized worker
|
||||
```
|
||||
|
||||
as long as `kubectl get nodes` shows three Ready schedulable nodes with
|
||||
non-loopback InternalIPs. The close report must disclose if two Kubernetes nodes
|
||||
share one physical host.
|
||||
|
||||
Before asking QA for another D3 run, dev can run:
|
||||
|
||||
```bash
|
||||
bash scripts/preflight-node-loss-lab.sh \
|
||||
--min-k8s-nodes 3 \
|
||||
--env-out /tmp/node-loss.env \
|
||||
--placement-out /tmp/node-placement.before.txt
|
||||
```
|
||||
|
||||
If this exits non-zero, the full D3 scenario will fail closed for the same lab
|
||||
reason.
|
||||
|
||||
Preflight contract after QA's m02 check:
|
||||
|
||||
- eligible lab: exit `0`, writes `node-loss.env` and
|
||||
`node-placement.before.txt`;
|
||||
- ineligible lab: exit `3`, writes a negative placement file with
|
||||
`node_loss_lab_eligible=false`, removes/skips the env file, and must block
|
||||
D3/D4 reruns.
|
||||
|
||||
## D4: Conservative Node-Loss Recovery Gate
|
||||
|
||||
Runner-native recovery gate:
|
||||
|
||||
```text
|
||||
writer writes /data/demo.bin
|
||||
inventory identifies primary replica and primary node
|
||||
controlled failure isolates/stops the primary node path
|
||||
master promotes a surviving replica
|
||||
replacement pod reattaches through CSI to surviving frontend
|
||||
reader verifies /data/demo.bin
|
||||
bundle records node_loss_recovery_claimed=true and transparent_failover_claimed=false
|
||||
cleanup proves no residue
|
||||
```
|
||||
|
||||
D4 scenario authored:
|
||||
|
||||
```text
|
||||
testops/scenarios/node-loss-survival-rf3-reattach-chain.yaml
|
||||
```
|
||||
|
||||
It is intentionally a Kubernetes-node-loss gate, not a physical-host-loss gate.
|
||||
It records `physical_host_loss_claimed=false`, `pod_recreate_used=true`, and
|
||||
`transparent_failover_claimed=false`. The replacement reader uses
|
||||
`SW_BLOCK_DEMO_READER_NODE_NAME=$SURVIVOR_APP_NODE`, so success requires CSI to
|
||||
reattach on a survivor node rather than scheduling back onto the cordoned
|
||||
primary node.
|
||||
|
||||
D4 QA run 20260516-152925-42b3 was canceled after the recovery phase appeared
|
||||
stuck. The important diagnosis from that run: master had already promoted the
|
||||
volume to r2, but inventory relabeled the failed r1 deployment row as
|
||||
`replica=r2` because the nested status report reflected the current primary.
|
||||
The scenario then grepped the first `replica=r2` row, saw
|
||||
`role=unavailable`, and waited until timeout. This was an inventory row
|
||||
identity bug, not an authority-promotion failure.
|
||||
|
||||
Fix:
|
||||
|
||||
```text
|
||||
core/ops/k8s_inventory.go
|
||||
-> keep deployment-derived replica identity (`--replica-id`) stable
|
||||
-> do not overwrite `replica.ReplicaID` from a status report's current-primary field
|
||||
```
|
||||
|
||||
Regression guard:
|
||||
|
||||
```text
|
||||
TestKubernetesInventoryCollector_PreservesDeploymentReplicaIdentityWhenStatusReportsCurrentPrimary
|
||||
```
|
||||
|
||||
Validation:
|
||||
|
||||
```text
|
||||
go test ./core/ops -count=1 PASS
|
||||
remote m02 targeted regression PASS
|
||||
D4 dev rerun 20260516-154108-7bb7 PASS
|
||||
state/phases/actions pass / 8/8 / 74/74
|
||||
before primary r1@m01
|
||||
failed node m01
|
||||
promoted replica r2@m02
|
||||
post_failure_primary_count 1
|
||||
before frontend 192.168.1.181:3260
|
||||
after frontend 192.168.1.184:3260
|
||||
CSI recovery method pod recreate
|
||||
reader data check /data/demo.bin: OK
|
||||
data_check_after_node_loss reader_checksum_passed
|
||||
transparent_failover_claimed false
|
||||
physical_host_loss_claimed false
|
||||
cleanup clean
|
||||
```
|
||||
|
||||
After-failure inventory now preserves all three rows correctly:
|
||||
|
||||
```text
|
||||
r1 node=m01 role=unavailable
|
||||
r2 node=m02 role=primary
|
||||
r3 node=tp01 role=unknown replication=replica_ready
|
||||
```
|
||||
|
||||
D4 QA rerun 20260516-154813-109a failed before the recovery path because the
|
||||
fresh CSI node DaemonSet hit `ImagePullBackOff` on m02:
|
||||
|
||||
```text
|
||||
sw-block-csi-node on m02: ImagePullBackOff for sw-block-csi:local
|
||||
m01: sw-block:local and sw-block-csi:local present
|
||||
m02: product images missing from k8s.io containerd namespace
|
||||
tp01: sw-block:local and sw-block-csi:local present
|
||||
```
|
||||
|
||||
This did not exercise the inventory fix; the writer never attached and the
|
||||
scenario never reached cordon/scale-down.
|
||||
|
||||
Image pipeline hardening:
|
||||
|
||||
```text
|
||||
scripts/build-alpha-images.sh
|
||||
-> import explicitly into k3s containerd namespace k8s.io
|
||||
-> verify sw-block:local and sw-block-csi:local after import
|
||||
-> when SW_BLOCK_IMPORT_K3S_NODES is set, also import/verify the local k3s node if available
|
||||
```
|
||||
|
||||
Dev validation 2026-05-16:
|
||||
|
||||
```text
|
||||
build/import artifact: /mnt/smb/work/share/g15d-k8s/dev-image-import-verify-20260516-160041
|
||||
m01: docker.io/library/sw-block:local and docker.io/library/sw-block-csi:local present
|
||||
m02: docker.io/library/sw-block:local and docker.io/library/sw-block-csi:local present
|
||||
tp01: docker.io/library/sw-block:local and docker.io/library/sw-block-csi:local present
|
||||
```
|
||||
|
||||
The observation API/support-bundle spec now treats this class as first-class
|
||||
operator evidence: `image_missing_on_node`, `pod_image_pull_failed`, CSI pod
|
||||
events/logs, and per-node image inventory should be available through
|
||||
`sw-block ops explain` / bundle rather than requiring manual SSH checks.
|
||||
|
||||
D4 QA rerun 20260516-160306-1e54 passed strictly:
|
||||
|
||||
```text
|
||||
state/phases/actions pass / 8/8 / 74/74
|
||||
lab m01 + m02 + tp01 3-node k3s
|
||||
transport LAN TCP/iSCSI, CHAP, external iSCSI/status
|
||||
ack_profile sync-quorum
|
||||
failure_class primary-kubernetes-node-cordoned-blockvolume-stop
|
||||
before_primary_replica/node r1@m01
|
||||
failed_replica/node r1@m01
|
||||
promoted_replica/node r2@m02
|
||||
before_publish_target_frontend 192.168.1.181:3260
|
||||
after_publish_target_frontend 192.168.1.184:3260
|
||||
post_failure_primary_count 1
|
||||
old_primary_stale_io_success_count 0
|
||||
target_ready_replicas 0
|
||||
pod_recreate_used true
|
||||
node_loss_recovery_claimed true
|
||||
data_check_after_node_loss reader_checksum_passed
|
||||
transparent_failover_claimed false
|
||||
physical_host_loss_claimed false
|
||||
cleanup strict clean
|
||||
```
|
||||
|
||||
This run is the first end-to-end Kubernetes-node-loss recovery proof for this
|
||||
plan: primary node cordoned, primary blockvolume stopped, master promoted a
|
||||
surviving replica, CSI reattached to the survivor frontend, and the replacement
|
||||
reader verified the pre-failure data.
|
||||
|
||||
## D5: Transparent Multipath Node-Loss Decision
|
||||
|
||||
After D4 passes, decide whether to extend this plan or open the next one for:
|
||||
|
||||
```text
|
||||
same mounted pod
|
||||
primary node loss
|
||||
host multipath path switch to another node
|
||||
no pod recreate
|
||||
post-failure data check
|
||||
```
|
||||
|
||||
Do not merge this into D4 unless the lab/product path is already stable.
|
||||
|
||||
## Gates To Close
|
||||
|
||||
This plan closes only when:
|
||||
|
||||
1. The lab topology has distinct Kubernetes nodes and non-loopback frontends.
|
||||
2. A strict QA hard gate exists before implementation is treated as complete.
|
||||
3. Fast tests protect node-aware placement, target selection, and non-loopback
|
||||
rejection.
|
||||
4. A runner-native gate proves recovery after controlled primary-node loss.
|
||||
5. Support bundles explain node placement, authority movement, CSI target
|
||||
movement, stale-primary fencing, bounded waits, and data verification.
|
||||
6. User-facing docs distinguish Stage 2 same-node transparent failover from
|
||||
node-loss recovery.
|
||||
7. QA validates independently and reports no blocking issue.
|
||||
-561
@@ -1,561 +0,0 @@
|
||||
# Current Plan: Control-Plane Observation / AI-Readable Ops MVP
|
||||
|
||||
Status: active, opened after closing
|
||||
`finished-plans/phase18_finishedplan_node_loss_survival_mvp.md`, 95% complete.
|
||||
|
||||
Reference spec:
|
||||
|
||||
- `ref/control-plane-observation-api-mvp.md`
|
||||
|
||||
Close evidence that motivates this plan:
|
||||
|
||||
- Node-Loss Survival close report:
|
||||
`qa-assignments/node-loss-survival-mvp-close-report.md`
|
||||
- D4 close run: `20260516-160306-1e54`
|
||||
- Prior QA blockers that should have been self-explaining:
|
||||
- inventory replica-ID attribution bug,
|
||||
- missing `sw-block-csi:local` image on m02,
|
||||
- ImagePullBackOff on CSI node pod,
|
||||
- reader/reattach waiting on a Kubernetes runtime precondition.
|
||||
|
||||
## Product Question
|
||||
|
||||
Can a Kubernetes user or support engineer understand Seaweed Block cluster
|
||||
state from one CLI/API surface, without SSHing into every node, reading raw
|
||||
Kubernetes events manually, or knowing internal authority implementation
|
||||
details?
|
||||
|
||||
For block storage, a stuck PVC or failover is a serious product moment. The
|
||||
operator needs a direct answer:
|
||||
|
||||
```text
|
||||
what failed
|
||||
what the product did
|
||||
whether data is safe
|
||||
which target is active
|
||||
whether recovery is still progressing or blocked
|
||||
what to collect or do next
|
||||
```
|
||||
|
||||
## Product Position
|
||||
|
||||
The last three availability plans moved the data path forward:
|
||||
|
||||
```text
|
||||
Stage 1: RF3 sync-quorum recovery through CSI/pod recreate
|
||||
Stage 2: RF3 sync-quorum same-node transparent iSCSI ALUA/dm-multipath failover
|
||||
Stage 3: RF3 sync-quorum Kubernetes-node-loss recovery through CSI/pod recreate
|
||||
```
|
||||
|
||||
The next product gap is operations trust. Mature block products do not require
|
||||
users to correlate `kubectl describe`, CSI logs, blockmaster logs, support
|
||||
bundles, and handwritten TestOps timelines. Seaweed Block should expose a
|
||||
stable observation model that a human, dashboard, CI job, or AI assistant can
|
||||
read directly.
|
||||
|
||||
The product direction should follow the SeaweedFS operations pattern:
|
||||
|
||||
```text
|
||||
shared observation core
|
||||
-> CLI text for humans, support, QA, and AI
|
||||
-> JSON/JSONL for automation and bundles
|
||||
-> master read-only API for dashboard/UI
|
||||
```
|
||||
|
||||
Do not create separate truth sources for CLI, dashboard, TestOps, and AI.
|
||||
|
||||
## Target User Experience
|
||||
|
||||
Initial CLI:
|
||||
|
||||
```bash
|
||||
sw-block ops cluster
|
||||
sw-block ops volumes
|
||||
sw-block ops describe volume <volume-id>
|
||||
sw-block ops timeline volume <volume-id>
|
||||
sw-block ops timeline volume <volume-id> -o jsonl
|
||||
sw-block ops explain volume <volume-id>
|
||||
sw-block ops inventory --namespace default --master 127.0.0.1:9333 --out /tmp/sw-block-inventory
|
||||
sw-block ops events --since 1h
|
||||
```
|
||||
|
||||
Default output is human-readable. `-o json` and `-o jsonl` are stable machine
|
||||
contracts.
|
||||
|
||||
Example healthy output:
|
||||
|
||||
```text
|
||||
volume pvc-... status=ok rf=3 ack=sync-quorum
|
||||
pvc default/mysql-data
|
||||
primary r1 on m01 frontend=192.168.1.181:3260
|
||||
replicas desired=3 observed=3
|
||||
r1 m01 primary ready durable_lsn=44
|
||||
r2 m02 replica_ready candidate_ready=true durable_lsn=44
|
||||
r3 tp01 replica_ready candidate_ready=true durable_lsn=44
|
||||
next action: none
|
||||
```
|
||||
|
||||
Example recovering output:
|
||||
|
||||
```text
|
||||
volume pvc-... status=recovering reason=primary_node_lost
|
||||
old primary r1 on m01 unavailable
|
||||
promoted primary r2 on m02 epoch=2 endpoint_version=1
|
||||
CSI target changed 192.168.1.181:3260 -> 192.168.1.184:3260
|
||||
reattach method: pod_recreate
|
||||
next action: wait for app pod readiness, then collect support bundle if stuck
|
||||
```
|
||||
|
||||
Example blocked output:
|
||||
|
||||
```text
|
||||
volume pvc-... status=blocked reason=csi_node_image_pull_failed
|
||||
node m02 missing image sw-block-csi:local
|
||||
pod kube-system/sw-block-csi-node-... waiting=ImagePullBackOff
|
||||
impact: PVC attach cannot proceed on workloads scheduled to m02
|
||||
next action: import the image to m02 or use a registry reachable by all nodes
|
||||
```
|
||||
|
||||
## Explicit Non-Claims
|
||||
|
||||
- No mutating admin controls.
|
||||
- No promote, repair, rebuild, backup, restore, or cleanup command.
|
||||
- No hosted dashboard in this MVP.
|
||||
- No metrics/Prometheus integration in this MVP.
|
||||
- No alert-manager integration.
|
||||
- No claim that application-level checksum ran unless TestOps/user actually ran
|
||||
it.
|
||||
- No replacement for Kubernetes events; this plan explains Seaweed Block state
|
||||
and includes relevant Kubernetes runtime evidence.
|
||||
|
||||
## D1: Observation Evidence Model
|
||||
|
||||
Build the shared data model before adding live APIs.
|
||||
|
||||
Status: dev pass, QA not requested yet. Implemented the first stable evidence
|
||||
model and renderers in `core/ops/observation.go`, with golden tests in
|
||||
`core/ops/observation_test.go`.
|
||||
|
||||
Required structs / schema concepts:
|
||||
|
||||
```text
|
||||
ClusterEvidence
|
||||
NodeEvidence
|
||||
VolumeEvidence
|
||||
ReplicaEvidence
|
||||
ClusterEvent
|
||||
VolumeTimeline
|
||||
VolumeExplanation
|
||||
SupportBundleManifest
|
||||
```
|
||||
|
||||
Required stable statuses:
|
||||
|
||||
```text
|
||||
ok
|
||||
degraded
|
||||
recovering
|
||||
blocked
|
||||
invalid
|
||||
unavailable
|
||||
```
|
||||
|
||||
Required reason codes for first slice:
|
||||
|
||||
```text
|
||||
primary_node_lost
|
||||
candidate_covers_required_frontier
|
||||
no_promotion_ready_candidate
|
||||
durable_frontier_missing
|
||||
candidate_frontier_behind
|
||||
status_endpoint_unreachable
|
||||
csi_node_image_pull_failed
|
||||
image_missing_on_node
|
||||
generated_deployment_missing
|
||||
observed_replicas_below_desired
|
||||
loopback_frontend_rejected
|
||||
stale_primary_fenced
|
||||
```
|
||||
|
||||
Pass criteria:
|
||||
|
||||
- golden examples for healthy, recovering, and blocked evidence,
|
||||
- text renderer output is readable without internal context,
|
||||
- JSON output includes schema version and stable reason codes,
|
||||
- JSONL timeline emits one event per line with `event_type`, `severity`,
|
||||
`reason_code`, `volume_id`, `evidence_ref`, and summary text.
|
||||
|
||||
Dev evidence:
|
||||
|
||||
- `go test ./core/ops -run TestObservation -count=1` PASS.
|
||||
- `go test ./core/ops -count=1` PASS.
|
||||
- Healthy text pins `status=ok`, primary frontend, replica durable LSN, and
|
||||
`next action: none`.
|
||||
- Recovering text pins `status=recovering reason=primary_node_lost`, stale
|
||||
primary fencing, and CSI target movement.
|
||||
- Blocked text pins `status=blocked reason=csi_node_image_pull_failed`, node,
|
||||
image, and `ImagePullBackOff` pod evidence.
|
||||
- JSON/JSONL output carries `schema_version=1.0` and stable reason codes.
|
||||
|
||||
## D2: CLI From Existing Bundles
|
||||
|
||||
Start with existing inventory/support bundles. This avoids waiting for a new
|
||||
master API and immediately improves support/QA usability.
|
||||
|
||||
Status: dev pass, QA not requested yet. Implemented bundle-backed observation
|
||||
loading in `core/ops/observation_bundle.go` and wired read-only CLI entry points
|
||||
in `cmd/sw-block/main.go`.
|
||||
|
||||
Commands:
|
||||
|
||||
```bash
|
||||
sw-block ops describe volume --from-bundle <dir> <volume-id>
|
||||
sw-block ops timeline volume --from-bundle <dir> <volume-id>
|
||||
sw-block ops timeline volume --from-bundle <dir> <volume-id> -o jsonl
|
||||
sw-block ops explain volume --from-bundle <dir> <volume-id>
|
||||
```
|
||||
|
||||
Inputs:
|
||||
|
||||
- `volume-inventory.json`,
|
||||
- `volume-inventory-summary.txt`,
|
||||
- `ops-inventory-bundle.json`,
|
||||
- nested per-replica `ops-status-bundle.json`,
|
||||
- `primary-failure-recovery.txt`,
|
||||
- `node-loss-recovery-summary.txt`,
|
||||
- `control-plane-timeline.txt`,
|
||||
- Kubernetes runtime evidence when present.
|
||||
|
||||
Pass criteria:
|
||||
|
||||
- D4 bundle `20260516-160306-1e54` renders the same story as the QA close
|
||||
report:
|
||||
`r1@m01 -> r2@m02`, CSI target moved, reader checksum passed, stale primary
|
||||
fenced, transparent failover not claimed.
|
||||
- The failed D4 bundle `20260516-154813-109a` renders
|
||||
`status=blocked reason=csi_node_image_pull_failed` and names m02 plus
|
||||
`sw-block-csi:local`.
|
||||
|
||||
Dev evidence:
|
||||
|
||||
- Added:
|
||||
- `sw-block ops describe volume --from-bundle <dir> <volume-id>`
|
||||
- `sw-block ops timeline volume --from-bundle <dir> <volume-id> -o jsonl`
|
||||
- `sw-block ops explain volume --from-bundle <dir> <volume-id>`
|
||||
- `go test ./core/ops -count=1` PASS.
|
||||
- `go test ./cmd/sw-block -count=1` PASS.
|
||||
- Real close bundle smoke:
|
||||
`go run ./cmd/sw-block ops explain volume --from-bundle V:\share\g15d-k8s\20260516-160306-1e54-node-loss-survival pvc-c606d03a-4136-464d-8716-ef01f92c7b12`
|
||||
renders `r2@m02`, target movement `192.168.1.181:3260 ->
|
||||
192.168.1.184:3260`, reader verification, stale-primary fence evidence, and
|
||||
timeline events.
|
||||
- Real failed bundle smoke:
|
||||
`go run ./cmd/sw-block ops explain volume --from-bundle V:\share\g15d-k8s\20260516-154813-109a-node-loss-survival pvc-c606d03a`
|
||||
renders `status=blocked reason=csi_node_image_pull_failed`, node `m02`, and
|
||||
image `sw-block-csi:local`.
|
||||
|
||||
## D3: Live CLI Over Current Inventory Sources
|
||||
|
||||
Use the current live inventory collector and Kubernetes runtime collectors.
|
||||
|
||||
Status: dev pass for the first read-only live CLI slice. Implemented live
|
||||
cluster, volume-list, and per-volume explain/describe/timeline entry points
|
||||
using the same observation model as D1/D2. This slice reads Kubernetes
|
||||
inventory and optional per-replica status through the existing collectors; it
|
||||
does not introduce master write APIs or mutating admin actions.
|
||||
|
||||
Commands:
|
||||
|
||||
```bash
|
||||
sw-block ops cluster --namespace default --master 127.0.0.1:9333
|
||||
sw-block ops volumes --namespace default --master 127.0.0.1:9333
|
||||
sw-block ops describe volume <volume-id> --namespace default --master 127.0.0.1:9333
|
||||
sw-block ops explain volume <volume-id> --namespace default --master 127.0.0.1:9333
|
||||
sw-block ops inventory --namespace default --master 127.0.0.1:9333 --out <dir>
|
||||
```
|
||||
|
||||
Runtime evidence to collect:
|
||||
|
||||
- `kubectl get pods -A -o wide`,
|
||||
- relevant `kubectl describe pod`,
|
||||
- namespace events,
|
||||
- blockmaster logs,
|
||||
- CSI controller logs,
|
||||
- CSI node logs,
|
||||
- generated blockvolume pod logs,
|
||||
- per-node k3s image inventory for selected product images,
|
||||
- iSCSI sessions and node DB entries when available.
|
||||
|
||||
Pass criteria:
|
||||
|
||||
- live healthy RF3 node-loss-ready volume explains as `ok`,
|
||||
- simulated missing image explains as `blocked` with node/image/pod/reason,
|
||||
- no command mutates Kubernetes, master, iSCSI, or blockvolume state.
|
||||
|
||||
Dev evidence:
|
||||
|
||||
- Added:
|
||||
- `sw-block ops cluster --namespace <ns> [--master <addr>] [-o json]`
|
||||
- `sw-block ops volumes --namespace <ns> [--master <addr>] [-o json]`
|
||||
- live mode for `sw-block ops describe volume <volume-id> --namespace <ns>
|
||||
[--master <addr>] [--out <dir>]`
|
||||
- live mode for `sw-block ops explain volume <volume-id> --namespace <ns>
|
||||
[--master <addr>] [--out <dir>]`
|
||||
- `go test ./core/ops -count=1` PASS.
|
||||
- `go test ./cmd/sw-block -count=1` PASS.
|
||||
- CLI tests pin live inventory output for:
|
||||
- cluster summary,
|
||||
- volume list,
|
||||
- per-volume describe,
|
||||
- bundle timeline JSONL,
|
||||
- ImagePullBackOff explanation from preserved failed bundle.
|
||||
|
||||
Remaining D3 gap before QA: run the live commands against the actual 3-node lab
|
||||
while a healthy RF3 node-loss-ready volume is active, then add the simulated
|
||||
missing-image live fixture if needed.
|
||||
|
||||
## D4: Master Read-Only Snapshot API
|
||||
|
||||
Add a master read-only API only after the CLI evidence model is stable.
|
||||
|
||||
Status: dev pass. Implemented `Host.ObservationSnapshot()` in
|
||||
`core/host/master/observation_snapshot.go`, added the read-only
|
||||
`ClusterEvidenceService` to `core/rpc/proto/control.proto`, regenerated
|
||||
protobuf bindings, registered the service in blockmaster, and wired server
|
||||
methods in `core/host/master/observation_service.go`.
|
||||
|
||||
Provisional API:
|
||||
|
||||
```proto
|
||||
service ClusterEvidenceService {
|
||||
rpc GetClusterStatus(GetClusterStatusRequest)
|
||||
returns (ClusterStatusResponse);
|
||||
rpc ListVolumes(ListVolumesRequest)
|
||||
returns (ListVolumesResponse);
|
||||
rpc GetVolumeStatus(GetVolumeStatusRequest)
|
||||
returns (VolumeEvidence);
|
||||
rpc GetVolumeTimeline(GetVolumeTimelineRequest)
|
||||
returns (VolumeTimelineResponse);
|
||||
rpc WatchClusterEvents(WatchClusterEventsRequest)
|
||||
returns (stream ClusterEvent);
|
||||
}
|
||||
```
|
||||
|
||||
Pass criteria:
|
||||
|
||||
- API and CLI share the same evidence model,
|
||||
- no read API can mutate authority, placement, lifecycle, or replica state,
|
||||
- one live RF3 volume appears with primary, replicas, frontend, epoch,
|
||||
endpoint_version, and reason code.
|
||||
|
||||
Dev evidence:
|
||||
|
||||
- `Host.ObservationSnapshot()` returns `ops.ClusterEvidence` directly, so the
|
||||
master read surface and CLI/bundle surfaces share one evidence schema.
|
||||
- Snapshot reads only lifecycle volume/node/placement stores, publisher
|
||||
authority line, controller evidence, and observation-store heartbeat facts.
|
||||
- `TestMasterObservationSnapshot_RF3HealthyReadOnly` pins an RF3 volume with
|
||||
primary, replicas, frontend, epoch, endpoint_version, PVC identity, and node
|
||||
evidence, then asserts authority state is unchanged after the read.
|
||||
- `TestMasterObservationSnapshot_MissingReplicaIsDegraded` pins
|
||||
`observed_replicas_below_desired` and per-replica
|
||||
`status_endpoint_unreachable` when one placement slot has no fresh
|
||||
observation.
|
||||
- `TestMasterObservationSnapshot_NoLifecycleStoreReturnsEmptyOK` pins safe
|
||||
empty output when lifecycle stores are not configured.
|
||||
- `go test ./core/host/master -run TestMasterObservationSnapshot -count=1`
|
||||
PASS.
|
||||
- `go test ./core/host/master ./core/ops ./cmd/sw-block -count=1` PASS.
|
||||
|
||||
- `TestClusterEvidenceService_GRPCRegistered` calls
|
||||
`ClusterEvidenceService.GetVolumeStatus` through a real gRPC client and pins
|
||||
that the service is registered on blockmaster.
|
||||
- `TestClusterEvidenceService_GetClusterStatusSharesObservationSnapshot` pins
|
||||
schema/status/volume/node evidence and verifies the read does not mutate
|
||||
publisher authority.
|
||||
- `TestClusterEvidenceService_ListVolumesAndGetVolumeStatus` pins the degraded
|
||||
missing-replica wire shape.
|
||||
- `TestClusterEvidenceService_GetVolumeStatusNotFound` pins `NotFound` for
|
||||
unknown volumes.
|
||||
- `TestClusterEvidenceService_GetVolumeTimelineEmptyButVersioned` keeps the D5
|
||||
timeline gap explicit: the API is versioned, but product-owned event content
|
||||
lands in the next slice.
|
||||
- `go test ./core/host/master -run "TestClusterEvidenceService|TestMasterObservationSnapshot" -count=1`
|
||||
PASS.
|
||||
- `go test ./core/host/master ./core/ops ./cmd/sw-block -count=1` PASS.
|
||||
|
||||
Remaining D4 gap before QA: validate against the live 3-node lab while an RF3
|
||||
node-loss-ready volume is active, so the API output is checked against real
|
||||
Kubernetes node/replica placement and published frontend evidence.
|
||||
|
||||
## D5: Product Timeline
|
||||
|
||||
Move from TestOps-only timelines to product-owned timeline events.
|
||||
|
||||
Status: dev pass for the first product-owned timeline slice. Added a bounded
|
||||
master event ring in `core/host/master/event_ring.go`, included master-owned
|
||||
events in `Host.ObservationSnapshot()`, and exposed them through
|
||||
`ClusterEvidenceService.GetVolumeTimeline`.
|
||||
|
||||
Required event types:
|
||||
|
||||
```text
|
||||
volume_created
|
||||
placement_verified
|
||||
replica_heartbeat_seen
|
||||
replica_stale
|
||||
promotion_candidate_evaluated
|
||||
authority_published
|
||||
publish_target_changed
|
||||
stale_primary_fenced
|
||||
csi_reattach_observed
|
||||
pod_image_pull_failed
|
||||
csi_node_unavailable
|
||||
volume_recovered
|
||||
volume_blocked
|
||||
support_bundle_collected
|
||||
```
|
||||
|
||||
Pass criteria:
|
||||
|
||||
- node-loss D4 produces the same six-event story from product evidence, not
|
||||
only from TestOps files,
|
||||
- `WatchClusterEvents` reconnect with cursor does not miss
|
||||
`authority_published` or `volume_blocked`.
|
||||
|
||||
Dev evidence:
|
||||
|
||||
- `RunLifecycleProductTick()` now emits `placement_verified` events when
|
||||
placement verification succeeds.
|
||||
- The promotion gate now emits `promotion_candidate_evaluated` events with
|
||||
stable reason codes:
|
||||
`candidate_covers_required_frontier`, `candidate_frontier_behind`, or
|
||||
`no_promotion_ready_candidate`.
|
||||
- The promotion gate emits `volume_blocked` when no candidate passes the
|
||||
readiness gate.
|
||||
- Added a publisher post-mint observer hook:
|
||||
`authority.WithPublishObserver`.
|
||||
- `authority_published` is now emitted only after `Publisher.apply()` has
|
||||
successfully minted, durably committed when a store exists, updated in-memory
|
||||
state, and delivered the fact. It is not emitted from controller intent
|
||||
submission.
|
||||
- CSI/node staging now emits `csi_reattach_observed` through
|
||||
`ObservationService.ReportClusterEvent` after a successful `NodeStageVolume`.
|
||||
This is an observation-only append to the master event ring; it does not
|
||||
mutate lifecycle, authority, placement, Kubernetes, or replica state.
|
||||
- `cmd/blockcsi` wires a `ControlEventReporter` when `--master` is configured,
|
||||
so CSI reattach/stage evidence can show up in the master timeline alongside
|
||||
`placement_verified`, `promotion_candidate_evaluated`, and
|
||||
`authority_published`.
|
||||
- `sw-block ops cluster --master-api <addr> -o json` now reads
|
||||
`ClusterEvidenceService.GetClusterStatus` directly, so TestOps and support
|
||||
bundles can capture the product-owned event ring without scraping
|
||||
blockmaster logs or reconstructing the timeline from runner files.
|
||||
- `node-loss-survival-rf3-reattach-chain.yaml` now captures
|
||||
`demo/product-observation/cluster-evidence.json` before cleanup and asserts
|
||||
the product event stream contains `placement_verified`,
|
||||
`promotion_candidate_evaluated`, `authority_published`, and
|
||||
`csi_reattach_observed`.
|
||||
- `TestPublisher_PublishObserverFiresAfterSuccessfulMintOnly` PASS.
|
||||
- `TestMasterTimeline_RecordsAuthorityPublishedAfterMint` PASS.
|
||||
- `TestMasterTimeline_RecordsPlacementVerified` PASS.
|
||||
- `TestMasterTimeline_RecordsPromotionCandidateEvaluation` PASS.
|
||||
- `WatchClusterEvents` now streams retained product events after
|
||||
`since_event_id`; unknown cursors conservatively replay retained events so
|
||||
clients can de-duplicate by event ID instead of silently missing evidence.
|
||||
- `TestClusterEvidenceService_WatchClusterEventsCursor` PASS and pins that
|
||||
reconnect after a cursor does not replay the cursor event and still includes
|
||||
`authority_published`.
|
||||
- `TestObservationService_ReportClusterEventAppearsInVolumeTimeline` PASS and
|
||||
pins that a CSI-reported `csi_reattach_observed` event is accepted, assigned
|
||||
a master event ID, and appears in `GetVolumeTimeline`.
|
||||
- `TestNodeStage_ReportsCSIReattachObservedAfterSuccessfulStage` PASS and pins
|
||||
CSI staging emits volume/replica/node/epoch/endpoint_version evidence after
|
||||
a successful iSCSI stage.
|
||||
- `TestControlEventReporter_ReportsClusterEvent` PASS and pins the CSI client
|
||||
conversion into the observation RPC.
|
||||
- `TestOpsClusterReadsMasterAPIProductEvents` PASS and pins the CLI can export
|
||||
master-owned product events through `--master-api`.
|
||||
- `go test ./core/host/master -run "TestMasterTimeline|TestClusterEvidenceService|TestMasterObservationSnapshot" -count=1`
|
||||
PASS.
|
||||
- `go test ./core/authority ./core/host/bootstrap ./core/host/master ./cmd/blockmaster ./cmd/blockcsi ./core/csi ./cmd/sw-block ./core/ops -count=1`
|
||||
PASS.
|
||||
|
||||
QA evidence:
|
||||
|
||||
- D5 live rerun `20260517-011004-4b79`: PASS, 8/8 phases, 83/83
|
||||
actions.
|
||||
- `demo/product-observation/cluster-evidence.json` is present in the bundle
|
||||
and contains product-owned events exported through
|
||||
`sw-block ops cluster --master-api`.
|
||||
- Required event types found in the product event stream:
|
||||
`placement_verified`, `promotion_candidate_evaluated`,
|
||||
`authority_published`, and `csi_reattach_observed`.
|
||||
- `authority_published` has master-minted `event_id` and `event_time` after
|
||||
authority publication.
|
||||
- `csi_reattach_observed` is CSI-emitted and master-ingested with a
|
||||
master-minted `event_id`; it records the promoted r2 frontend
|
||||
`192.168.1.184:3260`, not the failed r1 frontend.
|
||||
- The bundle also includes populated node and volume sections: three
|
||||
schedulable/ready nodes, one RF=3 volume, primary `r2`, published target
|
||||
`192.168.1.184:3260`, epoch `2`, and all three replica rows.
|
||||
|
||||
Remaining D5 gap:
|
||||
|
||||
- Kubernetes runtime blocker events such as `ImagePullBackOff` are still
|
||||
explained by the bundle/inventory path. Promoting them into the master event
|
||||
stream is useful, but no longer blocks this MVP because D5's product-owned
|
||||
recovery event ingestion is now proven.
|
||||
|
||||
## D6: User Tutorial And Hard Gate
|
||||
|
||||
Status: dev pass, QA close pending. User-facing docs now describe the
|
||||
product-owned control-plane export path, and the formal close hard gate exists
|
||||
under `qa-assignments/control-plane-observation-ai-readable-ops-mvp-close-hard-gate.md`.
|
||||
|
||||
Docs must teach:
|
||||
|
||||
- how to inspect cluster health,
|
||||
- how to inspect one volume,
|
||||
- how to read a timeline,
|
||||
- how to collect a support bundle,
|
||||
- how to interpret healthy/recovering/blocked examples,
|
||||
- what is not claimed.
|
||||
|
||||
QA hard gate should fail if:
|
||||
|
||||
- any command mutates state,
|
||||
- a blocked/recovering state lacks a stable reason code,
|
||||
- missing image / ImagePullBackOff is not explained,
|
||||
- node-loss recovery evidence is available only by reading raw TestOps logs,
|
||||
- stale primary and promoted primary cannot be distinguished,
|
||||
- JSON/JSONL output is unstable or missing schema version,
|
||||
- support bundle misses Kubernetes pod events/logs for attach/install failures.
|
||||
|
||||
Required close artifacts:
|
||||
|
||||
- `docs/operations-v1.md` names the new AI-readable observation path and shows
|
||||
`sw-block ops cluster --master-api <addr> -o json`.
|
||||
- `docs/quickstart-kubernetes.md` gives a short "export product evidence"
|
||||
path using `kubectl port-forward deploy/sw-blockmaster`.
|
||||
- `qa-assignments/control-plane-observation-ai-readable-ops-mvp-close-hard-gate.md`
|
||||
exists and makes D5 product event evidence a hard close requirement.
|
||||
|
||||
Dev evidence:
|
||||
|
||||
- `docs/operations-v1.md` now documents the split between product-owned
|
||||
`cluster-evidence.json` and inventory/per-replica support bundles.
|
||||
- `docs/quickstart-kubernetes.md` now shows how to capture
|
||||
`/tmp/sw-block-cluster-evidence.json` using
|
||||
`sw-block ops cluster --master-api 127.0.0.1:9333 -o json`.
|
||||
- The close hard gate has HG-0..HG-12 covering docs, product-owned event
|
||||
export, required event types, master-minted event identity, CSI reattach
|
||||
evidence, read-only boundary, stable reason codes, bundle-backed
|
||||
explanation, support evidence completeness, watch/cursor behavior, explicit
|
||||
non-claims, and cleanup hygiene.
|
||||
|
||||
## Next Step
|
||||
|
||||
Ask QA for a formal close review against the observation hard gate. Do not jump
|
||||
directly to a dashboard. The dashboard should be a consumer of the observation
|
||||
core, not a new source of truth.
|
||||
-869
@@ -1,869 +0,0 @@
|
||||
# Finished Plan: iSCSI/NVMe Frontend Protocol Readiness
|
||||
|
||||
Status: historical reference. Closed on 2026-05-09 by the runner-native
|
||||
protocol release gate.
|
||||
|
||||
This phase/topic file preserves the plan that brought iSCSI and NVMe from active
|
||||
frontend bring-up to release-gated protocol coverage. It is no longer the active
|
||||
execution plan. Current work is tracked in `../current-plan.md`.
|
||||
|
||||
Rule: V2 frontend coverage is the minimum height for V3 unless we explicitly
|
||||
drop a feature with a product reason. V3 should keep its own architecture, but
|
||||
the user-visible frontend capability should reach and then exceed V2.
|
||||
|
||||
References:
|
||||
|
||||
- `ref/iscsi-v2-coverage-gap-audit.md`
|
||||
- `ref/iscsi-os-initiator-compat-plan.md`
|
||||
- `ref/v2-frontend-protocol-gap-audit.md`
|
||||
- `ref/iscsi-csi-alua-review-guide.md`
|
||||
- `ref/iscsi-p6-alua-mpio-design.md`
|
||||
- `ref/iscsi-alua-technical-note.md`
|
||||
- `ref/nvme-ana-parity-plan.md`
|
||||
- `ref/nvme-v2-coverage-gap-audit.md`
|
||||
- `ref/nvme-ana-technical-note.md`
|
||||
- `ref/nvme-p4-multipath-failover-design.md`
|
||||
|
||||
## Current Status: Protocol Readiness Closed
|
||||
|
||||
As of 2026-05-09, the current iSCSI/NVMe frontend protocol-readiness plan is
|
||||
closed for this branch.
|
||||
|
||||
Close evidence:
|
||||
|
||||
- Runner-native protocol release gate PASS on M02:
|
||||
- product commit: `033028e74c1ac3bc06f19c0563bc2e6a0495af59`,
|
||||
- runner commit: `3c1b6603aefcf4c1bf0b22f9a9c081a67e786d8d`,
|
||||
- suite run: `20260509-151531-9c6c`,
|
||||
- wall clock: 1415.97 seconds,
|
||||
- children: `iscsi-p6-alua-failover`, `nvme-p4-multipath-failover`,
|
||||
`nvme-p5-csi-protocol`, and `iscsi-p8-compat-soak`, all PASS.
|
||||
- `swblock validate-bundle --profile protocol-release-gate` classified the
|
||||
native suite bundle as VALID.
|
||||
- Post-run M02 cleanup was clean: no V3 processes and all child
|
||||
`collect_and_cleanup` phases ran.
|
||||
|
||||
Decision:
|
||||
|
||||
- iSCSI and NVMe are now release-gated protocol frontends, not active bring-up
|
||||
work.
|
||||
- Future iSCSI/NVMe changes should enter through regression tests, V2 parity
|
||||
backlog items, or broader availability/performance gates.
|
||||
- Do not treat this as full V2 product parity. Remaining work belongs to
|
||||
parity/hardening: rebuild/reintegration matrices, operator lifecycle,
|
||||
multi-node/cloud scale, longer soak/performance, and scenario corpus
|
||||
migration.
|
||||
|
||||
## Product Goal
|
||||
|
||||
- Keep iSCSI and NVMe credible Kubernetes block frontends, not only smoke-test
|
||||
paths.
|
||||
- Support real OS initiators, filesystem workloads, stress, auth, lifecycle,
|
||||
multipath, and mounted failover.
|
||||
- Keep protocol code separate from authority and replica readiness decisions.
|
||||
- Use V2 tests as the coverage inventory, not as code to blindly copy.
|
||||
|
||||
## Completed Baseline
|
||||
|
||||
- iSCSI-P1 OS initiator correctness:
|
||||
- status: done in PR #24.
|
||||
- includes Data-Out collector, pending command handling during Data-Out,
|
||||
Data-Out timeout, and Linux OS initiator evidence.
|
||||
- Large READ Data-In splitting:
|
||||
- status: done in PR #25.
|
||||
- includes residual direction handling.
|
||||
- iSCSI-P2 first stability pack:
|
||||
- status: done in PR #26.
|
||||
- includes RX/TX stability tests, large write memory tests, OS smoke script,
|
||||
loop mode, stress mode, TestOps registry entry, and sustained sync smoke.
|
||||
- iSCSI-P2 supplemental session guards:
|
||||
- status: done in PR #41.
|
||||
- includes rapid login/logout goroutine budget, concurrent target close
|
||||
idempotency, target same-address restart, and NOP-Out queued during
|
||||
Data-Out.
|
||||
- iSCSI-P3 attach/detach loop tooling:
|
||||
- status: done in PR #41.
|
||||
- includes `scripts/run-k8s-attach-detach-loop.sh` and TestOps registry
|
||||
scenario `iscsi-p3-attach-detach-loop`.
|
||||
- iSCSI-P2/P3 lab validation:
|
||||
- status: QA green on `iscsi/frontend-completeness@e7c95ee`.
|
||||
- OS repeat, OS fio, K8s fio, and K8s attach/detach all passed on M02.
|
||||
- evidence: `internal/docs/qa-assignments/iscsi-p2-p3-lab-validation.md`.
|
||||
- iSCSI smoke harness cleanup:
|
||||
- status: done in PR #27.
|
||||
- Larger alpha PVC smoke:
|
||||
- status: done in PR #28.
|
||||
- Operational iSCSI target knobs:
|
||||
- status: done in PR #36.
|
||||
- includes portal address / externally advertised target configuration.
|
||||
- PVC metadata and owner-reference plumbing:
|
||||
- status: done in PR #39.
|
||||
- relevant to CSI/K8s cleanup, not core iSCSI protocol.
|
||||
- Owner-reference alpha default:
|
||||
- status: done in PR #40.
|
||||
- relevant to K8s cleanup and alpha install flow.
|
||||
- iSCSI-P4 CHAP / Access Control:
|
||||
- status: done in PR #41.
|
||||
- includes target-side CHAP, CSI node CHAP, Kubernetes Secret wiring, and
|
||||
QA evidence.
|
||||
|
||||
## Recently Closed Milestone: iSCSI-P2 Stability
|
||||
|
||||
- Goal:
|
||||
- prevent session breakage, leaks, and unbounded memory behavior under real
|
||||
OS-style traffic.
|
||||
- turn the recent large I/O debugging class into repeatable local and QA
|
||||
tests.
|
||||
|
||||
- Tasks:
|
||||
- add RX/TX stability test pack:
|
||||
- status: done in PR #26.
|
||||
- supplemental guards: done in PR #41.
|
||||
- rapid login/logout without goroutine leak,
|
||||
- many concurrent sessions,
|
||||
- target close while I/O is active,
|
||||
- double close without panic,
|
||||
- NOP-Out during Data-Out,
|
||||
- error response StatSN behavior.
|
||||
- add large write memory-pressure tests:
|
||||
- status: done in PR #26.
|
||||
- repeated 4 MiB writes,
|
||||
- slow backend,
|
||||
- heap/goroutine growth guard.
|
||||
- extend real OS harness:
|
||||
- status: done in PR #26.
|
||||
- `SW_BLOCK_ISCSI_ITERATIONS=N`,
|
||||
- `SW_BLOCK_ISCSI_STRESS=dd|fio`,
|
||||
- artifact path printed,
|
||||
- no active sessions after every loop.
|
||||
- #QA run K8s validation after local tests:
|
||||
- status: QA green on `iscsi/frontend-completeness@e7c95ee`.
|
||||
- larger PVC smoke: done in PR #28.
|
||||
- 60s fio: QA PASS on M02.
|
||||
- larger PVC,
|
||||
- 60s fio,
|
||||
- daemon logs and iSCSI state captured,
|
||||
- no K8s residue.
|
||||
- compare against V2 remaining coverage:
|
||||
- status: active.
|
||||
- review whether PR #26 fully covers V2 `qa_rxtx_test.go` and
|
||||
`large_write_mem_test.go` intent.
|
||||
- add missing tests only if the mapping is incomplete.
|
||||
|
||||
- Close bar:
|
||||
- `go test ./core/frontend/iscsi -count=1` green,
|
||||
- OS initiator repeat harness green on M02,
|
||||
- K8s larger PVC or fio smoke green,
|
||||
- no session leaks,
|
||||
- no unbounded buffer or memory behavior.
|
||||
|
||||
- #QA assignment:
|
||||
- `internal/docs/qa-assignments/iscsi-p2-p3-lab-validation.md`.
|
||||
- status: QA green.
|
||||
|
||||
## Milestone: iSCSI-P3 Product-Backed Stability
|
||||
|
||||
- Goal:
|
||||
- prove the protocol path works with real `blockvolume`, WAL, CSI, and K8s
|
||||
behavior, not only protocol fakes.
|
||||
|
||||
- Tasks:
|
||||
- status: done in PR #41.
|
||||
- sustained write/read through mounted filesystem,
|
||||
- `SYNCHRONIZE_CACHE` pressure,
|
||||
- multiple sessions sharing a volume if supported,
|
||||
- reconnect after logout/login,
|
||||
- #QA repeated attach/detach loop,
|
||||
- script prepared: `scripts/run-k8s-attach-detach-loop.sh`,
|
||||
- TestOps scenario prepared: `iscsi-p3-attach-detach-loop`,
|
||||
- app writer pod replaced by reader pod on the same PVC,
|
||||
- blockvolume restart and reattach once durable state is ready.
|
||||
|
||||
- Close bar:
|
||||
- checksum passes through pod path,
|
||||
- no session errors,
|
||||
- cleanup leaves no iSCSI or K8s residue,
|
||||
- product logs are enough to diagnose failures.
|
||||
|
||||
- QA/tooling:
|
||||
- repeated attach/detach script exists:
|
||||
`scripts/run-k8s-attach-detach-loop.sh`.
|
||||
- TestOps registry entry exists:
|
||||
`internal/testops/registry/iscsi-p3-attach-detach-loop.json`.
|
||||
- default loop count comes from `SW_BLOCK_ATTACH_DETACH_ITERATIONS`.
|
||||
- #QA status: PASS on M02, 3 iterations.
|
||||
|
||||
## Recently Closed Milestone: iSCSI-P4 CHAP / Access Control
|
||||
|
||||
- Goal:
|
||||
- reach V2-level iSCSI auth behavior before any security-facing claim.
|
||||
|
||||
- Tasks:
|
||||
- status: done in PR #41.
|
||||
- target-side CHAP login negotiation:
|
||||
- status: done in PR #41.
|
||||
- direct LoginOp is rejected when CHAP is required,
|
||||
- `AuthMethod=None` is rejected when CHAP is required,
|
||||
- target emits CHAP MD5 challenge,
|
||||
- correct username/response advances to LoginOp,
|
||||
- wrong response fails closed,
|
||||
- missing `CHAP_R` fails closed.
|
||||
- `cmd/blockvolume` opt-in flags:
|
||||
- status: done in PR #41.
|
||||
- `--iscsi-chap-username`,
|
||||
- `--iscsi-chap-secret`,
|
||||
- flags require `--iscsi-listen`,
|
||||
- username and secret must be set together.
|
||||
- OS initiator CHAP smoke script:
|
||||
- status: QA green.
|
||||
- configure `iscsiadm` node auth before login,
|
||||
- prove correct secret succeeds and wrong secret fails without residue.
|
||||
- Kubernetes / CSI Secret integration:
|
||||
- status: QA green on M02 at `9a1fe07`.
|
||||
- CSI node consumes CHAP credentials from `NodeStageVolumeRequest.Secrets`,
|
||||
- controller publish path must not copy CHAP secrets into `publish_context`,
|
||||
- node configures `iscsiadm` CHAP settings after discovery and before login.
|
||||
- launcher can render target-side CHAP env vars from a Kubernetes Secret,
|
||||
- alpha runner can create the Secret and inject StorageClass
|
||||
node-stage secret refs.
|
||||
- replayed challenge rejected if supported by the protocol path,
|
||||
|
||||
- Close bar:
|
||||
- unauthenticated access fails when CHAP is required,
|
||||
- authenticated access succeeds,
|
||||
- failed auth leaves no partial session/device state.
|
||||
|
||||
- QA/tooling:
|
||||
- #QA assignment:
|
||||
`internal/docs/qa-assignments/iscsi-p4-chap-lab-validation.md`.
|
||||
- #QA assignment:
|
||||
`internal/docs/qa-assignments/iscsi-p4-k8s-chap-validation.md`.
|
||||
- #QA status:
|
||||
- K8s CHAP dynamic PVC PASS on M02.
|
||||
- default non-CHAP regression PASS on M02.
|
||||
- V2 CHAP tests are the reference coverage inventory.
|
||||
|
||||
## Recently Closed Milestone: iSCSI-P5 CSI Node Lifecycle
|
||||
|
||||
- Goal:
|
||||
- make kubelet retry/restart behavior safe enough for real clusters.
|
||||
|
||||
- Tasks:
|
||||
- status: QA green on `iscsi/csi-node-lifecycle@4ee35c0`.
|
||||
- local CSI node lifecycle guards:
|
||||
- status: done in PR #41.
|
||||
- NodeStage idempotency,
|
||||
- mounted staging path must belong to the same volume,
|
||||
- mounted staging path for another volume fails closed.
|
||||
- NodeUnstage idempotency,
|
||||
- unmounted staging path still logs out and removes local state.
|
||||
- login failure cleanup,
|
||||
- login failure does not record staged state.
|
||||
- mkfs failure cleanup,
|
||||
- already covered: successful login is logged out when mount fails.
|
||||
- stale session detection,
|
||||
- existing iSCSI login without staged volume identity fails closed,
|
||||
- plugin restart may reuse an existing login only when `.volume` matches.
|
||||
- plugin restart fallback,
|
||||
- existing transport-file fallback covers unstage after restart.
|
||||
- NodeStage restart identity is covered by `.volume`.
|
||||
- repeated stage/unstage,
|
||||
- local 3-cycle stage/unstage test leaves no staged state,
|
||||
`.volume`, or `.transport`.
|
||||
- wrong volume at staging path fails closed.
|
||||
- #QA CSI node restart while PVC remains,
|
||||
- script prepared: `scripts/run-k8s-csi-node-restart.sh`,
|
||||
- TestOps scenario prepared: `iscsi-p5-csi-node-restart`,
|
||||
- assignment: `internal/docs/qa-assignments/iscsi-p5-csi-node-lifecycle-validation.md`,
|
||||
- status: QA PASS on M02.
|
||||
|
||||
- Close bar:
|
||||
- kubelet retries do not wedge the node plugin,
|
||||
- failed attach leaves no leaked device or session,
|
||||
- repeated create/delete works without manual host cleanup.
|
||||
|
||||
- QA/tooling:
|
||||
- #QA status: PASS on M02.
|
||||
- manual kubelet poking is allowed only for first reproduction.
|
||||
|
||||
## Recently Closed Milestone: iSCSI-P6 ALUA / MPIO / Mounted Failover
|
||||
|
||||
- Goal:
|
||||
- make mounted-volume failover a real frontend behavior instead of only a
|
||||
reconnect story.
|
||||
|
||||
- Tasks:
|
||||
- status: completed in PR #42 scope; QA green on
|
||||
`iscsi/csi-node-lifecycle@d1025f1`.
|
||||
- #design(iscsi-p6-alua-mpio-design) ALUA/MPIO policy and protocol shape:
|
||||
- owner: dev.
|
||||
- output: `internal/docs/ref/iscsi-p6-alua-mpio-design.md`.
|
||||
- must be reviewed before changing protocol behavior.
|
||||
- #design(iscsi-p6-qa-assignment) real initiator validation shape:
|
||||
- owner: dev.
|
||||
- output: `internal/docs/qa-assignments/iscsi-p6-alua-mpio-lab-validation.md`.
|
||||
- must define the lab command, non-claims, and pass/fail criteria.
|
||||
- V2 coverage alignment:
|
||||
- status: design inventory added.
|
||||
- do not copy V2 role/state ownership,
|
||||
- do match V2 externally visible ALUA/MPIO protocol coverage unless V3
|
||||
explicitly rejects a behavior.
|
||||
- ALUA state model:
|
||||
- status: local protocol slice done on `iscsi/csi-node-lifecycle`.
|
||||
- active optimized,
|
||||
- active non-optimized,
|
||||
- standby,
|
||||
- unavailable,
|
||||
- transitioning.
|
||||
- standby command policy:
|
||||
- status: local protocol slice done; tightened by PR #42 review fix.
|
||||
- metadata/path probing allowed,
|
||||
- data READ, WRITE, and SYNCHRONIZE_CACHE fail closed on non-active
|
||||
paths.
|
||||
- standard INQUIRY TPGS discipline:
|
||||
- status: local protocol slice done.
|
||||
- TPGS stays off until REPORT TARGET PORT GROUPS and ALUA VPD identity
|
||||
are implemented,
|
||||
- when enabled, advertise implicit ALUA only unless explicit transitions
|
||||
are implemented.
|
||||
- REPORT TARGET PORT GROUPS:
|
||||
- status: local protocol slice done.
|
||||
- no-provider rejection,
|
||||
- short allocation truncation,
|
||||
- five-state reporting.
|
||||
- VPD 0x83 target-port identity:
|
||||
- status: local protocol slice done.
|
||||
- NAA stable per volume,
|
||||
- target port group and relative target port distinguish paths,
|
||||
- short allocation length and no-ALUA branches tested.
|
||||
- VPD 0x00 remains advertised-pages-equal-implemented-pages:
|
||||
- status: local protocol slice done.
|
||||
- state change while I/O is in flight:
|
||||
- status: local protocol state-change test done.
|
||||
- concurrent REPORT TARGET PORT GROUPS and standby write reject tests:
|
||||
- status: done in PR #43.
|
||||
- frontend state provider wiring:
|
||||
- status: local P6-C slice done on `iscsi/csi-node-lifecycle`.
|
||||
- connect ALUA provider to current V3 frontend facts without importing
|
||||
authority or placement.
|
||||
- mapping:
|
||||
- frontend Healthy => active optimized,
|
||||
- locally healthy but superseded/non-writable => standby,
|
||||
- recovering => transitioning,
|
||||
- idle supporting path => standby for metadata/path probing,
|
||||
- degraded/identity mismatch => unavailable.
|
||||
- path identity:
|
||||
- NAA is stable per volume,
|
||||
- target port group and relative target port are stable per
|
||||
volume/replica path.
|
||||
- multipath initiator test:
|
||||
- status: QA green on `iscsi/csi-node-lifecycle@88e9301`.
|
||||
- script: `scripts/run-iscsi-alua-os-smoke.sh`.
|
||||
- script: `scripts/run-iscsi-alua-multipath-smoke.sh`.
|
||||
- assignment: `internal/docs/qa-assignments/iscsi-p6-alua-mpio-lab-validation.md`.
|
||||
- current claim: one active path reports ALUA through real Linux `sg_inq`
|
||||
and `sg_rtpg`, then completes mkfs/mount/checksum/logout.
|
||||
- current two-path claim: two iSCSI portals for one volume can be logged
|
||||
in by Linux, report active/standby ALUA state, reject standby WRITE,
|
||||
and appear as one logical device in `multipath -ll`.
|
||||
- standby/probe session prerequisite: local P6-D slice implemented.
|
||||
Non-active ALUA paths may use a borrowed metadata backend after
|
||||
`Provider.Open` returns not-ready, so Linux can probe INQUIRY/VPD/RTPG
|
||||
without allowing data I/O.
|
||||
- #QA Test 1B PASS on M02:
|
||||
- artifact:
|
||||
`/mnt/smb/work/share/g15d-k8s/20260506T093732Z-iscsi-p6-alua-mpath-fix`.
|
||||
- evidence: two iSCSI paths, common NAA, distinct TPG/RTP, r1
|
||||
active/optimized, r2 standby, standby WRITE rejected, `multipath -ll`
|
||||
grouped both paths under `mpatha`.
|
||||
- non-claim: mounted workload failover still needs P6-E.
|
||||
- primary failover while mounted:
|
||||
- status: QA green on `iscsi/csi-node-lifecycle@d1025f1`.
|
||||
- script: `scripts/run-iscsi-alua-mounted-failover-smoke.sh`.
|
||||
- assignment: `internal/docs/qa-assignments/iscsi-p6-alua-mpio-lab-validation.md`.
|
||||
- verified claim: mounted Linux multipath device can read a
|
||||
pre-failover checksum and write a post-failover checksum after r1 is
|
||||
killed and r2 reaches `Healthy=true` at a newer epoch.
|
||||
- #QA Test 2 PASS on M02:
|
||||
- artifact:
|
||||
`/mnt/smb/work/share/g15d-k8s/20260506T094503Z-iscsi-p6-mounted-failover`.
|
||||
- evidence: `/dev/mapper/mpatha` mounted, pre-failover checksum read
|
||||
after failover, post-failover checksum written and verified, r2
|
||||
promoted to `Epoch=2`, old r1 gate-rejected stale writes/syncs, no
|
||||
active sessions or multipath residue after cleanup.
|
||||
- old primary cannot serve stale successful I/O:
|
||||
- status: QA green for killed-old-primary path on `d1025f1`.
|
||||
- old-primary-return proof remains future soak/fault coverage, not required
|
||||
for P6 alpha close.
|
||||
|
||||
- Close bar:
|
||||
- real initiator sees correct ALUA/MPIO behavior,
|
||||
- mounted workload survives or fails/reconnects according to documented
|
||||
policy,
|
||||
- byte-equal data proof after failover,
|
||||
- no stale-primary success.
|
||||
|
||||
- QA/tooling:
|
||||
- #QA active-path ALUA OS script is ready.
|
||||
- #QA two-path multipath script is green on M02.
|
||||
- #QA mounted multipath failover script is green on M02.
|
||||
- do not rely on in-process protocol tests only.
|
||||
|
||||
## Recently Closed Milestone: iSCSI-P7 Performance And Backend Matrix
|
||||
|
||||
- Goal:
|
||||
- make performance experiments comparable without turning early numbers into
|
||||
product claims.
|
||||
|
||||
- Tasks:
|
||||
- status: QA green on `iscsi/p7-performance-matrix-clean@6826139`.
|
||||
- walstore baseline fio,
|
||||
- smartwal fio behind explicit flag,
|
||||
- Linux iSCSI loopback matrix,
|
||||
- record fio summary and cleanup state.
|
||||
- deferred:
|
||||
- RoCE / 10.0.0.x lab path if available,
|
||||
- 1GbE vs 25GbE comparison,
|
||||
- pgbench scenario,
|
||||
- CPU, memory, latency, and bandwidth sweep.
|
||||
- script: `scripts/run-iscsi-backend-fio-matrix.sh`.
|
||||
- assignment:
|
||||
`internal/docs/qa-assignments/iscsi-p7-backend-fio-matrix-validation.md`.
|
||||
- #QA PASS on M02:
|
||||
- artifact:
|
||||
`/mnt/smb/work/share/g15d-k8s/20260506T215457Z-iscsi-p7-backend-fio`.
|
||||
- fio profile: 4 KiB randrw, psync, iodepth=1, size=128m,
|
||||
runtime=60s.
|
||||
- walstore: PASS, about 124 read IOPS / 124 write IOPS.
|
||||
- smartwal: PASS, about 124 read IOPS / 125 write IOPS.
|
||||
- cleanup: no active iSCSI sessions and no blockmaster/blockvolume
|
||||
processes.
|
||||
- non-claim: single-host loopback only, not a product performance claim.
|
||||
|
||||
- Close bar:
|
||||
- same test runner scenario can compare backends,
|
||||
- no silent backend switch,
|
||||
- results are labelled experimental until SLOs exist.
|
||||
|
||||
- QA/tooling:
|
||||
- #QA run the backend matrix on M02 first.
|
||||
- #QA if RoCE is available, rerun with explicit 10.0.0.x portal path and
|
||||
record the network path in the report.
|
||||
- avoid manual benchmark notes without a repeatable scenario.
|
||||
|
||||
## Recently Closed Milestone: iSCSI-P8 Compatibility And Soak
|
||||
|
||||
- Goal:
|
||||
- turn the current alpha iSCSI feature set into repeatable compatibility and
|
||||
soak evidence without making performance claims.
|
||||
- keep frontend protocol behavior stable while K8s and backend tests get
|
||||
longer and more varied.
|
||||
|
||||
- Tasks:
|
||||
- local ALUA concurrency guard:
|
||||
- status: done on `iscsi/frontend-hardening`.
|
||||
- cover concurrent REPORT TARGET PORT GROUPS while data READ/WRITE on a
|
||||
standby path is rejected.
|
||||
- closes the P6 pending item for concurrent RTPG plus standby reject.
|
||||
- OS initiator soak:
|
||||
- #QA green on `iscsi/frontend-hardening@38ff850`.
|
||||
- repeat `run-iscsi-os-smoke.sh` with fio for a longer runtime.
|
||||
- record session errors, fio summary, goroutine/process cleanup, and
|
||||
final `iscsiadm -m session`.
|
||||
- artifact:
|
||||
`/mnt/smb/work/share/g15d-k8s/20260506T223240Z-iscsi-p8-soak-38ff850`.
|
||||
- evidence:
|
||||
- 2 iterations,
|
||||
- 120s fio per iteration,
|
||||
- `iscsiadm mkfs mount write/read logout` PASS,
|
||||
- no active sessions after final cleanup.
|
||||
- K8s CSI soak:
|
||||
- #QA green on `iscsi/frontend-hardening@38ff850`.
|
||||
- repeat attach/detach and fio paths with explicit iteration/runtime
|
||||
values.
|
||||
- record whether launcher owner-reference cleanup remains clean.
|
||||
- evidence:
|
||||
- `[alpha-fio] PASS`,
|
||||
- `[attach-loop] PASS: 3 attach/detach app PVC cycles completed`,
|
||||
- no sw-block PVC or deployment residue.
|
||||
- compatibility matrix:
|
||||
- #QA green for M02.
|
||||
- document exact host distro, kernel, open-iscsi version, fio version,
|
||||
and sg3-utils/multipath versions when used.
|
||||
- add more hosts only when the first soak is repeatable.
|
||||
|
||||
- Close bar:
|
||||
- local protocol concurrency tests green,
|
||||
- one OS fio soak green,
|
||||
- one K8s attach/detach or fio soak green,
|
||||
- all runs leave no active sessions, mounts, multipath maps, or K8s residue.
|
||||
|
||||
- QA/tooling:
|
||||
- prefer wrappers with env knobs over manual command sequences.
|
||||
- label all runtime/throughput numbers as soak evidence, not benchmark
|
||||
claims.
|
||||
- #QA assignment:
|
||||
`internal/docs/qa-assignments/iscsi-p8-compat-soak-validation.md`.
|
||||
- #QA status:
|
||||
- PASS on M02 at `38ff850`.
|
||||
- final line:
|
||||
`[iscsi-soak] PASS: compatibility soak completed`.
|
||||
- non-claim:
|
||||
compatibility probe only, not a long-running soak or performance claim.
|
||||
|
||||
## Recently Closed Milestone: TestOps For Frontend Lab Gates
|
||||
|
||||
- Goal:
|
||||
- reduce false failures from manual multi-step lab runs by moving P8-style
|
||||
gates into one TestOps entry point.
|
||||
- keep existing shell scripts as the execution backend first; do not rewrite
|
||||
all harness logic before the gate is stable.
|
||||
|
||||
- Tasks:
|
||||
- #QA package P8 compatibility soak as a TestOps scenario:
|
||||
- status: done; wrapper proven green in standalone runner and carried back
|
||||
into the product planning flow.
|
||||
- must record commit SHA, command, artifact root, step result, final line,
|
||||
and cleanup status in a single result file.
|
||||
- initial scenario may call `scripts/run-iscsi-compat-soak.sh`.
|
||||
- pin alpha image build/import before K8s frontend gates:
|
||||
- status: QA green at `c3a6e28`; workload composition hook active in this
|
||||
branch.
|
||||
- script: `scripts/build-alpha-images.sh`.
|
||||
- TestOps scenario: `alpha-images-pin-build`.
|
||||
- contract:
|
||||
- build `sw-block:local` and `sw-block-csi:local`,
|
||||
- optionally import both images into k3s containerd with
|
||||
`SW_BLOCK_IMPORT_K3S=1`,
|
||||
- record Docker image IDs,
|
||||
- record `blockmaster`, `blockvolume`, and `blockcsi` `--version`
|
||||
output,
|
||||
- downstream K8s harnesses may consume the build output with
|
||||
`SW_BLOCK_ALPHA_IMAGES_ENV=/path/to/pin-build/alpha-images.env`,
|
||||
- fail before protocol smoke tests if build/import/version capture fails.
|
||||
- composed TestOps workload scenarios:
|
||||
- status: QA green at `cf9183a`.
|
||||
- `nvme-p5-csi-dynamic`,
|
||||
- `nvme-p5-default-iscsi-regression`.
|
||||
- developer-owned P5 suite:
|
||||
- status: QA green at `67592f2`.
|
||||
- `scripts/testops-run-nvme-p5-suite.sh`,
|
||||
- runs pin-build, then both P5 workload scenarios,
|
||||
- passes `alpha-images.env` forward mechanically,
|
||||
- writes one suite-level `result.json`.
|
||||
- reason:
|
||||
- NVMe-P5 showed that stale k3s images can mimic product protocol bugs.
|
||||
The build/import step must be one reviewed gate, not manual lab memory.
|
||||
- platform extraction target:
|
||||
- status: seed shape extracted into standalone runner and native suite
|
||||
flow; continue hardening in runner repo.
|
||||
- port this V3 reference implementation into reusable runner primitives:
|
||||
- `testops_pin_build` for build/import/version/image provenance,
|
||||
- `consume_pin` for passing pinned outputs between phases,
|
||||
- `assert_revision_matches` for component/runtime SHA checks,
|
||||
- suite linkage that passes prior phase outputs without ad-hoc env-file
|
||||
conventions.
|
||||
- reference hardware evidence:
|
||||
- `alpha-images-pin-build` PASS at `cf9183a`,
|
||||
- `nvme-p5-csi-dynamic` PASS at `cf9183a`,
|
||||
- `nvme-p5-default-iscsi-regression` PASS at `cf9183a`.
|
||||
- runner-native protocol release suite:
|
||||
- status: QA green on M02 at product `033028e` and runner `3c1b660`.
|
||||
- suite: `testops/suites/protocol-release-gate.yaml`.
|
||||
- command shape:
|
||||
`swblock suite --results-dir <root> --env product_root=<remote-root>
|
||||
--env ssh_key=<key> testops/suites/protocol-release-gate.yaml`.
|
||||
- children:
|
||||
- `iscsi-p6-alua-failover-chain`,
|
||||
- `nvme-p4-multipath-failover-chain`,
|
||||
- `nvme-p5-csi-protocol-chain`,
|
||||
- `iscsi-p8-compat-soak-chain`.
|
||||
- validation:
|
||||
`swblock validate-bundle --profile protocol-release-gate <suite-run>`.
|
||||
- define the minimal result contract:
|
||||
- scenario name,
|
||||
- repository SHA,
|
||||
- host,
|
||||
- step table,
|
||||
- artifact paths,
|
||||
- cleanup checks.
|
||||
- keep product development unblocked:
|
||||
- TestOps work should not change iSCSI protocol code.
|
||||
- product branches can continue using scripts until TestOps reaches parity.
|
||||
|
||||
- Close bar:
|
||||
- one command runs the P8 full lab gate,
|
||||
- old-commit/stale-binary ambiguity is impossible or explicitly reported,
|
||||
- result file is enough for review without reading raw terminal output.
|
||||
- one runner-native command runs the full iSCSI/NVMe/CSI/soak release gate,
|
||||
and `validate-bundle --profile protocol-release-gate` accepts the bundle.
|
||||
|
||||
- QA/tooling:
|
||||
- Dev owns the core test content and uses TestOps as the primary dev loop.
|
||||
- QA may run the same scenarios, add lab automation, and improve collection,
|
||||
but should not be the only path that can execute a gate end-to-end.
|
||||
- prefer small TestOps wrapper over a wholesale scenario DSL rewrite.
|
||||
|
||||
## Recently Closed Milestone: NVMe-oF / ANA Parity Planning
|
||||
|
||||
- Goal:
|
||||
- bring NVMe-oF up to the same product discipline as the now-green iSCSI
|
||||
frontend.
|
||||
- treat V2 NVMe behavior as the feature floor, not code to copy blindly.
|
||||
- understand the old high-performance path before touching protocol code.
|
||||
|
||||
- Reference:
|
||||
- `internal/docs/ref/nvme-ana-parity-plan.md`.
|
||||
- `internal/docs/ref/nvme-v2-coverage-gap-audit.md`.
|
||||
|
||||
- Tasks:
|
||||
- NVMe-P0 audit:
|
||||
- status: initial audit done; keep updating as code lands.
|
||||
- compare V2 NVMe implementation and scenarios against current V3.
|
||||
- classify every visible feature as present, missing, intentionally
|
||||
deferred, or rejected with product reason.
|
||||
- specifically answer whether the remembered "control API carries data"
|
||||
path was standard NVMe/TCP in-capsule data or a custom V2 shortcut.
|
||||
- initial answer: standard in-capsule data; no custom V2 vendor/admin data
|
||||
command found in the NVMe package.
|
||||
- NVMe-P1 OS kernel baseline:
|
||||
- status: QA green on M02.
|
||||
- script: `scripts/run-nvme-os-smoke.sh`.
|
||||
- #QA assignment:
|
||||
`internal/docs/qa-assignments/nvme-p1-os-smoke-validation.md`.
|
||||
- #QA evidence:
|
||||
- basic OS path PASS on M02,
|
||||
- 60s fio PASS on M02,
|
||||
- loopback 4 KiB fio used inline writes only,
|
||||
- no test NQN or process residue after cleanup.
|
||||
- build a repeatable `nvme connect -> mkfs -> mount -> fio/checksum ->
|
||||
disconnect` script.
|
||||
- dynamic ports only.
|
||||
- no stale sessions or target processes.
|
||||
- NVMe-P2 in-capsule / R2T performance path:
|
||||
- status: QA green on M02 with host-specific classification.
|
||||
- target now reports transport counters in `blockvolume.log` on close:
|
||||
inline writes, R2T writes, H2C/C2H PDU counts, and read/write/flush
|
||||
command counts.
|
||||
- P1 observation: Linux `fio --bs=4k` used inline writes exclusively on
|
||||
M02 (`r2t_writes=0`).
|
||||
- P2 observation: Linux kernel 6.17.0-19 on M02 did not trigger R2T even
|
||||
for `fio --bs=128k` or `dd bs=1M`; all writes were fragmented into
|
||||
inline/in-capsule transfers.
|
||||
- #QA assignment:
|
||||
`internal/docs/qa-assignments/nvme-p2-inline-r2t-validation.md`.
|
||||
- prove whether Linux uses inline data for small writes.
|
||||
- run 128 KiB+ profiles to force or classify the R2T path.
|
||||
- add visible counters or artifacts for inline vs R2T writes.
|
||||
- follow-up:
|
||||
- R2T requires a different initiator/profile or target-side test knob;
|
||||
current M02 kernel behavior is not a product failure.
|
||||
- compare iSCSI and NVMe only under labelled network/backend conditions.
|
||||
- NVMe-P3 ANA identity and log page:
|
||||
- status: QA green on M02 at `d330e89`.
|
||||
- provider: `core/frontend/nvme.ANAProvider`.
|
||||
- product wiring: `cmd/blockvolume` derives ANA state from the same
|
||||
frontend projection used by iSCSI ALUA.
|
||||
- log page: admin Get Log Page `0x0c` returns one ANA group when a
|
||||
provider is configured.
|
||||
- mapping:
|
||||
- frontend Healthy => optimized,
|
||||
- superseded healthy / idle supporting path => non-optimized,
|
||||
- recovering => ANA change,
|
||||
- degraded / identity mismatch => inaccessible.
|
||||
- guard: Identify Controller / Namespace ANA fields remain zero without a
|
||||
provider.
|
||||
- P3-C behavior: with a provider, Identify Controller advertises ANA,
|
||||
Identify Namespace carries the provider's ANA group, and Get Log Page ANA
|
||||
reports the same group/state.
|
||||
- OAES ANA Change Notice remains off; no async event producer exists yet.
|
||||
- #QA assignment:
|
||||
`internal/docs/qa-assignments/nvme-p3-ana-log-validation.md`.
|
||||
- #QA evidence:
|
||||
- ANA log `group_id=1`, `state=0x01`, `nsid=1`,
|
||||
- Identify Controller `cmic=0x8`, `anagrpmax=1`, `nanagrpid=1`,
|
||||
- Identify Namespace `anagrpid=1`,
|
||||
- no `nvme_parse_ana_log` kernel warning,
|
||||
- mkfs/mount/checksum PASS after ANA advertisement is enabled.
|
||||
- NVMe-P4 multipath and mounted failover:
|
||||
- status: fully QA green on M02 at `e1e0e0c`.
|
||||
- #design:
|
||||
`internal/docs/ref/nvme-p4-multipath-failover-design.md`.
|
||||
- #QA assignment:
|
||||
`internal/docs/qa-assignments/nvme-p4-multipath-lab-validation.md`.
|
||||
- reach the iSCSI P6 bar for NVMe multipath.
|
||||
- Test 1/2 discovery and native grouping:
|
||||
- status: QA green on M02 at `a5ef1a5`.
|
||||
- script: `scripts/run-nvme-multipath-smoke.sh`.
|
||||
- evidence:
|
||||
- run ID `20260507T161800Z-test`,
|
||||
- two NVMe/TCP paths registered immediately,
|
||||
- native Linux multipath exposed one namespace device,
|
||||
- ANA log `group_id=1`, `state=0x01 optimized`, `nsid=1`,
|
||||
- identity `nguid=24634c35194743419febbb18e06446be`,
|
||||
`eui64=24634c3519474341`, `anagrpid=1`,
|
||||
- final line:
|
||||
`[nvme-mpath] PASS: two NVMe/TCP paths expose one ANA-aware namespace`.
|
||||
- decision: single ANA group is sufficient for the current two-path
|
||||
native multipath identity model.
|
||||
- mounted failover:
|
||||
- status: QA green on M02 at `e1e0e0c`.
|
||||
- script: `scripts/run-nvme-mounted-failover-smoke.sh`.
|
||||
- local guard:
|
||||
- metadata-only standby NVMe path continues to reject I/O before
|
||||
promotion,
|
||||
- after ANA state becomes optimized, the same session can pass I/O to
|
||||
the backend.
|
||||
- #QA evidence:
|
||||
- run ID `20260507T170000Z-nvme-p4-mounted-failover`,
|
||||
- two TCP paths registered and Linux native multipath merged them to
|
||||
`/dev/nvme1n1`,
|
||||
- mounted ext4 workload survived active r1 kill,
|
||||
- r2 promoted to `Epoch=2`, `AuthorityRole=primary`,
|
||||
`FrontendPrimaryReady=true`,
|
||||
- `pre.bin` checksum remained OK after failover,
|
||||
- `post.bin` write/read/verify succeeded after failover,
|
||||
- cleanup left no test NQN and no blockmaster/blockvolume process.
|
||||
- NVMe-P5 CSI integration:
|
||||
- status: QA green on `frontend/nvme-ana-parity-plan@8e0a28f`.
|
||||
- latest QA:
|
||||
- red at `622fae7`: StorageClass rendered `protocol: nvme`, but
|
||||
lifecycle intent had no protocol and generated blockvolume still used
|
||||
iSCSI args.
|
||||
- red at `a1d5201`: live StorageClass carried both protocol keys, but
|
||||
persisted lifecycle JSON still had no `protocol`; current source has
|
||||
protocol on CSI/RPC/lifecycle, so the harness now gates component
|
||||
`--version` output to catch stale K8s images before protocol checks.
|
||||
- green at `69a1d20`: Test 1 NVMe dynamic PVC passed after rebuilt and
|
||||
k3s-imported images; lifecycle persisted `protocol: "nvme"` and
|
||||
launcher emitted NVMe args only.
|
||||
- green at `8e0a28f`: Test 2 default iSCSI regression passed; all three
|
||||
version gates matched HEAD, lifecycle persisted `protocol: "iscsi"`,
|
||||
generated manifest used iSCSI args only, and cleanup left no iSCSI or
|
||||
NVMe residue.
|
||||
- current fix: prefer product-scoped
|
||||
`sw-block.seaweedfs.com/protocol`, keep `protocol` as compatibility,
|
||||
delete stale cluster-scoped StorageClass before apply, capture
|
||||
`storageclass.live.yaml`, and record `--version` for blockmaster,
|
||||
blockcsi, and generated blockvolume before judging launcher output.
|
||||
- allow StorageClass protocol selection without changing the app.
|
||||
- default StorageClass path stays iSCSI.
|
||||
- `parameters.sw-block.seaweedfs.com/protocol: nvme` selects NVMe target
|
||||
facts end-to-end:
|
||||
- CSI CreateVolume records protocol in lifecycle intent,
|
||||
- master lifecycle RPC carries protocol,
|
||||
- launcher renders `blockvolume` with `--nvme-listen`,
|
||||
`--nvme-subsysnqn`, and `--nvme-ns`,
|
||||
- CSI ControllerPublish returns `protocol=nvme`, `nvmeAddr`, and `nqn`,
|
||||
- CSI NodeStage uses `nvme connect`, formats/mounts the NVMe namespace,
|
||||
and disconnects by NQN on NodeUnstage.
|
||||
- K8s harness:
|
||||
- script: `scripts/run-k8s-alpha-nvme.sh`,
|
||||
- underlying env knob: `SW_BLOCK_FRONTEND_PROTOCOL=nvme`,
|
||||
- dynamic PVC/app manifest remains unchanged except injected
|
||||
StorageClass parameter.
|
||||
- #QA assignment:
|
||||
`internal/docs/qa-assignments/nvme-p5-csi-protocol-selection-validation.md`.
|
||||
- platform lesson:
|
||||
- stale k3s images cost multiple lab rounds; TestOps pin-build/import
|
||||
should make build, k3s image import, digest capture, and component
|
||||
version verification one required step for future release gates.
|
||||
- NVMe-P6 RoCE / network performance matrix:
|
||||
- status: deferred to future network/performance plan.
|
||||
- correctness gates are green; RoCE is no longer part of protocol
|
||||
readiness closure.
|
||||
|
||||
- Close bar for the planning slice:
|
||||
- audit table exists,
|
||||
- next code task has a red test or lab reproduction,
|
||||
- no ANA or performance claim is enabled before matching host evidence.
|
||||
|
||||
- QA/tooling:
|
||||
- protocol assignments remain as historical evidence under
|
||||
`internal/docs/qa-assignments/`.
|
||||
- future protocol changes should update the runner-native release gate rather
|
||||
than adding manual-only QA instructions.
|
||||
|
||||
## Current Active Milestone: V2 Parity And Hardening Backlog
|
||||
|
||||
- Goal:
|
||||
- keep iSCSI/NVMe protocol readiness protected by the release gate while
|
||||
moving active development to remaining V2 parity, product hardening, and
|
||||
TestOps platform work.
|
||||
|
||||
- Work buckets:
|
||||
- V2 parity audit:
|
||||
- compare the old `weed/storage/blockvol` scenario corpus against current
|
||||
V3 capabilities,
|
||||
- classify each gap as already covered by the release gate, still missing,
|
||||
intentionally deferred, or rejected with product reason.
|
||||
- availability/recovery hardening:
|
||||
- replica return and reintegration,
|
||||
- RF2/RF3 rebuild and failover matrices,
|
||||
- WAL retention and flow-control pressure,
|
||||
- longer soak and failure-injection runs.
|
||||
- Kubernetes/operator hardening:
|
||||
- durable blockvolume state beyond throwaway alpha defaults,
|
||||
- operator/controller lifecycle,
|
||||
- multi-node attach and non-loopback frontend addressing.
|
||||
- TestOps platform:
|
||||
- keep product-owned scenarios in this repo,
|
||||
- move repeated primitives into the standalone runner,
|
||||
- use native suite/run-control/validate-bundle for release evidence,
|
||||
- explore controller/agent mode separately from the open SSH runner path.
|
||||
|
||||
- Close bar for the next planning slice:
|
||||
- a V2 parity matrix exists with explicit disposition per feature/scenario,
|
||||
- at least one non-protocol hardening gate is runner-native and repeatable,
|
||||
- protocol release gate remains green after unrelated hardening changes.
|
||||
|
||||
## Cross-Cutting Technical Rules
|
||||
|
||||
- Protocol code must not decide authority.
|
||||
- Protocol code must not decide replica readiness.
|
||||
- CSI must consume frontend facts, not infer storage truth.
|
||||
- Placement intent is not authority.
|
||||
- Authority movement is not data continuity.
|
||||
- Best-effort ACK is not full durability.
|
||||
- If V2 behavior is copied, copy the test expectation first and adapt the code
|
||||
to V3 boundaries.
|
||||
|
||||
## QA / TestOps Rules
|
||||
|
||||
- Prefer scripts or TestOps scenarios over manual command sequences.
|
||||
- Manual testing is allowed for first reproduction, but convert the result into
|
||||
a repeatable script or scenario.
|
||||
- Keep default `go test` focused on unit/component coverage.
|
||||
- Local binary wiring tests that build product binaries, spawn
|
||||
`blockmaster`/`blockvolume`, and use loopback protocol clients must use the
|
||||
explicit `subprocess` build tag. These are not m01/m02 lab integration tests.
|
||||
- Linux OS/K8s/lab tests that use `iscsiadm`, `nvme-cli`, kernel initiators,
|
||||
mounts, `sudo`, or m01/m02 cleanup state belong in runner-native TestOps
|
||||
scenarios, not default `go test` and not the local `subprocess` tag.
|
||||
- When a subprocess or runner integration test fails, first ask whether its
|
||||
assertion can be moved down to a component seam such as authority, engine
|
||||
projection, frontend protocol adapter, lifecycle rendering, or
|
||||
ready-assignment handling. Keep only binary wiring, real OS frontend I/O,
|
||||
process lifecycle, and lab cleanup in the runner layer.
|
||||
- QA report must include:
|
||||
- branch and commit,
|
||||
- command,
|
||||
- lab host,
|
||||
- result,
|
||||
- artifact path,
|
||||
- cleanup state,
|
||||
- exact log line for any failure.
|
||||
|
||||
## PR Cadence
|
||||
|
||||
- Use milestone PRs, not one PR per tiny fix.
|
||||
- Target one or two PRs per day at most.
|
||||
- For the current active milestone, keep parity matrix updates, non-protocol
|
||||
hardening gates, and runner scenario changes grouped by reviewable outcome.
|
||||
- Split OS/K8s harness work only if it becomes too large to review cleanly.
|
||||
|
||||
## Finish Action
|
||||
|
||||
- When a milestone closes, move the finished plan and related references into a
|
||||
dedicated directory, for example `internal/docs/finished/iscsi-p2/`.
|
||||
- Keep `current-plan.md` focused on the next active milestone.
|
||||
-427
@@ -1,427 +0,0 @@
|
||||
# Finished Plan: Phase 20 - Activation / Day-1 Ops MVP
|
||||
|
||||
Status: closed after the v0.2 alpha Day-1 activation PR merged to `main`.
|
||||
The script-based activation path, first-volume loop, read-only report, release
|
||||
note, PM evaluation guide, and user-facing README/tutorial updates are complete.
|
||||
|
||||
Previous closed capability:
|
||||
|
||||
- `finished-plans/phase19_finishedplan_control_plane_observation_ai_readable_ops_mvp.md`
|
||||
- Control-plane observation QA evidence: run `20260517-011004-4b79`.
|
||||
|
||||
## Release Ladder From Here
|
||||
|
||||
- `v0.2-alpha` (this plan): script-based Day-1 activation and first-volume
|
||||
loop. Users can activate the stack, create one PVC, verify writer/reader
|
||||
data, generate a local read-only report, and clean up.
|
||||
- `v0.3-alpha` (next): Helm activation. Convert the supported install path into
|
||||
a Kubernetes-native chart while preserving preflight, first-volume smoke,
|
||||
report generation, and cleanup evidence.
|
||||
- `v0.4-beta-candidate` (after Helm): Operator lifecycle. Add CRDs,
|
||||
Conditions, Events, and day-2 reconciliation for install status, node
|
||||
eligibility, volume lifecycle, recovery observation, and safe cleanup.
|
||||
|
||||
Product guidance: do not jump directly from scripts to operator. Helm is the
|
||||
right next release because it makes installation regular and reviewable without
|
||||
locking us into a CRD/operator lifecycle contract too early. The operator
|
||||
release is more meaningful as a product milestone because it can close the
|
||||
Kubernetes lifecycle loop, but it should build on a charted install contract.
|
||||
|
||||
## Product Question
|
||||
|
||||
Can a new Kubernetes user complete one understandable block-storage activation
|
||||
loop without reading internal docs or SSHing into every node?
|
||||
|
||||
```text
|
||||
preflight
|
||||
-> install
|
||||
-> node readiness
|
||||
-> create PVC
|
||||
-> volume ready
|
||||
-> write/read app
|
||||
-> status/timeline/evidence
|
||||
-> cleanup
|
||||
```
|
||||
|
||||
Expanded product loop:
|
||||
|
||||
```text
|
||||
install Seaweed Block from one documented path
|
||||
-> verify node readiness and blockers
|
||||
-> create one PVC-backed volume through Kubernetes
|
||||
-> run an app write/read check
|
||||
-> inspect read-only CLI/status evidence
|
||||
-> collect product evidence, inventory, logs, and support bundle
|
||||
-> uninstall cleanly
|
||||
```
|
||||
|
||||
This plan is about activation and day-1 operations. It should not add new HA,
|
||||
backup, restore, repair, or mutating admin claims.
|
||||
|
||||
## Core Thesis
|
||||
|
||||
The product is now strong enough in recovery and observation that the next
|
||||
highest-friction gap is the user journey around it. A good block product needs
|
||||
more than a working CSI path: users need to install it, understand whether each
|
||||
node is usable, create volumes, see what happened, and capture evidence when it
|
||||
is not healthy.
|
||||
|
||||
The implementation should reuse the Phase 19 observation surface. Dashboard,
|
||||
CLI, logs, and bundles should all describe the same facts with stable reason
|
||||
codes.
|
||||
|
||||
## Scope
|
||||
|
||||
### D1: Install Loop
|
||||
|
||||
- Keep `scripts/install-k8s-alpha.sh` as the implementation substrate for this
|
||||
phase.
|
||||
- Add a simpler documented wrapper path if needed. This should wrap preflight,
|
||||
local image build/import, install, rollout wait, and summary. It may be a
|
||||
script first; a `sw-block install k8s-alpha` CLI is optional and should not
|
||||
block the first gate.
|
||||
- Dev slice: `scripts/activate-k8s-alpha.sh` is the first wrapper path. It
|
||||
calls `preflight-k8s-alpha.sh`, `build-alpha-images.sh`,
|
||||
`install-k8s-alpha.sh`, applies the alpha StorageClass, captures rollout
|
||||
readiness, and writes `activation-summary.txt`.
|
||||
- Image path split:
|
||||
- `SW_BLOCK_ACTIVATION_IMAGE_MODE=local` (default) builds/imports
|
||||
`sw-block:local` and `sw-block-csi:local` for dev and QA work-tree
|
||||
validation.
|
||||
- `SW_BLOCK_ACTIVATION_IMAGE_MODE=published` skips local build/import,
|
||||
runs GHCR preflight, and installs `ghcr.io/seaweedfs/seaweed-block:alpha`
|
||||
plus `ghcr.io/seaweedfs/seaweed-block-csi:alpha` unless overridden.
|
||||
This is the PM/user-path test surface. Prefer `sha-<commit>` or release
|
||||
tags over mutable `:alpha` for close validation.
|
||||
|
||||
- Add a user-facing install path in README/docs that makes prerequisites,
|
||||
expected components, and verification commands explicit.
|
||||
- Emit a concise install summary:
|
||||
- master ready,
|
||||
- CSI controller ready,
|
||||
- CSI node ready count,
|
||||
- StorageClass present,
|
||||
- selected protocol,
|
||||
- selected ACK profile,
|
||||
- known non-claims.
|
||||
- Dev slice: summary fields are stable key/value lines:
|
||||
`activation_status`, `master_ready_replicas`,
|
||||
`csi_controller_ready_replicas`, `csi_node_ready`,
|
||||
`storageclass_provider`, `protocol`, `ack_profile`, and next status /
|
||||
inventory commands.
|
||||
- Failed install should explain the blocker: missing tool, missing k3s access,
|
||||
image import failure, pod not ready, or node prerequisite mismatch.
|
||||
- QA slice: `testops/scenarios/activation-day1-install-chain.yaml` validates
|
||||
the D1 install-to-ready path.
|
||||
|
||||
### D2: Node Readiness
|
||||
|
||||
- Provide a read-only node readiness view before claiming add-node automation.
|
||||
- A node row should make clear:
|
||||
- Kubernetes node name,
|
||||
- CSI node pod status,
|
||||
- iSCSI / multipath prerequisite status where applicable,
|
||||
- whether the node is eligible for blockvolume placement,
|
||||
- frontend address mode: loopback or non-loopback,
|
||||
- blocker reason if not eligible.
|
||||
- If this phase adds an `add-node` command, it must be conservative: preflight
|
||||
and explain eligibility first; mutating scheduling or rebalance behavior is
|
||||
out of scope unless separately gated.
|
||||
|
||||
### D3: Add-Volume Loop
|
||||
|
||||
- Document the canonical dynamic PVC path as the normal volume creation path.
|
||||
- Provide a minimal user-facing "add volume" path. This can be a documented
|
||||
PVC YAML template first. A CLI helper is optional and, if added, must be a
|
||||
thin generator around Kubernetes PVC creation. It must not bypass PVC/CSI.
|
||||
|
||||
```bash
|
||||
kubectl apply -f examples/kubernetes/basic-app/storageclass-pvc.yaml
|
||||
```
|
||||
|
||||
- The close gate must prove at least two volumes can be created and listed
|
||||
without attribution or port/status collisions.
|
||||
- Add or improve a small command/view that maps:
|
||||
|
||||
```text
|
||||
PVC -> PV -> volume_id -> replicas -> primary -> frontend -> events -> bundle
|
||||
```
|
||||
|
||||
- The user should be able to create one PVC, watch it become ready, and see the
|
||||
same volume appear in CLI/dashboard evidence.
|
||||
- Dev slice: `scripts/run-basic-app-example.sh` runs the canonical
|
||||
`examples/kubernetes/basic-app` PVC/writer/reader loop, collects
|
||||
`sw-block ops cluster` and `sw-block ops inventory` evidence, and writes
|
||||
`first-volume-summary.txt`.
|
||||
- QA slice: `testops/scenarios/activation-day1-first-volume-chain.yaml`
|
||||
validates the published-image Day-1 first-volume path.
|
||||
|
||||
### D4: Read-Only Status / Dashboard View
|
||||
|
||||
- Dashboard/status view is read-only for this plan.
|
||||
- It may be a local web view, static report, or CLI-driven status page. Do not
|
||||
make the close depend on a full hosted UI unless that implementation is
|
||||
deliberately chosen.
|
||||
- Product positioning:
|
||||
|
||||
```text
|
||||
V2 UI shape:
|
||||
cluster / servers / volumes / ops
|
||||
|
||||
V3 sw-block data model:
|
||||
PVC / PV / volume_id / replica / primary / frontend / epoch /
|
||||
event timeline / bundle / reason codes
|
||||
```
|
||||
|
||||
- Build a read-only block dashboard/status view modeled after the SeaweedFS
|
||||
`/block/` information architecture, backed by the Phase 19 observation API,
|
||||
with no mutating admin actions.
|
||||
- Dev slice: `sw-block ops report` renders a static read-only status page from
|
||||
either live `--master-api` evidence or a saved support bundle. It writes
|
||||
`index.html`, `cluster-evidence.json`, `timeline.jsonl`, and `summary.txt`
|
||||
from the shared observation core.
|
||||
- Day-1 helper slice: `scripts/run-basic-app-example.sh` now generates
|
||||
`status/report/index.html` after writer/reader verification, so the first
|
||||
volume bundle contains a user-readable status page and machine-readable
|
||||
evidence together.
|
||||
- Reuse lessons from the V2 SeaweedFS block UI where useful:
|
||||
- reference files:
|
||||
`C:\work\seaweedfs\weed\server\master_server_handlers_block_ui.go`,
|
||||
`C:\work\seaweedfs\weed\server\master_server.go`,
|
||||
`C:\work\seaweedfs\weed\storage\blockvol\blockapi\types.go`,
|
||||
- useful read-only shape: cluster cards, server table, volume table,
|
||||
replica details, health counters, barrier/failover/rebuild counters,
|
||||
- do not copy mutating V2 operations into this phase: create, delete,
|
||||
promote, expand, assign, or force actions.
|
||||
- Minimum pages or panels:
|
||||
- cluster summary,
|
||||
- node readiness,
|
||||
- volumes table,
|
||||
- volume detail,
|
||||
- event timeline,
|
||||
- support bundle / log links.
|
||||
- The dashboard must consume product-owned observation data, not scrape random
|
||||
pod logs as its primary source.
|
||||
- Logs are supporting evidence, not authority.
|
||||
- Mutating actions such as promote, repair, delete, rebuild, failback, and
|
||||
cleanup buttons are explicitly out of scope.
|
||||
- Enterprise UI boundary: first ship observation. Add admin workflows only
|
||||
after each workflow has a separate product spec, RBAC/audit model, and strict
|
||||
QA gate.
|
||||
|
||||
### D5: Status / Logs / Bundle Loop
|
||||
|
||||
- The default CLI path should stay useful without the dashboard:
|
||||
|
||||
```text
|
||||
sw-block ops cluster --master-api <addr>
|
||||
sw-block ops volumes
|
||||
sw-block ops describe volume <id>
|
||||
sw-block ops timeline volume <id>
|
||||
sw-block ops inventory --namespace <ns> --master <addr> --out <dir>
|
||||
```
|
||||
|
||||
- Text output should be human-readable and AI-readable.
|
||||
- JSON/JSONL output should remain stable enough for dashboard, CI, and support
|
||||
assistant use.
|
||||
- Every unhealthy state should include a reason code and next inspection step.
|
||||
|
||||
### D6: README And User Path
|
||||
|
||||
- README must present Seaweed Block as an alpha/early-beta product loop, not a
|
||||
collection of internal gates.
|
||||
- README must keep claims narrow:
|
||||
- not production-ready,
|
||||
- no full HA claim,
|
||||
- no backup/restore,
|
||||
- no upgrade safety,
|
||||
- no mutating admin operations,
|
||||
- no hosted dashboard unless implemented and gated.
|
||||
- The documented quick path must match the commands the close gate runs.
|
||||
- Dev slice: README and `docs/quickstart-kubernetes.md` were rewritten around
|
||||
the end-user path: activate, first PVC, writer/reader verification, local
|
||||
read-only report, troubleshooting evidence, and cleanup. Internal gate
|
||||
details remain in QA docs instead of the user tutorial.
|
||||
|
||||
### D7: TestOps Controller / Agent Evidence Loop
|
||||
|
||||
- Treat TestOps as product infrastructure for this phase, not as ad-hoc
|
||||
scripting. The current runner is already the Windows-side controller: it owns
|
||||
`run_id`, phase/action status, timeouts, cleanup, and the central result
|
||||
bundle.
|
||||
- Add a controller/agent track rather than relying only on SSH:
|
||||
- controller stays on the Windows/dev workstation and runs scenarios,
|
||||
distributes binaries/scripts, owns cancellation, and writes the final
|
||||
bundle;
|
||||
- Linux node agents on m01/m02/tp01 collect local evidence and eventually
|
||||
execute bounded jobs;
|
||||
- SSH remains fallback until the agent proves stable.
|
||||
- First useful agent capability:
|
||||
- `/healthz` with node name, version, uptime;
|
||||
- `collect_node_snapshot` for process, iSCSI sessions, multipath, NVMe,
|
||||
mounts, disk, kernel tail, network, containerd/k3s images, and kubelet
|
||||
status;
|
||||
- `collect_path` for local artifact pickup;
|
||||
- cancellation-aware bounded command execution later, after snapshot is
|
||||
proven.
|
||||
- K8s/block failure auto-collect should become a gate rule:
|
||||
- on phase failure, collect node snapshots from involved nodes,
|
||||
- collect Kubernetes state (`kubectl get`, `describe`, events, selected logs,
|
||||
rendered manifests vs live objects),
|
||||
- collect product state (`sw-block ops cluster`, inventory, timeline/events),
|
||||
- then run cleanup and collect after-clean state.
|
||||
- Why this is in the plan: Day-1 first-volume r1/r2 showed that without
|
||||
automatic evidence, a timeout is ambiguous; with `writer-describe.txt`, the
|
||||
root cause was immediately visible as loopback publish target vs cross-node
|
||||
writer placement.
|
||||
- Open-source analogs to learn from, not copy blindly:
|
||||
- Sonobuoy: Kubernetes aggregator plus job/daemonset plugins; useful model
|
||||
for cluster-wide collection and per-node log gatherers.
|
||||
- Ansible Runner / AWX execution nodes: useful model for transmit -> worker
|
||||
-> process and central artifact handling.
|
||||
- Jenkins controller/agent: useful model for scheduling jobs onto prepared
|
||||
nodes.
|
||||
- Robot Framework remote libraries: useful model for remote capability
|
||||
exposure, but too generic for block-specific node snapshots.
|
||||
- Non-goal for Phase 20: do not rewrite the runner. Add snapshot collection and
|
||||
failure auto-collect first; move remote exec to agent only after the evidence
|
||||
loop is stable.
|
||||
|
||||
## Non-Claims
|
||||
|
||||
This plan does not claim:
|
||||
|
||||
- production installer/operator lifecycle,
|
||||
- full Helm/operator packaging unless explicitly chosen as the implementation,
|
||||
- online upgrade or rollback safety,
|
||||
- mutating dashboard actions,
|
||||
- automatic repair/rebuild/failback,
|
||||
- backup/snapshot/restore,
|
||||
- new HA semantics beyond closed RF=3 gates,
|
||||
- transparent node-loss failover beyond existing closed claims,
|
||||
- broad distro/kernel compatibility.
|
||||
|
||||
## Hard Gate
|
||||
|
||||
The close gate should run from a fresh supported Kubernetes lab and prove:
|
||||
|
||||
1. One documented command path runs preflight, install, rollout wait, and
|
||||
install summary.
|
||||
2. Node readiness view identifies at least one eligible node and explains any
|
||||
blockers.
|
||||
3. A PVC is created through the documented Kubernetes path.
|
||||
4. The generated product-owned volume becomes ready.
|
||||
5. An app writes and reads data through the mounted PVC.
|
||||
6. `sw-block` status/evidence explains PVC -> volume -> replica -> primary ->
|
||||
frontend -> timeline.
|
||||
7. Product evidence and inventory/support bundle are collected.
|
||||
8. Cleanup/uninstall leaves no active iSCSI sessions, stale blockvolume
|
||||
Deployments, stale port-forwards, or unexpected product pods.
|
||||
9. README quick path matches the commands used by the gate.
|
||||
10. Failure bundles include automatic K8s/product/node evidence sufficient to
|
||||
explain at least one failed first-volume run without manual SSH.
|
||||
|
||||
## Suggested Close Claim
|
||||
|
||||
Seaweed Block provides an alpha install-to-operate loop for Kubernetes users:
|
||||
from a fresh supported lab, run one documented install path, create a
|
||||
PVC-backed block volume, verify app write/read, inspect read-only status and
|
||||
timeline evidence, collect support artifacts, and uninstall cleanly.
|
||||
|
||||
## Next Product Choices After This
|
||||
|
||||
- Phase 21: Helm Activation MVP.
|
||||
- Phase 22: Operator Lifecycle MVP.
|
||||
- Backup / Snapshot / Restore MVP for data protection.
|
||||
- Rebuild / Reintegration / Failback MVP for returned replicas.
|
||||
- Mutating admin controls with RBAC/audit hard gates.
|
||||
|
||||
## Phase 21 Candidate: Helm Activation MVP
|
||||
|
||||
Product question:
|
||||
|
||||
```text
|
||||
Can a Kubernetes user install Seaweed Block as a normal chart, create a first
|
||||
PVC, inspect status/report evidence, and uninstall without relying on internal
|
||||
script-only manifest mutation?
|
||||
```
|
||||
|
||||
Scope:
|
||||
|
||||
- Add `charts/seaweed-block/` for blockmaster, CSI controller/node, CSI driver,
|
||||
RBAC, StorageClass, CHAP Secret, and cluster-spec ConfigMap.
|
||||
- Add `values.yaml` and `values.schema.json` for:
|
||||
- images and immutable tags/digests,
|
||||
- namespace and StorageClass name,
|
||||
- ACK profile,
|
||||
- frontend protocol,
|
||||
- external iSCSI/status,
|
||||
- CHAP configuration,
|
||||
- cluster/node specs,
|
||||
- Stage 2 multipath,
|
||||
- resource requests and tolerations/node selectors where needed.
|
||||
- Keep `scripts/activate-k8s-alpha.sh` as a wrapper that can generate
|
||||
`values.day1.yaml`, run preflight, call `helm install`, run the first-volume
|
||||
smoke, generate `sw-block ops report`, and verify cleanup.
|
||||
- Do not claim upgrade safety until a separate Helm upgrade/rollback smoke
|
||||
passes.
|
||||
|
||||
Hard gate:
|
||||
|
||||
1. Fresh supported cluster passes preflight.
|
||||
2. `helm install` with generated Day-1 values reaches blockmaster and CSI
|
||||
readiness.
|
||||
3. First PVC writer/reader loop passes.
|
||||
4. `sw-block ops report` is generated from live product evidence.
|
||||
5. `helm uninstall` plus host cleanup leaves no iSCSI sessions, product pods,
|
||||
generated blockvolume Deployments, or unexpected StorageClass residue.
|
||||
6. README/quickstart describe Helm as the preferred user install path and keep
|
||||
scripts as dev/TestOps helpers.
|
||||
|
||||
Non-claims:
|
||||
|
||||
- no operator/CRD lifecycle yet,
|
||||
- no online upgrade/rollback safety until gated,
|
||||
- no mutating admin actions,
|
||||
- no backup/restore or rebuild/failback claim.
|
||||
|
||||
## Phase 22 Candidate: Operator Lifecycle MVP
|
||||
|
||||
Product question:
|
||||
|
||||
```text
|
||||
Can Seaweed Block become a Kubernetes-native product loop where users see
|
||||
cluster, node, volume, and recovery lifecycle through CRDs, Conditions, Events,
|
||||
and read-only dashboard/API evidence?
|
||||
```
|
||||
|
||||
Scope:
|
||||
|
||||
- Add CRDs such as `SeaweedBlockCluster`, `SeaweedBlockNode`, and/or
|
||||
`SeaweedBlockVolume` only after the exact lifecycle ownership is specified.
|
||||
- Operator owns install/upgrade status, node eligibility, desired StorageClass,
|
||||
CHAP Secret references, blockmaster/CSI rollout state, and cleanup
|
||||
reconciliation.
|
||||
- Conditions must be first-class and user-readable:
|
||||
`Ready`, `Degraded`, `Recovering`, `Blocked`, `CleanupPending`, with stable
|
||||
reason codes.
|
||||
- Events must mirror Phase 19 product observation semantics where possible.
|
||||
- Mutating actions such as repair, rebuild, promote, failback, or delete remain
|
||||
out of scope unless each has a separate fencing/RBAC/audit gate.
|
||||
|
||||
Hard gate:
|
||||
|
||||
1. Apply one CR creates the supported stack.
|
||||
2. Status Conditions show install progress and node eligibility without SSH.
|
||||
3. First PVC writer/reader loop passes.
|
||||
4. A controlled failure updates CR status/events and support evidence.
|
||||
5. Delete CR cleans Kubernetes resources and verifies host/session cleanup via
|
||||
documented guardrails.
|
||||
6. Helm-to-operator migration or coexistence boundary is documented.
|
||||
|
||||
Why this release matters:
|
||||
|
||||
Operator is the first release that can make Seaweed Block feel like a complete
|
||||
Kubernetes storage product: installation, status, lifecycle ownership, cleanup,
|
||||
and user-visible diagnosis are managed by a product control plane instead of a
|
||||
collection of scripts.
|
||||
-90
@@ -1,90 +0,0 @@
|
||||
# Phase 38 Finished Plan: Lifecycle Action Model Executable Contract
|
||||
|
||||
Status: closed on 2026-06-10.
|
||||
|
||||
Branch: `phase33-testops-failure-hardening`.
|
||||
|
||||
## Goal
|
||||
|
||||
Turn lifecycle/safe-next-step hints into executable, testable action contracts
|
||||
before adding mutating operator behavior.
|
||||
|
||||
The phase deliberately stopped before finalizers, cleanup execution, promotion,
|
||||
repair, rebuild, failback, backup, restore, or any new mutating RBAC. Its output
|
||||
is a bounded decision layer: every surfaced action can explain whether it is
|
||||
`allowed` or `rejected`, why, which facts it requires, which executor owns it,
|
||||
which invariants/evidence apply, and whether mutation is allowed.
|
||||
|
||||
## Delivered
|
||||
|
||||
- Action contract inventory for current ManagedVolume actions, including owner
|
||||
executor, side-effect class, required facts, policy gate, invariant refs, and
|
||||
evidence requirements.
|
||||
- Executable evaluator:
|
||||
`EvaluateManagedVolumeAction(actionType, ManagedVolumeFacts)`.
|
||||
- Fail-closed rejection reasons:
|
||||
`unknown_action`, `policy_disabled`, `missing_required_facts`, and
|
||||
`mutation_not_allowed`.
|
||||
- Rejected-action evidence renderer for cold review and QA.
|
||||
- Surface propagation of action decisions through:
|
||||
- ManagedVolume projection text,
|
||||
- `summary.txt`,
|
||||
- `sw-block ops explain`,
|
||||
- `operator-snapshot.json`,
|
||||
- dashboard `/operator-snapshot.json`,
|
||||
- `SwBlockVolume.status.allowedActions[]`.
|
||||
- CRD-safe camelCase fields for action status:
|
||||
`decision`, `decisionReason`, `missingFacts`, `mutationAllowed`, and
|
||||
`evidenceRequired`.
|
||||
- Dry-run proof for `safe_k8s.reinstall_external_iscsi` on
|
||||
`publish_target_loopback_cross_node`: decision `allowed`, mode `dry_run`,
|
||||
evidence `loopback_cross_node_evidence`, and `mutation_allowed=false`.
|
||||
- Rejected proof for `authority.request_promotion`: decision `rejected`,
|
||||
reason `policy_disabled`, side effect `authority_mutating`, and
|
||||
`mutation_allowed=false`.
|
||||
|
||||
## QA Evidence
|
||||
|
||||
QA verdict: PASS on source commit `ea1618d`.
|
||||
|
||||
Gates:
|
||||
|
||||
- G1 local contract tests: PASS.
|
||||
- G2 rejected action evidence: PASS.
|
||||
- G3 dry-run loopback action: PASS.
|
||||
- G4 CRD/RBAC boundary: PASS.
|
||||
- G5 non-mutation and cleanup: PASS.
|
||||
|
||||
Validated commands:
|
||||
|
||||
```text
|
||||
go test ./core/ops ./cmd/sw-block ./cmd/blockcsi ./scripts
|
||||
helm lint charts/seaweed-block
|
||||
helm template ... --include-crds --set operatorStatus.create=true --set operatorStatus.dryRun=false
|
||||
git diff --check
|
||||
```
|
||||
|
||||
Sign-off document:
|
||||
|
||||
- `internal/docs/qa-assignments/phase38-action-model-executable-contract-qa-signoff.md`
|
||||
|
||||
## Non-Claims
|
||||
|
||||
- No finalizer/delete safety was added.
|
||||
- No automatic cleanup was added.
|
||||
- No image import, Helm release change, host repair, iSCSI/multipath cleanup, or
|
||||
hostPath mutation was added.
|
||||
- No promotion, fencing, rebuild, reintegration, failback, repair, backup,
|
||||
snapshot, or restore execution was added.
|
||||
- No dashboard mutation buttons or mutating operator executor were added.
|
||||
- `authority.request_promotion` remains contract-only and policy-disabled; it is
|
||||
intentionally not surfaced as an executable live action.
|
||||
|
||||
## Follow-Ups
|
||||
|
||||
- Restore lab node `tp01` before Phase 39 multi-node delete-safety scenarios;
|
||||
QA observed it as `NotReady`/unreachable during Phase 38 sign-off.
|
||||
- Add server-side-dry-run/envtest coverage for CRD status payloads so future
|
||||
schema drift is caught before live QA.
|
||||
- Begin Phase 39: safe finalizer/delete-safety as the first narrow mutating
|
||||
operator path, using the Phase 38 action contract as the precondition layer.
|
||||
-103
@@ -1,103 +0,0 @@
|
||||
# Phase 39 Finished Plan: Delete-Safety Status Boundary
|
||||
|
||||
Status: closed on 2026-06-13.
|
||||
|
||||
Branch: `phase33-testops-failure-hardening`
|
||||
|
||||
## Outcome
|
||||
|
||||
Phase 39 originally targeted finalizer/delete safety as the first mutating
|
||||
operator path. Live QA proved that CRD finalizer mutation cannot be bounded by
|
||||
`swblockvolumes/finalizers` RBAC alone: CRDs expose no usable HTTP
|
||||
`/finalizers` endpoint, and modifying `metadata.finalizers` requires main
|
||||
`patch swblockvolumes` authorization.
|
||||
|
||||
The product decision was to preserve the Phase 35-38 operator-status safety
|
||||
boundary. Phase 39 therefore closes as a status/events-only delete-safety
|
||||
boundary:
|
||||
|
||||
- operator-status writes `SwBlockCluster/status`, `SwBlockVolume/status`, and
|
||||
Kubernetes Events only,
|
||||
- operator-status does not patch `SwBlockVolume.metadata.finalizers`,
|
||||
`SwBlockVolume.spec`, workloads, storage resources, or host state,
|
||||
- delete-safety is visible as blocked/releasable status, reason, evidence,
|
||||
`CleanupRequired`, safe next steps, and `finalizerReleaseAllowed` as a fact,
|
||||
- actual finalizer add/remove is deferred to a future lifecycle-owner component.
|
||||
|
||||
## Delivered
|
||||
|
||||
- Delete-safety contract and decision projection:
|
||||
- states: `not_requested`, `requested`, `blocked`, `releasable`, `released`,
|
||||
- blocked residue projects `CleanupRequired=True`,
|
||||
- clean evidence projects `releasable/allowed`,
|
||||
- missing/residue evidence never claims deletion is safe.
|
||||
- Status-only operator boundary:
|
||||
- Helm RBAC grants CRD reads, CRD `/status` writes, Events create, and
|
||||
Kubernetes read-only evidence access,
|
||||
- no finalizers, main CRD patch, PVC/PV, workload, storageclass, secret, node,
|
||||
or host mutation grant.
|
||||
- CRD schema hardening:
|
||||
- `SwBlockVolume.status.allowedActions[].mode` accepts `read_only`,
|
||||
`dry_run`, and `scripted`,
|
||||
- regression test covers the enum to prevent the live 422 from returning.
|
||||
- Multi-volume status isolation:
|
||||
- delete-safety evidence for one volume does not contaminate other volumes,
|
||||
- unrelated volumes keep their own identity, status, reason, and publish
|
||||
target,
|
||||
- clean delete-safety evidence can project independently on another volume.
|
||||
|
||||
## QA Evidence
|
||||
|
||||
- D4/D5 status-only re-validation:
|
||||
`internal/docs/qa-assignments/phase39-d4-d5-finalizer-delete-safety-qa-signoff.md`
|
||||
- RBAC status/events-only: PASS
|
||||
- D4 blocked delete-safety status: PASS on `f167f9a`
|
||||
- D5 clean delete-safety status: PASS
|
||||
- final cleanup verifier: PASS
|
||||
- D6 multi-volume status isolation:
|
||||
`internal/docs/qa-assignments/phase39-d6-multi-volume-delete-safety-status-isolation-qa-signoff.md`
|
||||
- A blocked delete-safety does not contaminate B/C,
|
||||
- C can independently become releasable,
|
||||
- `finalizer_patches=0`,
|
||||
- no finalizer Events,
|
||||
- CRD/report surfaces agree.
|
||||
|
||||
Local verification during close:
|
||||
|
||||
```text
|
||||
go test ./core/ops ./cmd/sw-block
|
||||
go test ./cmd/blockcsi ./scripts
|
||||
helm lint charts/seaweed-block
|
||||
helm template sw-block charts/seaweed-block --namespace kube-system --include-crds --set operatorStatus.create=true --set operatorStatus.dryRun=false
|
||||
git diff --check
|
||||
```
|
||||
|
||||
## Non-Claims
|
||||
|
||||
Phase 39 does not claim:
|
||||
|
||||
- automatic deletion protection for `SwBlockVolume`,
|
||||
- finalizer add/remove by operator-status,
|
||||
- PVC/PV finalizer ownership,
|
||||
- automatic cleanup execution,
|
||||
- iSCSI/multipath/hostPath deletion by the operator,
|
||||
- promotion, fencing, rebuild, failback, backup, restore, or NVMe ANA parity.
|
||||
|
||||
## Follow-Ups
|
||||
|
||||
1. **Clear stale deleteSafety when delete evidence disappears.**
|
||||
QA observed a within-volume stale field: after a delete-summary was removed,
|
||||
the volume status returned to ready but retained the prior
|
||||
`deleteSafety=blocked`. This did not contaminate other volumes, but the field
|
||||
should be cleared or refreshed to avoid confusing consumers.
|
||||
2. **Add live/envtest coverage for KubernetesStatusClient.**
|
||||
Multiple defects in Phases 35-39 passed mock unit tests and Helm rendering but
|
||||
failed against the real Kubernetes API/CRD/RBAC surface. Add an envtest-style
|
||||
harness using real CRD schemas and the operator ServiceAccount permissions.
|
||||
3. **Restore `tp01`.**
|
||||
Lab infra remains `NotReady`/unreachable. Restore before RF=3 live
|
||||
multi-node work.
|
||||
4. **Future lifecycle-owner finalizers.**
|
||||
Implement finalizer add/remove in the component that owns
|
||||
`SwBlockVolume` object lifecycle, not in operator-status, unless the project
|
||||
later chooses an admission-bounded main patch model.
|
||||
-159
@@ -1,159 +0,0 @@
|
||||
# Phase 40 Finished Plan: Operator Production Hardening
|
||||
|
||||
Status: closed on 2026-06-14.
|
||||
|
||||
Branch: `phase33-testops-failure-hardening`
|
||||
|
||||
## Outcome
|
||||
|
||||
Phase 40 closes the status/events-only operator foundation as a release-ready
|
||||
boundary. The product can now ship a coherent v0.4 beta slice:
|
||||
|
||||
```text
|
||||
Helm + PVC + read-only/status-only operator status + Events + diagnostics +
|
||||
delete-safety/install-drift visibility. No lifecycle mutation.
|
||||
```
|
||||
|
||||
The main problem addressed by this phase was not a missing user feature; it was
|
||||
release trust. Phases 35-39 repeatedly found schema/RBAC defects only in live QA.
|
||||
Phase 40 added release-candidate gates and conformance checks to catch those
|
||||
classes earlier, then closed the chart/image skew found by QA.
|
||||
|
||||
## Delivered
|
||||
|
||||
- Status API conformance gate for `SwBlockCluster.status` and
|
||||
`SwBlockVolume.status` payload shape:
|
||||
- casing drift,
|
||||
- enum drift,
|
||||
- wrong endpoint usage,
|
||||
- RBAC broadening,
|
||||
- delete-safety status.
|
||||
- Status correctness polish:
|
||||
- stale `deleteSafety` clearing,
|
||||
- single effective node `Ready` condition,
|
||||
- bounded/stable Event identity preserved.
|
||||
- Read-only install drift visibility:
|
||||
- chart/app/operator image identity,
|
||||
- current/desired/missing/mismatched status,
|
||||
- report/dashboard/operator-snapshot/CRD agreement,
|
||||
- no upgrade execution.
|
||||
- Release claim alignment:
|
||||
- README, quickstart, release note, roadmap, and QA assignments describe the
|
||||
status/events-only operator foundation and explicit non-claims.
|
||||
- Release candidate gates:
|
||||
- local release gate script,
|
||||
- TestOps status API conformance scenario,
|
||||
- D6 QA assignment and sign-off.
|
||||
- Chart/image compatibility fix:
|
||||
- `--launcher-durable-impl` is gated by
|
||||
`compat.launcherDurableImplFlag=false` by default,
|
||||
- non-default `blockmaster.durableImpl` fails fast unless the compat flag is
|
||||
enabled,
|
||||
- local RC gate asserts the default chart render omits the incompatible flag.
|
||||
|
||||
## Release Images
|
||||
|
||||
Published by GitHub Actions run `27490827782` from commit
|
||||
`dc2972d0059beffb2447ab8546ceb65e646a7b66`.
|
||||
|
||||
```text
|
||||
ghcr.io/seaweedfs/seaweed-block:sha-dc2972d0059b
|
||||
ghcr.io/seaweedfs/seaweed-block-csi:sha-dc2972d0059b
|
||||
```
|
||||
|
||||
Published digests:
|
||||
|
||||
```text
|
||||
seaweed-block
|
||||
index: sha256:b8da5ca4e2bbe2f0f630fee0468790c444362615d68807a1be31fd237c84928f
|
||||
linux/amd64: sha256:677f6321ea5199b14792345b8691358860bb9ca7376f4e4a2f3a7c0113d5db9b
|
||||
seaweed-block-csi
|
||||
index: sha256:b5942cd68d28aecdfebec1f1e5ec55a9cafe746169fee3b6c35916c93fffcaa6
|
||||
linux/amd64: sha256:1fc636a4e0e63cc8cbee39e6775053c5d1aba7213ca9182a084e1bb6fe71474c
|
||||
```
|
||||
|
||||
## QA Evidence
|
||||
|
||||
Primary D6 close:
|
||||
|
||||
- `internal/docs/qa-assignments/phase40-d6-release-candidate-qa-signoff.md`
|
||||
|
||||
Result:
|
||||
|
||||
- Local release gate: PASS.
|
||||
- G1 first-volume with published image: PASS.
|
||||
- G2 operator-status CRD/Event/RBAC with fresh release image: PASS.
|
||||
- G3 negative status: PASS.
|
||||
- G4 status API conformance: PASS.
|
||||
- G5 cleanup residue: PASS.
|
||||
|
||||
Important QA sequence:
|
||||
|
||||
- Initial D6 held because the chart passed `--launcher-durable-impl` to
|
||||
published images that did not support that flag.
|
||||
- The chart compatibility fix resolved the blocker.
|
||||
- QA reran G1 against the published `sha-6260e46fd3be` image and confirmed
|
||||
first-volume still works.
|
||||
- Fresh images were published from `dc2972d0059b`.
|
||||
- QA ran G2 against `sha-dc2972d0059b` and confirmed live CRD status, Events,
|
||||
and the status/events-only RBAC boundary on the shipped binary.
|
||||
|
||||
Supporting evidence:
|
||||
|
||||
- `internal/docs/qa-assignments/phase40-d4-status-api-conformance-qa.md`
|
||||
- `internal/docs/qa-assignments/phase40-d6-release-candidate-qa.md`
|
||||
- `docs/releases/v0.4-beta-candidate.md`
|
||||
|
||||
## Non-Claims
|
||||
|
||||
Phase 40 does not claim:
|
||||
|
||||
- production readiness,
|
||||
- mutating Kubernetes operator lifecycle,
|
||||
- automatic `SwBlockVolume` object creation or ownership,
|
||||
- finalizer ownership or finalizer add/remove,
|
||||
- delete execution,
|
||||
- automatic cleanup,
|
||||
- automatic support-bundle collection or upload,
|
||||
- upgrade or rollback execution,
|
||||
- promote, repair, rebuild, failback, delete, backup, restore, or cleanup
|
||||
mutation through UI/API/operator,
|
||||
- returned-replica rebuild or automated failback,
|
||||
- NVMe ANA parity expansion,
|
||||
- production dashboard,
|
||||
- performance, RTO, RPO, or SLO guarantees.
|
||||
|
||||
## Carry-Forwards
|
||||
|
||||
1. **Real envtest/live-apiserver status-writer harness.**
|
||||
The current conformance gate is schema-aware and useful, but still uses a
|
||||
mock server. A real apiserver + real RBAC harness remains the highest-leverage
|
||||
way to shift live-only CRD/RBAC defects left.
|
||||
2. **`swblock -env` flag ordering.**
|
||||
Runner flags after the scenario path can be silently ignored. Fix the runner
|
||||
or correct all runbooks to put `-env` before the scenario path.
|
||||
3. **Parameterized support-bundle import nodes.**
|
||||
`helm-support-bundle-diagnostics-chain` hardcodes a tp01 import path; make it
|
||||
env-overridable so one lab node being down does not block unrelated negative
|
||||
status validation.
|
||||
4. **Restore `tp01`.**
|
||||
Lab infra remained `NotReady`/unreachable during the release cycle. Restore
|
||||
before RF=3 live multi-node work.
|
||||
5. **Loopback publish-target documentation.**
|
||||
Document loopback publish targets as single-node/local-consumer only.
|
||||
|
||||
## Phase 41 Entry Criteria
|
||||
|
||||
Phase 41 should start from the v0.4 beta status/events-only baseline and should
|
||||
not weaken that boundary.
|
||||
|
||||
Recommended next scope:
|
||||
|
||||
- lifecycle-owner design,
|
||||
- CR object ownership and finalizer strategy,
|
||||
- first bounded mutating path with explicit action/precondition/executor/evidence
|
||||
contract,
|
||||
- real envtest/live-apiserver regression before any new mutating RBAC ships.
|
||||
|
||||
Do not start with NVMe ANA parity, backup/restore, rebuild/failback, or broad
|
||||
mutation until the lifecycle-owner boundary is explicit and testable.
|
||||
-201
@@ -1,201 +0,0 @@
|
||||
# Finished Plan: Light-Use Operations MVP
|
||||
|
||||
Status: finished. Closed after QA validation at product commit
|
||||
`8beaaa7ca83cc3a9ebbf6873a42eb9b3bd3505be`.
|
||||
|
||||
This plan reframed the smaller `Operations Layer Usability Seed` into a
|
||||
user-visible light-use operations loop. The goal was not to finish the full
|
||||
enterprise operations story. The goal was to make one useful product workflow
|
||||
real and gated:
|
||||
|
||||
```text
|
||||
PVC/app problem -> run status command -> read summary -> attach bundle -> dev/QA
|
||||
can triage without asking for raw logs first
|
||||
```
|
||||
|
||||
## Product Question
|
||||
|
||||
Can an early user or developer use Seaweed Block as a functional light block
|
||||
product without reading internal scripts and logs?
|
||||
|
||||
The answer after this plan is narrower but materially better:
|
||||
|
||||
- The datapath is close to a functional MVP: CSI dynamic PVC, iSCSI/NVMe
|
||||
frontend paths, mounted failover, restart, returned-replica evidence, and
|
||||
beta-hardening gates are real.
|
||||
- The operations layer now has a first closed read-only loop: a product CLI can
|
||||
collect status, classify issues, write a support bundle, and TestOps can
|
||||
prove the command/bundle contract.
|
||||
- The product is still not a complete light-use product. Install, lifecycle
|
||||
ownership, cluster-wide observation, and UI/API operations remain future
|
||||
work.
|
||||
|
||||
Close decision: this plan is closed as `Light-Use Operations MVP`, not as
|
||||
`Light-Use Product MVP`. It proves observe/report/coordinate. It does not prove
|
||||
that a new user can provision, attach, format, mount, write, delete, and recover
|
||||
through one documented product workflow.
|
||||
|
||||
## Delivered User Experience
|
||||
|
||||
As a user or developer, I can now:
|
||||
|
||||
1. Run a product-owned status command for one volume.
|
||||
2. Read a human summary that includes product revision, volume identity,
|
||||
authority, replication, residue, and issue classification.
|
||||
3. Attach a self-describing support bundle with machine-readable JSON,
|
||||
human-readable summary, bundle metadata, artifacts, unchecked classes,
|
||||
collection errors, and non-claims.
|
||||
4. Use TestOps control data to see active/history run records, resource locks,
|
||||
and shared-lab ownership instead of guessing whether a test is running or
|
||||
stale.
|
||||
|
||||
This is the first functional operations loop. It is intentionally read-only.
|
||||
|
||||
## Delivered Scope
|
||||
|
||||
### Product CLI
|
||||
|
||||
`sw-block ops status` was added with the intended shape:
|
||||
|
||||
```text
|
||||
sw-block ops status \
|
||||
--volume <id> \
|
||||
--master <host:port> \
|
||||
--status-addr <host:port|url> \
|
||||
--out <dir>
|
||||
```
|
||||
|
||||
Exit code contract:
|
||||
|
||||
- `0`: report collected, parsed, and classified clean,
|
||||
- `1`: report collected but unhealthy/incomplete/residue or collection-error
|
||||
evidence was detected,
|
||||
- `2`: required input is invalid, artifact writing failed, or the report
|
||||
identity/schema is invalid.
|
||||
|
||||
### Support Bundle
|
||||
|
||||
The command writes:
|
||||
|
||||
- `volume-status-report.json`,
|
||||
- `volume-status-summary.txt`,
|
||||
- `ops-status-bundle.json`.
|
||||
|
||||
The bundle records schema version, command, capture time, volume id, product
|
||||
revision, exit classification, artifacts, unchecked residue classes, collection
|
||||
errors, and non-claims.
|
||||
|
||||
### TestOps Gates
|
||||
|
||||
Fast local gates cover the report and CLI boundary:
|
||||
|
||||
- `operations-volume-status-report-component-gate`,
|
||||
- `operations-volume-status-cli-gate`.
|
||||
|
||||
These gates validate schema, summary/classifier behavior, artifact writing,
|
||||
bundle metadata, CLI command boundary, exit code behavior, outlier cases, and
|
||||
non-claims.
|
||||
|
||||
### Shared-Lab Control Data
|
||||
|
||||
TestOps gained simple shared-lab control data:
|
||||
|
||||
```text
|
||||
testops-control/
|
||||
active/<run_id>.json
|
||||
history/<run_id>.json
|
||||
locks/<resource>.lock
|
||||
events.jsonl
|
||||
```
|
||||
|
||||
The first version is not a scheduler. It provides visibility and safety:
|
||||
|
||||
- create an active record at run start,
|
||||
- update state at terminal exit,
|
||||
- record scenario, artifact dir, commits, and known resource ownership,
|
||||
- refuse conflicting resource locks,
|
||||
- move terminal runs into history,
|
||||
- keep stale active records visible if a runner crashes.
|
||||
|
||||
## QA Close Evidence
|
||||
|
||||
QA validated the close gate at product commit
|
||||
`8beaaa7ca83cc3a9ebbf6873a42eb9b3bd3505be`.
|
||||
|
||||
Validated parts:
|
||||
|
||||
- Part A local tests: PASS for
|
||||
`go test ./core/ops ./cmd/sw-block ./internal/testops ./cmd/sw-testops -count=1`.
|
||||
- Part B CLI gate: PASS. `operations-volume-status-cli-gate.yaml` validates
|
||||
schema, volume id, product revision, status/authority, bundle command,
|
||||
exit code, artifact list, unchecked classes, collection errors, and
|
||||
non-claims.
|
||||
- Part C artifact inspect: PASS. `ops-status-bundle.json`,
|
||||
`volume-status-summary.txt`, and `volume-status-report.json` all have the
|
||||
required fields and parse correctly.
|
||||
- Part D CLI outliers: PASS. Missing `--volume`, bad master/status addresses,
|
||||
and unwritable `--out` return exit code `2` without false success claims.
|
||||
- Part E control data: PASS. Terminal run moved from `active/` to `history/`,
|
||||
locks were released, `events.jsonl` carried start and complete records, and
|
||||
`--control-list` showed the expected fields.
|
||||
- Part F lock conflict: PASS. A second run against an exclusive resource exits
|
||||
`2`, reports the lock owner, creates no active record/artifact dir, and does
|
||||
not disturb the first run.
|
||||
- Part G hygiene: N/A. The close gate used local execution only, not M01/M02.
|
||||
|
||||
QA verdict:
|
||||
|
||||
```text
|
||||
PASS to close current plan.
|
||||
The light-use operations loop -- observe one volume -> read a useful summary ->
|
||||
attach a self-describing bundle -> see TestOps control data for shared lab
|
||||
ownership -- is exercised end to end with all required guarantees enforced by
|
||||
code, not by exit-0 alone.
|
||||
```
|
||||
|
||||
## Informational Notes From QA
|
||||
|
||||
These are portability notes, not close blockers:
|
||||
|
||||
- In custom registries on Windows, Unix-style `/c/work/...` paths are treated
|
||||
as relative by `filepath.IsAbs`. Use Windows absolute paths such as
|
||||
`C:/work/...`.
|
||||
- On Windows, `ShellDriver` invokes the driver path directly with `os/exec`.
|
||||
`.sh` drivers need a `.bat` shim that calls `bash.exe`, or the driver should
|
||||
be `.bat`/`.exe`.
|
||||
|
||||
## Non-Claims Carried Forward
|
||||
|
||||
This plan does not claim:
|
||||
|
||||
- productized install/upgrade/uninstall,
|
||||
- Kubernetes operator/controller ownership,
|
||||
- mutating admin commands,
|
||||
- automatic repair,
|
||||
- cluster-wide UI/dashboard,
|
||||
- performance monitoring,
|
||||
- fleet agent,
|
||||
- full TestOps scheduler.
|
||||
|
||||
## Next Roadmap Pull
|
||||
|
||||
The next usability work should move from observation to product-owned lifecycle.
|
||||
The main remaining user-visible gap is:
|
||||
|
||||
```text
|
||||
install/create/delete/retry/cleanup should feel like product behavior, not a
|
||||
collection of internal scripts plus TestOps cleanup discipline
|
||||
```
|
||||
|
||||
Candidate next plan: `Light-Use Install And Lifecycle MVP`.
|
||||
|
||||
The cheapest useful next close loop is a "first volume in 10 minutes" path:
|
||||
|
||||
```text
|
||||
install/launch -> create PVC -> attach app pod -> write/read -> delete ->
|
||||
verify cleanup -> collect status bundle if anything fails
|
||||
```
|
||||
|
||||
Existing quickstart and K8s demo paths are promising, but the next plan should
|
||||
make the claim explicit, fresh-run it, and separate product-owned behavior from
|
||||
TestOps-only cleanup.
|
||||
@@ -431,7 +431,7 @@ rebuild, delete safety, or cleanup must start as a separate gated phase.
|
||||
ANA change count advances, no-provider OAES remains zero, and the AER
|
||||
single-slot limit remains enforced.
|
||||
- Phase 128 is closed for live Linux host validation of ANA Change Notice. The
|
||||
m02 kernel `nvme:nvme_async_event` tracepoint observed
|
||||
node-b kernel `nvme:nvme_async_event` tracepoint observed
|
||||
`NVME_AEN=0x0c0302` during standalone r1->r2 failover, the ANA log change
|
||||
count advanced, host path state refreshed, mounted I/O remained correct, and
|
||||
cleanup was clean.
|
||||
@@ -593,7 +593,7 @@ rebuild, delete safety, or cleanup must start as a separate gated phase.
|
||||
thresholds. The implementation was removed; `walstore` remains the default
|
||||
and `parallel-walstore` remains opt-in.
|
||||
- Closed experiment: Phase 169's segmented group-commit candidate passed
|
||||
format, bounded-owner, durability, failure, and recovery gates. Its m02
|
||||
format, bounded-owner, durability, failure, and recovery gates. Its node-b
|
||||
optimistic upper bound grouped `1.348` entries/segment but four writers
|
||||
reached only `0.772x` one writer and `0.990x` the positioned control. The
|
||||
implementation was removed before checkpoint/rebuild integration.
|
||||
@@ -795,7 +795,7 @@ credible light-use product:
|
||||
|
||||
### Track G: Test Management Control Plane
|
||||
|
||||
- Current: runner scenarios write result/status bundles, but M01/M02 shared lab
|
||||
- Current: runner scenarios write result/status bundles, but node-a/node-b shared lab
|
||||
ownership is still mostly implicit.
|
||||
- Closed: Phase 33 TestOps failure hardening. The runner and helpers now
|
||||
exercise negative paths, collect useful failure snapshots, assert no false
|
||||
@@ -1164,11 +1164,11 @@ Approximate engineering effort if scope remains tight:
|
||||
baseline and corrects stale audit wording: ANA log/Identify/provider and CSI
|
||||
single-path NVMe stage/unstage are present. Phase 100 closed the Kubernetes
|
||||
CSI NVMe multipath attach follow-up for the supported lab path.
|
||||
- Operation milestone release readiness is active and blocked only on matching
|
||||
published images. Run `scripts/run-operation-milestone-release-readiness.ps1`
|
||||
plus the published-image Day-1 smoke before marking the operation milestone
|
||||
released. Development has moved ahead in parallel; this does not mark the
|
||||
operation milestone released.
|
||||
- Operation milestone release readiness is blocked only on matching published
|
||||
images. Its readiness script ran against the project lab and is kept outside
|
||||
this repository with the lab scenarios; run it and the published-image Day-1
|
||||
smoke there before marking the operation milestone released. Development has
|
||||
moved ahead in parallel; this does not mark the operation milestone released.
|
||||
- Phase 100 Kubernetes CSI NVMe Multipath Attach is closed. It implements and
|
||||
gates the path from dynamic PVC `protocol=nvme` and `replicationFactor=2` to
|
||||
master NVMe frontend grouping, CSI `nvmeAddrs` publish context, NodeStage
|
||||
@@ -1275,7 +1275,7 @@ Approximate engineering effort if scope remains tight:
|
||||
fixes remained. The finished plan is
|
||||
`internal/docs/finished-plans/phase172_finishedplan_wal_materialization_pipeline.md`.
|
||||
- Phase 173 Storage Execution Architecture Decision is closed with no backend
|
||||
candidate. The exact Linux fixed-work baseline passed on dedicated m02 NVMe;
|
||||
candidate. The exact Linux fixed-work baseline passed on dedicated node-b NVMe;
|
||||
shipped logical work reconciled with product counters, `strace`, perf,
|
||||
profiles, iostat, and checkpoint evidence. D3 then found no stable
|
||||
owner/queue, writeback-interference, or media-separation signal and closed
|
||||
|
||||
@@ -1,347 +0,0 @@
|
||||
# QA Runbook — Current Block TestOps Flow (v1)
|
||||
|
||||
Use this when QA needs to validate **seaweed-block** work on the M02 k3s lab.
|
||||
|
||||
This is the block-specific sibling of the RDMA `QA-RUNBOOK-rdma-current-v2.md`.
|
||||
The *flow* is the same four ideas — standard gate, dirty-adhoc DEBUG-only, deep
|
||||
runbook for specialty failures, post-run provenance assertion — but the scenario,
|
||||
project, evidence rows, and failure classes are block's, not RDMA's.
|
||||
|
||||
> For the **mechanics** of running a phase gate (env access, syncing
|
||||
> `product_root`, terminal-evidence discipline, PASS/FAIL/PARTIAL), see
|
||||
> [`QA-AGENT-RUNBOOK.md`](QA-AGENT-RUNBOOK.md). This runbook is the higher-level
|
||||
> *which path / accept criteria / provenance* SOP.
|
||||
|
||||
> **Unified TestOps parent docs:** the platform-level contract lives in
|
||||
> `C:\work\seaweedfs\learn\sw-test-runner-standalone\docs\`:
|
||||
> `unified-testops.md`, `wiki/submitting.md`,
|
||||
> `control-plane-product-contract.md`, and `qa-bundle-assert.md`. Read those for
|
||||
> the common 9099 dashboard, bundle envelope, suite/worker model, and shared
|
||||
> `qa-assert.sh` contract. This file adds the block-specific current-state
|
||||
> rules.
|
||||
|
||||
> **Current block split:** the unified runner repo now has a `block-ci` worker
|
||||
> script for the canonical published-image first-volume gate. Most active
|
||||
> seaweed_block phase gates still validate a source branch or local
|
||||
> `sw-block:local` image and are run by the QA agent with `swblock.exe`
|
||||
> directly: sync `product_root` → `swblock run` → read/assert the bundle. Do not
|
||||
> use `POST /api/rdma/submit` for block; use `/api/block/submit` only when the
|
||||
> assigned gate is registered in the TestOps block worker and the tested ref is
|
||||
> a published image tag.
|
||||
|
||||
## 0. What To Run
|
||||
|
||||
Pick exactly one path.
|
||||
|
||||
| Path | Use When | Result Can Be Used For |
|
||||
| --- | --- | --- |
|
||||
| `block-ci` worker gate | Canonical published-image block gate registered in TestOps | Release/artifact evidence after `qa-assert.sh` |
|
||||
| Standard phase gate | A reviewable branch / commit (pushed, no dirty source) | QA verdict / phase evidence |
|
||||
| Adhoc dirty debug | Developer has a local uncommitted `sw-block` build | Debug only, **not** QA ACCEPT |
|
||||
| Deep runbook | A standard gate fails in/near a specialty area (SmartWAL, iSCSI/NVMe OS, residue) | Specialty QA evidence |
|
||||
|
||||
## 0a. Unified `block-ci` Worker Gate
|
||||
|
||||
Use this only when the assigned gate is the canonical TestOps block worker path:
|
||||
a published `seaweed-block` / `seaweed-block-csi` image tag, staged harness, and
|
||||
`docs/qa-profiles/block.expect`.
|
||||
|
||||
Runner repo entry point:
|
||||
|
||||
```text
|
||||
C:\work\seaweedfs\learn\sw-test-runner-standalone\scripts\run-block-ci.sh
|
||||
```
|
||||
|
||||
Contract:
|
||||
|
||||
- ref is a published image tag such as `sha-...`, not a dirty source tree;
|
||||
- worker stages the block harness to m02 `product_root`;
|
||||
- worker runs `swblock` with `project=block-ci`;
|
||||
- worker runs:
|
||||
|
||||
```bash
|
||||
scripts/qa-assert.sh <bundle> --ref <tag> --profile docs/qa-profiles/block.expect
|
||||
```
|
||||
|
||||
- success prints `Block CI PASS` and the dashboard path:
|
||||
|
||||
```text
|
||||
http://192.168.1.181:9099/?project=block-ci
|
||||
```
|
||||
|
||||
If the feature under review requires a new source commit, a new scenario, or a
|
||||
local `sw-block:local` build, do **not** force it through `block-ci`. Use the
|
||||
standard phase-gate path below and report it as phase evidence, not release
|
||||
artifact evidence.
|
||||
|
||||
## 1. Standard Gate — Reviewable Branch/Commit
|
||||
|
||||
This is the normal process.
|
||||
|
||||
### Inputs
|
||||
|
||||
- A **pushed** seaweed-block branch or commit SHA. No local dirty source, no
|
||||
hand-copied binary.
|
||||
- The **scenario** the dev assigned: a phase gate
|
||||
(`testops/scenarios/<gate>-chain.yaml` driven by
|
||||
`scripts/run-phaseNN-<slug>-gate.sh`) **or** the v0.5 release smoke.
|
||||
|
||||
### Images
|
||||
|
||||
Most phase gates run product code, so build from the reviewable commit (published
|
||||
images often predate a new subcommand):
|
||||
|
||||
```bash
|
||||
# on m02, from the synced product_root at that commit:
|
||||
bash scripts/build-alpha-images.sh # -> sw-block:local + sw-block-csi:local
|
||||
ssh testdev@192.168.1.184 'docker images | grep sw-block' # confirm BOTH exist on the node that runs pods
|
||||
```
|
||||
|
||||
Pure RBAC / admission gates need **no image** (they only `kubectl apply` CRDs +
|
||||
RBAC and run `auth can-i`). The **v0.5 release smoke** uses the **published v0.5
|
||||
dual images at the same commit** (`ghcr.io/seaweedfs/seaweed-block:<v0.5>` +
|
||||
`…-csi:<same>`) — **never** `sha-dc2972d0059b` (that is a v0.4 image).
|
||||
|
||||
### Sync product_root (the #1 gotcha)
|
||||
|
||||
Gate scripts run on m02 from `/tmp/seaweed_block`, which is usually stale. Sync the
|
||||
phase tree first (details in [`QA-AGENT-RUNBOOK.md` §4](QA-AGENT-RUNBOOK.md)):
|
||||
|
||||
```bash
|
||||
KEY=/c/work/dev_server/testdev_key; M2=testdev@192.168.1.184; R=/c/work/seaweed_block
|
||||
ssh -i $KEY $M2 'mkdir -p /tmp/seaweed_block/scripts /tmp/seaweed_block/charts/seaweed-block/crds'
|
||||
scp -i $KEY $R/scripts/run-phaseNN-<slug>-gate.sh $M2:/tmp/seaweed_block/scripts/
|
||||
scp -i $KEY $R/charts/seaweed-block/crds/*.yaml $M2:/tmp/seaweed_block/charts/seaweed-block/crds/
|
||||
```
|
||||
|
||||
### Run
|
||||
|
||||
Run `swblock.exe` from a clean checkout at the reviewable commit and tag the run
|
||||
so the dashboard ties it to the commit:
|
||||
|
||||
```powershell
|
||||
C:\work\swblock.exe run -results-dir C:\work\seaweed_block\results `
|
||||
-env product_root=/tmp/seaweed_block `
|
||||
C:\work\seaweed_block\testops\scenarios\<gate>-chain.yaml
|
||||
```
|
||||
|
||||
For a release-smoke / helm scenario, also pass metadata (mirrors the RDMA
|
||||
`-meta`):
|
||||
|
||||
```text
|
||||
-meta project=block-qa -meta team=block -meta run_by=<qa-agent>
|
||||
-meta test_id=<gate> -meta branch=<branch> -meta commit=<sha>
|
||||
```
|
||||
|
||||
> Flags must come **before** the scenario path (Go stdlib flag parser). On Git
|
||||
> Bash, `MSYS_NO_PATHCONV=1` to keep `/tmp/...` values intact; PowerShell avoids it.
|
||||
|
||||
### What It Runs
|
||||
|
||||
The assigned gate. Block gates fall into two evidence shapes:
|
||||
|
||||
- **Correctness / boundary gates** (most phase gates): the gate script writes a
|
||||
`…-summary.txt` with `key=value` lines and a final `<gate>_status=ok`; the
|
||||
scenario `grep_log` + `save_as` + `assert_*` those into `result.json` `vars`.
|
||||
- **Functional / release gates** (helm first-volume, e2e, HA, v0.5 smoke): PVC
|
||||
writer/reader PASS, CSI→CR, finalizer add/release, operator-status
|
||||
`Ready=True/first_volume_verified`, zero-residue uninstall.
|
||||
|
||||
### Where To Watch
|
||||
|
||||
```text
|
||||
http://192.168.1.181:9099/?project=block-qa
|
||||
```
|
||||
|
||||
The dashboard re-scans on each load; the bundle appears under
|
||||
`/mnt/smb/work/share/testops/results/block-qa/<run-id>/`.
|
||||
|
||||
### Post-Run Provenance Assertion
|
||||
|
||||
Do this before writing ACCEPT. It proves the bundle tested the commit QA ran and
|
||||
that the gate's own terminal evidence passed.
|
||||
|
||||
> **Where the evidence lives (validated):** `result.json` `vars` holds the
|
||||
> scenario's **`save_as` outputs**, which for `grep_log` gates are **counts** —
|
||||
> `"1"` means the asserted line was present. So `EXPECT_VARS` uses the **save_as
|
||||
> names**, e.g. `phase54_rbac_ok=1`, **not** the literal `…_status=ok` line (that
|
||||
> line lives in the gate's `…-summary.txt` on SMB, not in the bundle). Leave
|
||||
> `EXPECT_VARS` empty for functional gates that assert entirely in-scenario.
|
||||
|
||||
```bash
|
||||
ssh testdev@192.168.1.184 # or m01; the bundle is on shared SMB
|
||||
|
||||
BUNDLE=/mnt/smb/work/share/testops/results/block-qa/<run-id>
|
||||
COMMIT='<reviewed-branch-or-sha>' # the value passed as -meta commit=<sha>
|
||||
EXPECT_VARS='phase54_rbac_ok=1,exec_target_status_allowed=1,exec_target_main_denied=1,default_target_status_denied=1'
|
||||
export BUNDLE COMMIT EXPECT_VARS
|
||||
|
||||
python3 - <<'PY'
|
||||
import json, os, pathlib
|
||||
b = pathlib.Path(os.environ['BUNDLE']); requested = os.environ['COMMIT']
|
||||
required = ['result.json','status.json','result.html','scenario.yaml','manifest.json']
|
||||
missing = [n for n in required if not (b/n).is_file()]
|
||||
if missing: raise SystemExit('missing bundle files: ' + ', '.join(missing))
|
||||
result = json.loads((b/'result.json').read_text())
|
||||
status = json.loads((b/'status.json').read_text())
|
||||
manifest = json.loads((b/'manifest.json').read_text())
|
||||
meta = manifest.get('metadata', {}) or {}
|
||||
vars = result.get('vars', {})
|
||||
gitsha = manifest.get('git_sha','')
|
||||
commit_ok = requested in (meta.get('commit',''), meta.get('branch',''), gitsha) \
|
||||
or (gitsha and gitsha.startswith(requested)) or (requested and requested.startswith(gitsha) if gitsha else False)
|
||||
checks = {
|
||||
'result.status': result.get('status') == 'PASS',
|
||||
'status.state': status.get('state') == 'pass',
|
||||
'commit_match': bool(commit_ok),
|
||||
}
|
||||
for ev in [e for e in os.environ.get('EXPECT_VARS','').split(',') if e]:
|
||||
k, _, want = ev.partition('=')
|
||||
checks['evidence:'+ev] = (str(vars.get(k)) == want)
|
||||
failed = [n for n, ok in checks.items() if not ok]
|
||||
if failed: raise SystemExit('failed checks: ' + ', '.join(failed))
|
||||
print('BLOCK_QA_BUNDLE_ASSERT_OK')
|
||||
print('scenario=' + manifest.get('scenario_name',''))
|
||||
print('commit=' + (meta.get('commit') or gitsha))
|
||||
print('git_sha=' + gitsha)
|
||||
print('run_id=' + manifest.get('run_id',''))
|
||||
PY
|
||||
```
|
||||
|
||||
> **`-meta commit=<sha>` is REQUIRED (validated).** A block bundle's
|
||||
> `manifest.git_sha` is the **runner-cwd** repo's HEAD (e.g. it was the
|
||||
> seaweedfs/learn repo, not seaweed_block, on an ad-hoc run) and `metadata` is
|
||||
> null unless you pass `-meta`. So `commit_match` is only meaningful if you pass
|
||||
> `-meta commit=<seaweed_block sha>` (and run `swblock` from a clean seaweed_block
|
||||
> checkout). For a branch, resolve it first: `git -C C:\work\seaweed_block
|
||||
> rev-parse <branch>` and pass that SHA.
|
||||
|
||||
### ACCEPT Criteria
|
||||
|
||||
ACCEPT only if:
|
||||
|
||||
1. The dashboard run is `pass` (`status.state == pass`, `result.status == PASS`).
|
||||
2. The bundle has `result.html` and the assertion prints
|
||||
`BLOCK_QA_BUNDLE_ASSERT_OK`.
|
||||
3. The tested commit is the reviewed branch/SHA (`commit_match`).
|
||||
4. The gate's terminal evidence is present (the `<gate>_status=ok` + boundary
|
||||
lines, or the functional asserts: PVC RW, CSI→CR, finalizer add/release,
|
||||
operator-status Ready, zero-residue).
|
||||
5. Any perf floors in a perf scenario pass.
|
||||
6. The lab is left clean (no leftover CRDs/release/PVC — see §4 / `QA-AGENT-RUNBOOK §8`).
|
||||
|
||||
Report:
|
||||
|
||||
```text
|
||||
Verdict: ACCEPT or REJECT (or PARTIAL — classify artifact/lab/product)
|
||||
scenario: <gate>-chain.yaml
|
||||
run: block-qa/<run-id>
|
||||
commit: <branch-or-sha>
|
||||
bundle: /mnt/smb/work/share/testops/results/block-qa/<run-id>
|
||||
dashboard: http://192.168.1.181:9099/?project=block-qa
|
||||
terminal evidence:
|
||||
<gate>_status=ok
|
||||
<key boundary / functional lines>
|
||||
perf rows (if perf gate):
|
||||
read_iops / write_iops / p99_ms / MiB/s ...
|
||||
first failure, if any: ...
|
||||
residue cleaned: <CRDs/none>
|
||||
not tested: ...
|
||||
```
|
||||
|
||||
## 2. Adhoc Dirty Debug — Local `sw-block` Build
|
||||
|
||||
Allowed for investigation, **not** PR/release evidence.
|
||||
|
||||
### Rules
|
||||
|
||||
- Must use `project=block-dev`, not `block-qa`.
|
||||
- Must mark metadata `dirty=true` and name the source/binary/image tested
|
||||
(e.g. `sw-block:local` built from an uncommitted tree).
|
||||
- Must **not** produce an ACCEPT verdict.
|
||||
- If the result matters, ask the dev to commit it and rerun the standard gate.
|
||||
|
||||
```powershell
|
||||
C:\work\swblock.exe run -results-dir C:\work\seaweed_block\results\block-dev `
|
||||
-env product_root=/tmp/seaweed_block `
|
||||
-meta project=block-dev -meta team=block -meta run_by=<qa-agent> `
|
||||
-meta test_id=adhoc-block-debug -meta branch=dirty-local -meta commit=dirty-local -meta dirty=true `
|
||||
C:\work\seaweed_block\testops\scenarios\<gate>-chain.yaml
|
||||
```
|
||||
|
||||
### Report Format
|
||||
|
||||
```text
|
||||
Verdict: DEBUG ONLY, not QA ACCEPT
|
||||
reason: dirty local source / uncommitted image
|
||||
source tested: <path / image tag>
|
||||
run: block-dev/<run-id>
|
||||
result: pass/fail
|
||||
finding: ...
|
||||
required next step: commit branch/SHA and rerun standard gate
|
||||
```
|
||||
|
||||
## 3. Deep Runbooks — Specialty Paths
|
||||
|
||||
Use a deep path only when a standard gate fails in/near it, or the dev asks for a
|
||||
focused root-cause run. They are expensive and narrow; do not start here for
|
||||
normal validation.
|
||||
|
||||
| Area | Deep path |
|
||||
| --- | --- |
|
||||
| SmartWAL corruption / recovery | `testops/scenarios/helm-smartwal-corrupt-restart-chain.yaml` + the phase34-d4 SmartWAL corrupt sign-offs |
|
||||
| iSCSI OS-initiator / ALUA MPIO | `scripts/run-iscsi-alua-*`, `run-iscsi-os-smoke.sh`; iscsi-p6 ALUA sign-offs |
|
||||
| NVMe OS / multipath | `scripts/run-nvme-*-smoke.sh`, `run-nvme-multipath-smoke.sh`; nvme-p4 sign-offs |
|
||||
| Helm support bundle | `testops/scenarios/helm-support-bundle-diagnostics-chain.yaml`, `scripts/collect-helm-support-bundle.sh` |
|
||||
| Cleanup / residue | `scripts/verify-helm-cleanup.sh` (`cleanup_status=ok`), `testops/scenarios/cleanup-residue-chain.yaml` |
|
||||
|
||||
## 4. Failure Handling
|
||||
|
||||
When a standard gate fails:
|
||||
|
||||
1. Open `result.html`; find the first failed phase/action.
|
||||
2. Check the action output + `artifacts/` + the gate `…-summary.txt`.
|
||||
3. Check `kubectl`/pod logs only if the bundle is missing/incomplete.
|
||||
4. Do **not** delete the failed bundle; do **not** rerun-until-green without
|
||||
explaining the first failure.
|
||||
|
||||
Classify:
|
||||
|
||||
| Failure Type | Next Step |
|
||||
| --- | --- |
|
||||
| **Image / artifact** (e.g. published image missing a new flag — the Phase 40 D6 class) | Send back to releng; do **not** call it a product bug. Re-run on a fresh build. |
|
||||
| Build/link | Send back to dev with compiler output |
|
||||
| Scenario bug | Fix the TestOps scenario, rerun |
|
||||
| Perf regression | Compare iops/latency/throughput rows against the last accepted run |
|
||||
| Correctness (PVC RW, CSI→CR, finalizer, operator-status, SHA) | Use a deep runbook or add a focused scenario |
|
||||
| **Lab / environment** | `product_root` stale, CRD residue, m02 disk > ~85% (k3s GCs `:local`), VAP propagation lag → mark infra-blocked with host/log evidence |
|
||||
|
||||
A **PARTIAL** verdict must say which of these it is (artifact / lab / product).
|
||||
Only **product** blocks the phase; artifact/lab are fixed and re-run.
|
||||
|
||||
## 5. Non-Claims
|
||||
|
||||
A green standard gate does **not** prove:
|
||||
|
||||
- multi-node failover / replica-policy behavior beyond the scenario's scope;
|
||||
- long soak / restart-persistence stability (use the HA / restart-persistence
|
||||
chains);
|
||||
- every iSCSI/NVMe OS-initiator combination (deep runbooks cover those);
|
||||
- production performance under real workloads (perf gates are fixed shapes);
|
||||
- backup / NVMe / rebuild surfaces that are still deferred.
|
||||
|
||||
If one of those is the claim under review, ask for a focused scenario.
|
||||
|
||||
## 6. QA Feedback Requested
|
||||
|
||||
When reviewing this v1 runbook, please answer:
|
||||
|
||||
1. Is the standard-gate path clear enough to run without asking the dev which
|
||||
scenario/image to use?
|
||||
2. Is the `block-qa` vs `block-dev` (accept vs debug) boundary strict enough?
|
||||
3. Does the provenance assertion's `EXPECT_VARS` mechanism cover both the
|
||||
correctness/boundary gates and the functional/release gates, or should
|
||||
functional gates get their own assertion keys?
|
||||
4. Should the block provenance assertion ship as a committed
|
||||
`scripts/block-qa-assert.sh <run-id> <commit> [EXPECT_VARS]` (so QA does not
|
||||
paste python)?
|
||||
-145
@@ -1,145 +0,0 @@
|
||||
# QA Assignment: CSI RF=1 Durable Blockvolume Restart Validation
|
||||
|
||||
Status: ready for QA repeatability validation after dev run
|
||||
`20260512-211604-1339` passed at product commit `e90ce49`.
|
||||
Branch: `docs/post-merge-plan`.
|
||||
|
||||
Scope: prove a single-replica dynamic PVC survives a generated `blockvolume`
|
||||
pod restart when the launcher renders durable host state, and prove the
|
||||
operator can read the post-restart durable state through `sw-block ops
|
||||
inventory` and nested `sw-block ops status` bundles.
|
||||
|
||||
## Preconditions
|
||||
|
||||
- Host: M02 k3s lab or equivalent single-node Kubernetes lab.
|
||||
- Required host tools:
|
||||
- `kubectl`,
|
||||
- Docker image build/load path for `sw-block:local` and
|
||||
`sw-block-csi:local`,
|
||||
- iSCSI initiator tools for the default protocol path.
|
||||
- Build and import fresh alpha images before running, preferably through the
|
||||
existing pin-build/TestOps path.
|
||||
- This gate must run with durable generated workload state:
|
||||
|
||||
```bash
|
||||
export SW_BLOCK_LAUNCHER_STATE_HOSTPATH=/var/lib/sw-block/testops-${RUN_ID}
|
||||
```
|
||||
|
||||
Do not mark the gate green if the generated `blockvolume` manifest still uses
|
||||
`emptyDir` for the state volume. Use a run-scoped hostPath under
|
||||
`/var/lib/sw-block/testops-*` so repeat runs do not reuse stale durable roots.
|
||||
|
||||
## Test 1: RF=1 Dynamic PVC Survives Blockvolume Restart
|
||||
|
||||
Script command:
|
||||
|
||||
```bash
|
||||
RUN_ID="$(date -u +%Y%m%dT%H%M%SZ)-csi-rf1-blockvolume-restart"
|
||||
SW_BLOCK_ALPHA_IMAGES_ENV="/path/to/pin-build/alpha-images.env" \
|
||||
SW_BLOCK_ARTIFACT_DIR="/mnt/smb/work/share/g15d-k8s/${RUN_ID}" \
|
||||
SW_BLOCK_LAUNCHER_STATE_HOSTPATH="/var/lib/sw-block/testops-${RUN_ID}" \
|
||||
bash scripts/run-k8s-blockvolume-restart.sh "$PWD"
|
||||
```
|
||||
|
||||
Expected:
|
||||
|
||||
- `run.log` contains:
|
||||
- `launcher_state_hostpath=/var/lib/sw-block/testops-${RUN_ID}`,
|
||||
- `restart_blockvolume_before_reader=1`,
|
||||
- `collect_inventory_after_restart=1`,
|
||||
- `demo-app-pvc-writer-hold-root.yaml`,
|
||||
- `delete writer pod but keep PVC`,
|
||||
- `restart generated blockvolume Deployment before replacing the app pod`,
|
||||
- `start reader pod on the same PVC`,
|
||||
- final line:
|
||||
`[app-demo] PASS: app pod wrote data, replacement app pod read it back through the same PVC, cleanup complete`.
|
||||
- `block-stack.rendered.yaml` contains:
|
||||
- `--launcher-state-hostpath=/var/lib/sw-block/testops-${RUN_ID}`.
|
||||
- `generated-blockvolume.yaml` contains:
|
||||
- `hostPath:`,
|
||||
- `path: /var/lib/sw-block/testops-${RUN_ID}`,
|
||||
- `type: DirectoryOrCreate`,
|
||||
- no `emptyDir:` under the generated `state` volume,
|
||||
- `--durable-root=/var/lib/sw-block/<volume>/<replica>`.
|
||||
- `writer.log` contains:
|
||||
- `[app-writer] wrote and verified /data/demo.bin`.
|
||||
- `iscsi-sessions.before-blockvolume-restart.txt` exists and contains no
|
||||
`iqn.2026-05.io.seaweedfs` session. This proves the writer pod unmounted and
|
||||
CSI logged out before the `blockvolume` process restart.
|
||||
- `restart-blockvolume-status.log` shows the generated `blockvolume`
|
||||
Deployment completed rollout after the writer checksum.
|
||||
- `blockvolume-pod-ids.before-restart.tsv` and
|
||||
`blockvolume-pod-ids.after-restart.tsv` are both non-empty and contain
|
||||
different pod UIDs. This proves the serving `blockvolume` pod was replaced.
|
||||
- `lifecycle-volumes.after-blockvolume-restart.json` exists and still contains
|
||||
the PVC volume spec with `protocol: "iscsi"`.
|
||||
- `reader.log` contains:
|
||||
- `/data/demo.bin: OK`.
|
||||
- `reader.describe.before-delete.txt` shows:
|
||||
- `Status: Succeeded`,
|
||||
- `SuccessfulAttachVolume`.
|
||||
- `blockvolume-generated.after-restart.log` contains:
|
||||
- `phase":"iscsi-listening"`,
|
||||
- `durable primary lineage ensured`.
|
||||
Together with the reader checksum, this proves the restarted target recovered
|
||||
and the replacement reader pod reattached/read after restart. Do not require a
|
||||
live iSCSI session after the one-shot reader exits; Kubernetes may unstage and
|
||||
logout immediately after the pod reaches `Succeeded`.
|
||||
- `ops-inventory-after-restart/volume-inventory-summary.txt` exists and
|
||||
contains:
|
||||
- a `volume:` row for `pvc=sw-block-demo-pvc`,
|
||||
- `protocols=iscsi`,
|
||||
- a `replica:` row with `lifecycle_owner=pvc-owner-ref
|
||||
owner_ref=PersistentVolumeClaim/default/sw-block-demo-pvc`,
|
||||
- `support_bundle=volumes/<volume>/<replica>`.
|
||||
- `ops-inventory-after-restart/nested-ops-status-bundles.json` contains:
|
||||
- `"command": "sw-block ops status"`.
|
||||
- At least one nested
|
||||
`ops-inventory-after-restart/volumes/<volume>/<replica>/volume-status-summary.txt`
|
||||
contains:
|
||||
- `durable_entry:`,
|
||||
- `latched=true`,
|
||||
- `operational=true`.
|
||||
- Cleanup:
|
||||
- no generated `sw-blockvolume` Deployment remains,
|
||||
- demo PVC is gone,
|
||||
- no `iqn.2026-05.io.seaweedfs` iSCSI session remains.
|
||||
- the run-scoped hostPath `/var/lib/sw-block/testops-${RUN_ID}` is gone.
|
||||
|
||||
## What This Proves
|
||||
|
||||
- The launcher can render durable generated workload state for a dynamic PVC.
|
||||
- A generated `blockvolume` pod can restart and recover the same durable root.
|
||||
- `blockmaster` remains in the loop: the restarted workload must re-observe and
|
||||
keep enough lifecycle/frontend state for CSI to rediscover and reattach.
|
||||
- A replacement app pod can read data written before the restart.
|
||||
- Inventory maps the restarted PVC to its generated workload and support
|
||||
bundle.
|
||||
- The nested status bundle shows the durable entry is latched and operational
|
||||
after restart.
|
||||
|
||||
## What This Does Not Prove
|
||||
|
||||
- No RF=2/RF=3 promotion or returned-replica catch-up claim.
|
||||
- No node reboot claim.
|
||||
- No multi-node scheduling claim.
|
||||
- No production storage claim for `hostPath`.
|
||||
- No NVMe multipath claim.
|
||||
|
||||
## Report Format
|
||||
|
||||
QA should report:
|
||||
|
||||
- branch and commit SHA,
|
||||
- host and kernel,
|
||||
- exact command,
|
||||
- result,
|
||||
- artifact path,
|
||||
- final PASS line,
|
||||
- generated manifest state-volume evidence,
|
||||
- writer and reader checksum lines,
|
||||
- blockvolume rollout evidence,
|
||||
- master/lifecycle evidence after restart,
|
||||
- inventory summary and nested status durable-entry evidence,
|
||||
- cleanup state,
|
||||
- any CSI, kubelet, iSCSI, or blockvolume errors.
|
||||
@@ -1,209 +0,0 @@
|
||||
# QA Assignment: iSCSI P2/P3 Lab Validation
|
||||
|
||||
Status: QA green.
|
||||
|
||||
Branch under test: `iscsi/frontend-completeness`.
|
||||
Verified commit: `e7c95ee44863f34b304995fa977a4ff57ab3e649`.
|
||||
Host: M02 (lab address redacted).
|
||||
|
||||
Purpose: validate the local iSCSI P2/P3 test/tooling work on a real Linux/K8s
|
||||
lab. This is not a performance claim and not a failover claim.
|
||||
|
||||
## Scope
|
||||
|
||||
- #QA iSCSI P2 OS initiator repeat loop.
|
||||
- #QA iSCSI P2 OS initiator fio mode.
|
||||
- #QA iSCSI P3 Kubernetes fio smoke.
|
||||
- #QA iSCSI P3 Kubernetes attach/detach loop.
|
||||
|
||||
## Preconditions
|
||||
|
||||
- Lab host: M02 unless QA states otherwise.
|
||||
- Linux host has `sudo`, `iscsiadm`, `mkfs.ext4`, `mount`, `sha256sum`.
|
||||
- K8s tests need working k3s/kubectl and privileged CSI node support.
|
||||
- Images for K8s tests are either local:
|
||||
- `sw-block:local`
|
||||
- `sw-block-csi:local`
|
||||
- Or QA explicitly records the GHCR image tags/digests used.
|
||||
|
||||
## Test 1: OS Initiator Repeat Loop
|
||||
|
||||
- Result: PASS.
|
||||
- Artifact:
|
||||
`[artifact-root]/20260505T062122Z-iscsi-p2-test1-os-repeat`.
|
||||
- Final line:
|
||||
`[iscsi-os] PASS: 5 x iscsiadm mkfs mount write/read logout`.
|
||||
- Cleanup: `iscsi-sessions.final.txt` reports no active sessions.
|
||||
- `expected Data-Out` errors in `blockvolume.log`: 0.
|
||||
|
||||
- Command:
|
||||
|
||||
```bash
|
||||
SW_BLOCK_ISCSI_ITERATIONS=5 \
|
||||
SW_BLOCK_ISCSI_STRESS=dd \
|
||||
bash scripts/run-iscsi-os-smoke.sh "$PWD"
|
||||
```
|
||||
|
||||
- Pass criteria:
|
||||
- all 5 iterations pass,
|
||||
- every iteration logs discovery, login, mkfs, mount, checksum, logout,
|
||||
- `iscsi-sessions.final.txt` reports no active sessions,
|
||||
- no `expected Data-Out` session error in `blockvolume.log`.
|
||||
|
||||
- Required report:
|
||||
- branch and commit,
|
||||
- host,
|
||||
- command,
|
||||
- artifact dir,
|
||||
- final PASS line,
|
||||
- cleanup state.
|
||||
|
||||
## Test 2: OS Initiator fio Mode
|
||||
|
||||
- Result: PASS.
|
||||
- Artifact:
|
||||
`[artifact-root]/20260505T062159Z-iscsi-p2-test2-os-fio60s`.
|
||||
- fio summary:
|
||||
- read IOPS=122, BW=490KiB/s,
|
||||
- write IOPS=123, BW=494KiB/s,
|
||||
- runtime=60.004s,
|
||||
- err=0,
|
||||
- `fio.iter1.log` present.
|
||||
- Cleanup: `iscsi-sessions.final.txt` reports no active sessions.
|
||||
- `expected Data-Out` errors in `blockvolume.log`: 0.
|
||||
|
||||
- Command:
|
||||
|
||||
```bash
|
||||
SW_BLOCK_ISCSI_ITERATIONS=1 \
|
||||
SW_BLOCK_ISCSI_STRESS=fio \
|
||||
SW_BLOCK_ISCSI_FIO_RUNTIME=60 \
|
||||
bash scripts/run-iscsi-os-smoke.sh "$PWD"
|
||||
```
|
||||
|
||||
- Pass criteria:
|
||||
- fio completes,
|
||||
- `fio.iter1.log` exists,
|
||||
- logout succeeds,
|
||||
- no active iSCSI sessions after cleanup,
|
||||
- no session errors in `blockvolume.log`.
|
||||
|
||||
## Test 3: Kubernetes fio Smoke
|
||||
|
||||
- Result: PASS.
|
||||
- Artifact:
|
||||
`[artifact-root]/20260505T062334Z-iscsi-p3-test3-k8s-fio`.
|
||||
- Pod evidence:
|
||||
- `pod.log` shows Alpine `apk` install of fio,
|
||||
- 60s randrw run,
|
||||
- READ BW=13.0MiB/s, 782MiB total,
|
||||
- WRITE BW=13.1MiB/s, 787MiB total,
|
||||
- err=0,
|
||||
- util=96.36%.
|
||||
- Final line:
|
||||
`[alpha-fio] PASS: dynamic PVC create/delete completed checksum write/read and cleanup`.
|
||||
- Cleanup: no PVC, no sw-block deployments, no active iSCSI sessions.
|
||||
|
||||
- Command:
|
||||
|
||||
```bash
|
||||
bash scripts/run-k8s-alpha-fio.sh "$PWD"
|
||||
```
|
||||
|
||||
- Pass criteria:
|
||||
- pod reaches `Succeeded`,
|
||||
- `pod.log` contains fio output,
|
||||
- generated blockvolume Deployment is cleaned,
|
||||
- no active iSCSI sessions after delete,
|
||||
- no K8s residue for `sw-block`.
|
||||
|
||||
- Notes:
|
||||
- This test uses `alpine:3.20` and installs fio with `apk`.
|
||||
- If pod egress is blocked, report it as environment failure, not product
|
||||
failure.
|
||||
|
||||
## Test 4: Kubernetes Attach/Detach Loop
|
||||
|
||||
- Result: PASS.
|
||||
- Artifact:
|
||||
`[artifact-root]/20260505T062606Z-iscsi-p3-test4-attach-detach`.
|
||||
- Iterations:
|
||||
- iter-1 PASS: writer wrote and verified `/data/demo.bin`; reader read-back OK; no active iSCSI sessions after delete.
|
||||
- iter-2 PASS: same.
|
||||
- iter-3 PASS: same.
|
||||
- Final line:
|
||||
`[attach-loop] PASS: 3 attach/detach app PVC cycles completed`.
|
||||
- Cleanup: no PVC, no sw-block deployments, no active iSCSI sessions.
|
||||
|
||||
- Command:
|
||||
|
||||
```bash
|
||||
SW_BLOCK_ATTACH_DETACH_ITERATIONS=3 \
|
||||
bash scripts/run-k8s-attach-detach-loop.sh "$PWD"
|
||||
```
|
||||
|
||||
- Pass criteria:
|
||||
- all iterations pass,
|
||||
- each iteration has writer and reader logs,
|
||||
- each reader verifies data written by its writer,
|
||||
- every iteration has no active iSCSI session after delete,
|
||||
- final summary line reports PASS.
|
||||
|
||||
## Failure Handling
|
||||
|
||||
- Preserve artifact directories.
|
||||
- Do not rerun over a failed artifact directory.
|
||||
- If a script cannot collect required evidence, report the script gap and stop.
|
||||
- Do not replace the script with manual commands unless needed for first
|
||||
diagnosis.
|
||||
|
||||
## QA Report Template
|
||||
|
||||
```text
|
||||
QA Assignment: iSCSI P2/P3 Lab Validation
|
||||
Branch:
|
||||
Commit:
|
||||
Host:
|
||||
|
||||
Test 1 OS repeat:
|
||||
result:
|
||||
command:
|
||||
artifact:
|
||||
final line:
|
||||
cleanup:
|
||||
|
||||
Test 2 OS fio:
|
||||
result:
|
||||
command:
|
||||
artifact:
|
||||
fio summary:
|
||||
cleanup:
|
||||
|
||||
Test 3 K8s fio:
|
||||
result:
|
||||
command:
|
||||
artifact:
|
||||
pod evidence:
|
||||
cleanup:
|
||||
|
||||
Test 4 K8s attach/detach:
|
||||
result:
|
||||
command:
|
||||
artifact:
|
||||
iterations:
|
||||
cleanup:
|
||||
|
||||
Findings:
|
||||
- ...
|
||||
```
|
||||
|
||||
## Lab Notes
|
||||
|
||||
- M02 initially had no Go installation.
|
||||
- QA installed Go 1.25.0 to `/usr/local/go` and symlinked
|
||||
`/usr/local/bin/go`.
|
||||
- K8s tests used locally rebuilt images:
|
||||
- `sw-block:local` sha256 `dcb621e4447a`,
|
||||
- `sw-block-csi:local` sha256 `84fab78dc05a`.
|
||||
- No GHCR images were used.
|
||||
- Test 3 requires pod network egress for `apk add fio`; M02 had egress.
|
||||
@@ -1,115 +0,0 @@
|
||||
# QA Assignment: iSCSI P4 CHAP Lab Validation
|
||||
|
||||
Status: ready for QA.
|
||||
Branch: `iscsi/frontend-completeness`.
|
||||
Scope: target-side CHAP login auth through the real Linux `iscsiadm`
|
||||
initiator. No Kubernetes Secret or CSI CHAP claim in this assignment.
|
||||
|
||||
Dev preflight:
|
||||
|
||||
- commit: `d0c62e6`
|
||||
- host: M02 or equivalent Linux lab host
|
||||
- command: Test 2 below
|
||||
- artifact:
|
||||
`[artifact-root]/20260505T072921Z-iscsi-p4-chap`
|
||||
- result: PASS, including wrong-secret failure, correct-secret login,
|
||||
`mkfs.ext4`, mount, checksum, 32 MiB dd, logout, and no active sessions.
|
||||
|
||||
## Preconditions
|
||||
|
||||
- Host: M02 or equivalent Linux host with `sudo`, `iscsiadm`, `mkfs.ext4`,
|
||||
`mount`, `sha256sum`, and optional `fio`.
|
||||
- Worktree: local `seaweed-block` checkout on branch `iscsi/frontend-completeness`,
|
||||
or archived copy of the same commit on the Linux host.
|
||||
- Lab must start clean:
|
||||
- `sudo iscsiadm -m session` reports no active sessions, or only unrelated
|
||||
sessions explicitly noted.
|
||||
- no stale `blockmaster` / `blockvolume` from prior runs.
|
||||
|
||||
## Test 1: Default Non-CHAP Regression
|
||||
|
||||
Command:
|
||||
|
||||
```bash
|
||||
RUN_ID="$(date -u +%Y%m%dT%H%M%SZ)-iscsi-p4-default" \
|
||||
SW_BLOCK_ISCSI_ITERATIONS=1 \
|
||||
SW_BLOCK_ISCSI_STRESS=dd \
|
||||
bash scripts/run-iscsi-os-smoke.sh "$PWD"
|
||||
```
|
||||
|
||||
Expected:
|
||||
|
||||
- final line contains:
|
||||
`[iscsi-os] PASS: 1 x iscsiadm mkfs mount write/read logout`
|
||||
- `iscsi-sessions.final.txt` reports no active sessions.
|
||||
- no `expected Data-Out` session errors in `blockvolume.log`.
|
||||
|
||||
## Test 2: CHAP Positive + Negative Login
|
||||
|
||||
Command:
|
||||
|
||||
```bash
|
||||
RUN_ID="$(date -u +%Y%m%dT%H%M%SZ)-iscsi-p4-chap" \
|
||||
SW_BLOCK_ISCSI_ITERATIONS=1 \
|
||||
SW_BLOCK_ISCSI_STRESS=dd \
|
||||
SW_BLOCK_ISCSI_CHAP_USERNAME=swchap \
|
||||
SW_BLOCK_ISCSI_CHAP_SECRET=swchap-secret \
|
||||
SW_BLOCK_ISCSI_CHAP_BAD_SECRET=wrong-secret \
|
||||
bash scripts/run-iscsi-os-smoke.sh "$PWD"
|
||||
```
|
||||
|
||||
Expected:
|
||||
|
||||
- run log includes `chap=enabled username=swchap`.
|
||||
- run log includes `verify wrong CHAP secret fails`.
|
||||
- `login-bad.iter1.log` exists and shows the wrong-secret login failed.
|
||||
- `iscsi-sessions.bad-auth.iter1.txt` does not show an established session
|
||||
for this IQN.
|
||||
- the following correct-secret login succeeds.
|
||||
- final line contains:
|
||||
`[iscsi-os] PASS: 1 x iscsiadm mkfs mount write/read logout`
|
||||
- `iscsi-sessions.final.txt` reports no active sessions.
|
||||
- no `expected Data-Out` session errors in `blockvolume.log`.
|
||||
|
||||
## Test 3: Optional CHAP fio
|
||||
|
||||
Run this only if Test 2 is green and the host has `fio`.
|
||||
|
||||
```bash
|
||||
RUN_ID="$(date -u +%Y%m%dT%H%M%SZ)-iscsi-p4-chap-fio" \
|
||||
SW_BLOCK_ISCSI_ITERATIONS=1 \
|
||||
SW_BLOCK_ISCSI_STRESS=fio \
|
||||
SW_BLOCK_ISCSI_FIO_RUNTIME=60 \
|
||||
SW_BLOCK_ISCSI_CHAP_USERNAME=swchap \
|
||||
SW_BLOCK_ISCSI_CHAP_SECRET=swchap-secret \
|
||||
SW_BLOCK_ISCSI_CHAP_BAD_SECRET=wrong-secret \
|
||||
bash scripts/run-iscsi-os-smoke.sh "$PWD"
|
||||
```
|
||||
|
||||
Expected:
|
||||
|
||||
- fio exits with `err=0`.
|
||||
- final line contains PASS.
|
||||
- no active sessions after cleanup.
|
||||
|
||||
## Report Format
|
||||
|
||||
QA should report:
|
||||
|
||||
- branch and commit SHA,
|
||||
- host and kernel,
|
||||
- exact commands,
|
||||
- result for each test,
|
||||
- artifact path for each run,
|
||||
- final PASS line,
|
||||
- `login-bad.iter1.log` result for Test 2,
|
||||
- `iscsi-sessions.final.txt`,
|
||||
- count of `expected Data-Out` in `blockvolume.log`,
|
||||
- any host setup changes, such as installing `open-iscsi` or `fio`.
|
||||
|
||||
## Non-Claims
|
||||
|
||||
- No Kubernetes Secret integration.
|
||||
- No CSI publish_context CHAP secret transport.
|
||||
- No CHAP mutual authentication.
|
||||
- No ALUA, MPIO, NVMe, or mounted failover claim.
|
||||
@@ -1,100 +0,0 @@
|
||||
# QA Assignment: iSCSI P4 K8s CHAP Validation
|
||||
|
||||
Status: ready for QA.
|
||||
Branch: `iscsi/frontend-completeness`.
|
||||
Scope: Kubernetes dynamic PVC path with target-side CHAP enabled through a
|
||||
Kubernetes Secret and CSI `NodeStage` secrets.
|
||||
|
||||
## What This Verifies
|
||||
|
||||
- The alpha runner creates a Kubernetes Secret when CHAP env vars are set.
|
||||
- The generated `blockvolume` Deployment references that Secret and starts the
|
||||
iSCSI target with CHAP enabled.
|
||||
- The StorageClass carries `csi.storage.k8s.io/node-stage-secret-*` refs.
|
||||
- The CSI node configures `iscsiadm` CHAP before login.
|
||||
- The pod writes and reads through the mounted PVC.
|
||||
- Cleanup leaves no iSCSI session, PVC, pod, or generated blockvolume
|
||||
Deployment.
|
||||
|
||||
## Preconditions
|
||||
|
||||
- Host: M02 or equivalent Linux Kubernetes node with k3s/kubectl, Docker,
|
||||
`iscsiadm`, and loadable `iscsi_tcp`.
|
||||
- Worktree: `iscsi/frontend-completeness` at or after the commit containing
|
||||
K8s CHAP wiring.
|
||||
- Build local images from the same worktree before the run:
|
||||
|
||||
```bash
|
||||
bash scripts/build-alpha-images.sh "$PWD"
|
||||
```
|
||||
|
||||
## Test 1: Default Non-CHAP Regression
|
||||
|
||||
Run first to prove the default alpha path still works.
|
||||
|
||||
```bash
|
||||
RUN_ID="$(date -u +%Y%m%dT%H%M%SZ)-iscsi-p4-k8s-default"
|
||||
SW_BLOCK_ARTIFACT_DIR="/tmp/sw-block-artifacts/$RUN_ID" \
|
||||
bash scripts/run-k8s-alpha.sh "$PWD"
|
||||
```
|
||||
|
||||
Expected:
|
||||
|
||||
- final line contains:
|
||||
`[alpha] PASS: dynamic PVC create/delete completed checksum write/read and cleanup`
|
||||
- `generated-blockvolume.yaml` does not contain `--iscsi-chap-`.
|
||||
- `iscsi-sessions.after-delete.txt` reports no active sessions.
|
||||
- no generated `sw-blockvolume` Deployment remains.
|
||||
|
||||
## Test 2: K8s CHAP Dynamic PVC
|
||||
|
||||
```bash
|
||||
RUN_ID="$(date -u +%Y%m%dT%H%M%SZ)-iscsi-p4-k8s-chap"
|
||||
SW_BLOCK_ARTIFACT_DIR="/tmp/sw-block-artifacts/$RUN_ID" \
|
||||
SW_BLOCK_ISCSI_CHAP_USERNAME=swchap \
|
||||
SW_BLOCK_ISCSI_CHAP_SECRET=swchap-secret \
|
||||
bash scripts/run-k8s-alpha.sh "$PWD"
|
||||
```
|
||||
|
||||
Expected:
|
||||
|
||||
- run log includes `chap_enabled=1`.
|
||||
- `dynamic-pvc-pod.rendered.yaml` contains:
|
||||
- `csi.storage.k8s.io/node-stage-secret-name`,
|
||||
- `csi.storage.k8s.io/node-stage-secret-namespace`.
|
||||
- `generated-blockvolume.yaml` does not contain `--iscsi-chap-`.
|
||||
- `generated-blockvolume.yaml` contains:
|
||||
- `secretKeyRef`,
|
||||
- `SW_BLOCK_ISCSI_CHAP_USERNAME`,
|
||||
- `SW_BLOCK_ISCSI_CHAP_SECRET`,
|
||||
- `chapUsername`,
|
||||
- `chapSecret`.
|
||||
- pod log contains `/data/payload.bin: OK`.
|
||||
- final line contains:
|
||||
`[alpha] PASS: dynamic PVC create/delete completed checksum write/read and cleanup`.
|
||||
- `iscsi-sessions.after-delete.txt` reports no active sessions.
|
||||
- no generated `sw-blockvolume` Deployment remains.
|
||||
|
||||
## Report Format
|
||||
|
||||
QA should report:
|
||||
|
||||
- branch and commit SHA,
|
||||
- host and kernel,
|
||||
- exact commands,
|
||||
- result for each test,
|
||||
- artifact path for each run,
|
||||
- final PASS line,
|
||||
- snippets proving StorageClass secret refs and generated Deployment
|
||||
`secretKeyRef`,
|
||||
- `blockcsi-controller.log` error count for `chap`,
|
||||
- `blockvolume-generated.log` auth/session errors if any,
|
||||
- cleanup state.
|
||||
|
||||
## Non-Claims
|
||||
|
||||
- No CHAP mutual authentication.
|
||||
- No Kubernetes Secret rotation.
|
||||
- No per-volume user management beyond the single Secret used in this alpha
|
||||
run.
|
||||
- No ALUA, MPIO, NVMe, or mounted failover claim.
|
||||
+1
-1
@@ -9,7 +9,7 @@ then replacement app pod reads the same PVC.
|
||||
## QA Result
|
||||
|
||||
- Result: PASS.
|
||||
- Host: M02 or equivalent Linux Kubernetes lab node.
|
||||
- Host: node-b or equivalent Linux Kubernetes lab node.
|
||||
- Artifact:
|
||||
`[artifact-root]/20260505T231321Z-iscsi-p5-csi-node-restart`.
|
||||
- Final line:
|
||||
|
||||
@@ -1,197 +0,0 @@
|
||||
# QA Assignment: iSCSI P6 ALUA / MPIO Lab Validation
|
||||
|
||||
Status: Test 1B and Test 2 QA green.
|
||||
Branch: `iscsi/csi-node-lifecycle`.
|
||||
Scope: real Linux initiator validation for ALUA/MPIO and mounted failover.
|
||||
|
||||
## Preconditions
|
||||
|
||||
- Linux initiator host with:
|
||||
- `open-iscsi`,
|
||||
- `multipath-tools`,
|
||||
- `sg3_utils` or equivalent tools for `sg_inq` and `sg_rtpg`,
|
||||
- `mkfs.ext4`,
|
||||
- `mount`,
|
||||
- `fio` or `dd`,
|
||||
- sudo access.
|
||||
- Target host or Kubernetes lab capable of exposing two iSCSI paths for the
|
||||
same volume.
|
||||
- P6-B/P6-C implementation must be present before execution.
|
||||
|
||||
## Test 1: ALUA Discovery And Active Path Identity
|
||||
|
||||
Status: ready.
|
||||
|
||||
Run:
|
||||
|
||||
```bash
|
||||
RUN_ID="$(date -u +%Y%m%dT%H%M%SZ)-iscsi-p6-alua-active"
|
||||
SW_BLOCK_ARTIFACT_DIR="/mnt/smb/work/share/g15d-k8s/${RUN_ID}" \
|
||||
bash scripts/run-iscsi-alua-os-smoke.sh "$PWD"
|
||||
```
|
||||
|
||||
Expected:
|
||||
|
||||
- initiator discovers and logs into the V3 iSCSI target.
|
||||
- standard INQUIRY shows TPGS enabled.
|
||||
- VPD 0x00 still advertises only implemented pages.
|
||||
- VPD 0x83 identity is stable and path-distinguishing:
|
||||
- NAA is present,
|
||||
- target port group and relative target port descriptors are present.
|
||||
- REPORT TARGET PORT GROUPS returns active/optimized for the current path.
|
||||
- `mkfs.ext4`, mount, checksum write/read, logout, and cleanup succeed.
|
||||
- final `iscsiadm -m session` shows no active sw-block session.
|
||||
|
||||
Evidence to collect:
|
||||
|
||||
- `iscsiadm -m discovery` output.
|
||||
- `iscsiadm -m session -P 3` output.
|
||||
- `sg_inq <device>` standard INQUIRY output.
|
||||
- `sg_inq -p 0x00 <device>` supported VPD pages.
|
||||
- `sg_inq -p 0x83 <device>` device identification.
|
||||
- `sg_rtpg <device>` or equivalent REPORT TARGET PORT GROUPS output.
|
||||
- checksum output.
|
||||
- final session cleanup.
|
||||
|
||||
Non-claim:
|
||||
|
||||
- Test 1 does not prove Linux `multipathd` grouping yet.
|
||||
- Test 1 does not prove standby path login or mounted failover yet.
|
||||
|
||||
## Test 1B: Two-Path Multipath Identity
|
||||
|
||||
Status: PASS on `iscsi/csi-node-lifecycle@88e9301`.
|
||||
|
||||
Run:
|
||||
|
||||
```bash
|
||||
RUN_ID="$(date -u +%Y%m%dT%H%M%SZ)-iscsi-p6-alua-mpath" \
|
||||
SW_BLOCK_ARTIFACT_DIR="/mnt/smb/work/share/g15d-k8s/${RUN_ID}" \
|
||||
bash scripts/run-iscsi-alua-multipath-smoke.sh "$PWD"
|
||||
```
|
||||
|
||||
Expected:
|
||||
|
||||
- initiator discovers two target paths for one volume.
|
||||
- `multipath -ll` shows one logical device.
|
||||
- standard INQUIRY / VPD 0x83 / REPORT TARGET PORT GROUPS can be queried
|
||||
through both paths.
|
||||
- one path reports active/optimized.
|
||||
- one path reports standby.
|
||||
- VPD 0x83 exposes volume identity plus target-port identity for each path.
|
||||
- standby path does not accept normal WRITE as GOOD.
|
||||
- cleanup leaves no sw-block iSCSI sessions.
|
||||
|
||||
QA evidence:
|
||||
|
||||
- host: M02, Ubuntu 24.04.3 LTS, kernel 6.17.0-22-generic.
|
||||
- artifact:
|
||||
`/mnt/smb/work/share/g15d-k8s/20260506T093732Z-iscsi-p6-alua-mpath-fix`.
|
||||
- final line:
|
||||
`[iscsi-mpath] PASS: two iSCSI paths report ALUA and multipath groups one logical device`.
|
||||
- wire proof:
|
||||
- common NAA: `36bfc269594ef6492`.
|
||||
- r1: TPG `0x9866`, RTP `0x6b22`, AAS `0x00`.
|
||||
- r2: TPG `0xf866`, RTP `0xdff0`, AAS `0x02`.
|
||||
- `multipath -ll`: `mpatha` contains both `sda` and `sdb` with
|
||||
`hwhandler='1 alua'`.
|
||||
- standby path raw WRITE returned I/O error.
|
||||
- cleanup left no active iSCSI sessions.
|
||||
|
||||
Evidence to collect:
|
||||
|
||||
- two-path `iscsiadm -m session -P 3`.
|
||||
- `multipath -ll`.
|
||||
- `sg_inq -p 0x83` from each path.
|
||||
- `sg_rtpg` from each path.
|
||||
- standby write rejection evidence.
|
||||
- final `iscsiadm -m session`.
|
||||
|
||||
Non-claim:
|
||||
|
||||
- Test 1B does not prove mounted workload failover.
|
||||
- Test 1B does not prove Windows MPIO.
|
||||
- Test 1B does not prove primary movement while the filesystem is mounted.
|
||||
|
||||
## Test 2: Mounted Workload Failover
|
||||
|
||||
Status: PASS on `iscsi/csi-node-lifecycle@d1025f1`.
|
||||
|
||||
Run:
|
||||
|
||||
```bash
|
||||
RUN_ID="$(date -u +%Y%m%dT%H%M%SZ)-iscsi-p6-mounted-failover" \
|
||||
SW_BLOCK_ARTIFACT_DIR="/mnt/smb/work/share/g15d-k8s/${RUN_ID}" \
|
||||
bash scripts/run-iscsi-alua-mounted-failover-smoke.sh "$PWD"
|
||||
```
|
||||
|
||||
Expected:
|
||||
|
||||
- workload starts on mounted multipath device.
|
||||
- active path failure triggers authority movement to the replica path.
|
||||
- authority moves only after data-continuity prerequisites are met.
|
||||
- final read-back is byte-equal.
|
||||
- old primary path cannot acknowledge stale successful I/O.
|
||||
- cleanup leaves no sw-block iSCSI sessions and no multipath residue.
|
||||
|
||||
QA evidence:
|
||||
|
||||
- host: M02, Ubuntu 24.04.3 LTS, kernel 6.17.0-22-generic.
|
||||
- artifact:
|
||||
`/mnt/smb/work/share/g15d-k8s/20260506T094503Z-iscsi-p6-mounted-failover`.
|
||||
- final line:
|
||||
`[iscsi-failover] PASS: mounted multipath workload read/wrote through r1->r2 failover`.
|
||||
- wire proof:
|
||||
- before failover: r1 AAS `0x00`, r2 AAS `0x02`.
|
||||
- after killing r1: r2 AAS `0x00`.
|
||||
- `multipath -ll`: same `mpatha` map served the mounted filesystem.
|
||||
- r2 status after failover: `Epoch=2`, `AuthorityRole=primary`,
|
||||
`Healthy=true`, `FrontendPrimaryReady=true`.
|
||||
- pre-failover `pre.bin` checksum read back after failover.
|
||||
- post-failover `post.bin` checksum written and verified.
|
||||
- r1 log showed stale primary lineage rejections for post-promotion
|
||||
WRITE/SYNCHRONIZE_CACHE attempts.
|
||||
- cleanup left no active iSCSI sessions, no multipath map, and no stray
|
||||
blockmaster/blockvolume processes.
|
||||
|
||||
Evidence to collect:
|
||||
|
||||
- pre-failover and post-failover checksum logs.
|
||||
- r1/r2 target logs.
|
||||
- r2 `/status` after failover showing `Healthy=true` and `Epoch>=2`.
|
||||
- `multipath -ll` before and after failover.
|
||||
- `sg_rtpg` before failure, during transition, and after recovery.
|
||||
- `iscsiadm -m session -P 3` before and after failover.
|
||||
- cleanup commands and final empty session/device state.
|
||||
|
||||
Non-claim:
|
||||
|
||||
- Test 2 is Linux multipath evidence only.
|
||||
- Test 2 does not prove Kubernetes-mounted failover.
|
||||
- Test 2 does not prove Windows MPIO.
|
||||
- Test 2 does not claim production HA soak.
|
||||
- Test 2 covers one volume and one RF=2 pair, not multi-volume soak or
|
||||
repeated fault injection.
|
||||
|
||||
## Report Format
|
||||
|
||||
QA should report:
|
||||
|
||||
- branch and commit SHA,
|
||||
- host/kernel,
|
||||
- exact commands,
|
||||
- `iscsiadm -m session`,
|
||||
- `multipath -ll`,
|
||||
- `sg_inq` standard/VPD evidence,
|
||||
- `sg_rtpg` or equivalent REPORT TARGET PORT GROUPS evidence,
|
||||
- workload result,
|
||||
- failover event timing,
|
||||
- cleanup state,
|
||||
- any kernel `dmesg` I/O errors.
|
||||
|
||||
## Non-Claims
|
||||
|
||||
- No Windows MPIO claim.
|
||||
- No NVMe-oF ANA claim.
|
||||
- No performance claim.
|
||||
- No production HA claim until soak/fault testing exists.
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
# QA Assignment: iSCSI P7 Backend FIO Matrix
|
||||
|
||||
Status: PASS on M02.
|
||||
Status: PASS on node-b.
|
||||
Branch: `iscsi/p7-performance-matrix-clean`.
|
||||
Commit: `6826139ed9551df957a10a1cbc7368f63cccc36c`.
|
||||
Scope: experimental Linux iSCSI fio comparison between `walstore` and
|
||||
@@ -71,7 +71,7 @@ SW_BLOCK_BACKEND_BASE_ISCSI_PORT=3290
|
||||
## QA Result
|
||||
|
||||
- Host:
|
||||
- M02, `192.168.1.184`,
|
||||
- node-b, `192.168.1.184`,
|
||||
- Ubuntu 24.04.3 LTS,
|
||||
- Linux 6.17.0-22-generic.
|
||||
- Tooling:
|
||||
|
||||
@@ -4,7 +4,7 @@ Status: QA green on `iscsi/frontend-hardening@38ff850`.
|
||||
Branch: `iscsi/frontend-hardening`.
|
||||
Scope: repeatable soak evidence for the current iSCSI frontend stack.
|
||||
|
||||
Verified on M02:
|
||||
Verified on node-b:
|
||||
|
||||
- run ID: `20260506T223240Z-iscsi-p8-soak-38ff850`
|
||||
- artifact:
|
||||
|
||||
@@ -194,12 +194,12 @@ indistinguishable from a clean D2 scenario run.
|
||||
|
||||
## QA Process Commitment
|
||||
|
||||
- Validation host: m02 (`192.168.1.184`) k3s lab, or a user-provided
|
||||
- Validation host: node-b (`192.168.1.184`) k3s lab, or a user-provided
|
||||
equivalent single-node Kubernetes lab that passes
|
||||
`docs/quickstart-kubernetes.md` preflight.
|
||||
- QA does not sign off on close based on "all gates green in CI." QA runs
|
||||
the documented runbook by hand, cold, from a clean state on the supported
|
||||
lab shape (m02 + k3s, or M01 + k3s), as a user who has not seen the dev
|
||||
lab shape (node-b + k3s, or node-a + k3s), as a user who has not seen the dev
|
||||
process. If QA gets confused, close stops until the doc is fixed.
|
||||
- QA deliberately breaks at least the three break-classes in HG-10 and
|
||||
rejects the close if any break produces a bundle that does not help.
|
||||
|
||||
-278
@@ -1,278 +0,0 @@
|
||||
# QA Assignment: Light-Use Operations MVP Close Validation
|
||||
|
||||
## Goal
|
||||
|
||||
Validate the current plan's user-facing operations loop before it moves to
|
||||
`finished-plans/`.
|
||||
|
||||
This is a spec-driven close gate. Do not validate only that commands exit 0.
|
||||
Validate whether an early user/developer can:
|
||||
|
||||
```text
|
||||
observe one volume -> read a useful summary -> attach a self-describing bundle
|
||||
-> see TestOps control data for shared lab ownership
|
||||
```
|
||||
|
||||
## Scope
|
||||
|
||||
Validate two surfaces:
|
||||
|
||||
1. Product CLI support bundle:
|
||||
- `sw-block ops status`
|
||||
- `volume-status-report.json`
|
||||
- `volume-status-summary.txt`
|
||||
- `ops-status-bundle.json`
|
||||
|
||||
2. Product-local TestOps control data:
|
||||
- `sw-testops --control-dir`
|
||||
- `active/<run_id>.json`
|
||||
- `history/<run_id>.json`
|
||||
- `locks/<resource>.lock`
|
||||
- `events.jsonl`
|
||||
- `sw-testops --control-list`
|
||||
|
||||
## Build
|
||||
|
||||
From the product repo under test:
|
||||
|
||||
```text
|
||||
go build -o sw-block ./cmd/sw-block
|
||||
go build -o sw-testops ./cmd/sw-testops
|
||||
```
|
||||
|
||||
Record:
|
||||
|
||||
- product branch,
|
||||
- product commit,
|
||||
- whether worktree is dirty,
|
||||
- OS/controller host,
|
||||
- target host if using M01/M02.
|
||||
|
||||
## Part A: Fast Local Contract Validation
|
||||
|
||||
Run:
|
||||
|
||||
```text
|
||||
go test ./core/ops ./cmd/sw-block ./internal/testops ./cmd/sw-testops -count=1
|
||||
```
|
||||
|
||||
Expected:
|
||||
|
||||
- exit 0,
|
||||
- no skipped failure relevant to ops status or TestOps control data.
|
||||
|
||||
## Part B: CLI Bundle Contract
|
||||
|
||||
Run the command-boundary gate:
|
||||
|
||||
```text
|
||||
swblock validate testops/scenarios/operations-volume-status-cli-gate.yaml
|
||||
```
|
||||
|
||||
Expected:
|
||||
|
||||
- scenario validates,
|
||||
- the gate asserts:
|
||||
- report schema,
|
||||
- volume id,
|
||||
- product revision,
|
||||
- summary status/authority identity,
|
||||
- `ops-status-bundle.json` command,
|
||||
- exit code,
|
||||
- status,
|
||||
- artifact list,
|
||||
- `unchecked`,
|
||||
- `collection_errors`,
|
||||
- `non_claims`.
|
||||
|
||||
If the runner binary is unavailable, run the equivalent `go test` path and
|
||||
manually inspect the output directory from `SW_BLOCK_OPS_STATUS_CLI_ARTIFACT_DIR`.
|
||||
|
||||
## Part C: Bundle Artifact Inspection
|
||||
|
||||
From an actual generated bundle, verify:
|
||||
|
||||
### `ops-status-bundle.json`
|
||||
|
||||
Required:
|
||||
|
||||
- `schema_version == "1.0"`
|
||||
- `command == "sw-block ops status"`
|
||||
- `volume_id` is populated
|
||||
- `product_revision` is populated
|
||||
- `exit_code` is present
|
||||
- `status` is one of:
|
||||
- `ok`
|
||||
- `unhealthy`
|
||||
- `invalid`
|
||||
- `artifacts` includes:
|
||||
- `volume-status-report.json`
|
||||
- `volume-status-summary.txt`
|
||||
- `ops-status-bundle.json`
|
||||
- `unchecked` exists, even if empty
|
||||
- `collection_errors` exists, even if empty
|
||||
- `non_claims` is non-empty
|
||||
|
||||
### `volume-status-summary.txt`
|
||||
|
||||
Required:
|
||||
|
||||
- starts with `status:`
|
||||
- includes `product_revision:`
|
||||
- includes `volume:`
|
||||
- includes `authority:`
|
||||
- includes `replication:`
|
||||
- includes `residue:`
|
||||
- includes either `issues: none` or explicit issue lines.
|
||||
|
||||
### `volume-status-report.json`
|
||||
|
||||
Required:
|
||||
|
||||
- parses as JSON,
|
||||
- includes `schema_version`,
|
||||
- includes `source`,
|
||||
- includes `volume`,
|
||||
- includes `authority`,
|
||||
- includes `replication`,
|
||||
- includes `durable`,
|
||||
- includes `residue`.
|
||||
|
||||
## Part D: CLI Outlier Checks
|
||||
|
||||
Run at least these adversarial cases:
|
||||
|
||||
1. Missing required args:
|
||||
|
||||
```text
|
||||
sw-block ops status --volume v1
|
||||
```
|
||||
|
||||
Expected:
|
||||
|
||||
- exit 2,
|
||||
- stderr explains missing `--volume`/`--out` or missing live sources,
|
||||
- no misleading artifact success line.
|
||||
|
||||
2. Bad master/status address against an output dir:
|
||||
|
||||
```text
|
||||
sw-block ops status \
|
||||
--volume v1 \
|
||||
--master 127.0.0.1:1 \
|
||||
--status-addr 127.0.0.1:2 \
|
||||
--out <tmp-dir>
|
||||
```
|
||||
|
||||
Expected:
|
||||
|
||||
- non-zero exit,
|
||||
- if partial artifacts are written, `ops-status-bundle.json` and
|
||||
`volume-status-summary.txt` reflect unhealthy/error state,
|
||||
- collection error is visible in either summary or bundle.
|
||||
|
||||
3. Output path invalid or unwritable.
|
||||
|
||||
Expected:
|
||||
|
||||
- exit 2,
|
||||
- no false `status: ok` claim.
|
||||
|
||||
## Part E: TestOps Control Data
|
||||
|
||||
Use a shared/control directory. Prefer a shared-drive path if available.
|
||||
|
||||
```text
|
||||
CONTROL=<shared-or-temp>/testops-control
|
||||
ART=<shared-or-temp>/artifacts
|
||||
|
||||
sw-testops \
|
||||
--repo-root <seaweed_block_repo> \
|
||||
--scenario g15b-manifest \
|
||||
--artifact-dir "$ART/run-1" \
|
||||
--run-id qa-control-run-1 \
|
||||
--commit <product_commit> \
|
||||
--control-dir "$CONTROL"
|
||||
|
||||
sw-testops --repo-root <seaweed_block_repo> --control-dir "$CONTROL" --control-list
|
||||
```
|
||||
|
||||
Expected after terminal exit:
|
||||
|
||||
- `active/qa-control-run-1.json` absent,
|
||||
- `history/qa-control-run-1.json` present,
|
||||
- `locks/` empty,
|
||||
- `events.jsonl` has start and complete events,
|
||||
- `--control-list` shows:
|
||||
- state,
|
||||
- run id,
|
||||
- scenario,
|
||||
- source commit,
|
||||
- updated timestamp,
|
||||
- locks column,
|
||||
- artifact dir.
|
||||
|
||||
## Part F: Control Lock Conflict
|
||||
|
||||
Validate resource-lock collision behavior. Use either:
|
||||
|
||||
- a tiny custom registry with a shell script that sleeps, or
|
||||
- an existing resource-declaring scenario if it is safe to run.
|
||||
|
||||
Expected:
|
||||
|
||||
- first run creates active record and lock files,
|
||||
- second run using the same resource exits before driver execution,
|
||||
- second run does not create an active record,
|
||||
- first run's lock is not removed by the conflicting run,
|
||||
- terminal first run moves to history and releases locks.
|
||||
|
||||
## Part G: Shared Lab Hygiene
|
||||
|
||||
If running on M01/M02, verify after the test:
|
||||
|
||||
- no stale TestOps locks for completed runs,
|
||||
- no active record for completed runs,
|
||||
- no unexpected iSCSI session,
|
||||
- no unexpected NVMe SeaweedFS subsystem,
|
||||
- no blockmaster/blockvolume process left by this validation.
|
||||
|
||||
## Report Template
|
||||
|
||||
Return one report with:
|
||||
|
||||
```text
|
||||
QA Report — Light-Use Operations MVP Close Validation
|
||||
|
||||
Product commit:
|
||||
Runner/swblock commit or binary:
|
||||
Host/controller:
|
||||
Target node(s):
|
||||
Artifact/control dirs:
|
||||
|
||||
Part A local tests: PASS/FAIL
|
||||
Part B CLI gate: PASS/FAIL
|
||||
Part C artifact inspection: PASS/FAIL
|
||||
Part D CLI outliers: PASS/FAIL
|
||||
Part E control data: PASS/FAIL
|
||||
Part F lock conflict: PASS/FAIL
|
||||
Part G hygiene: PASS/FAIL
|
||||
|
||||
Findings:
|
||||
1. ...
|
||||
|
||||
Verdict:
|
||||
PASS to close current plan / FAIL with blockers
|
||||
```
|
||||
|
||||
## Non-Claims
|
||||
|
||||
This validation does not prove:
|
||||
|
||||
- production HA,
|
||||
- performance,
|
||||
- install/upgrade/uninstall,
|
||||
- Kubernetes operator ownership,
|
||||
- UI/dashboard,
|
||||
- remote TestOps agent,
|
||||
- queueing or stale-lock stealing.
|
||||
+1
-1
@@ -10,7 +10,7 @@ gate, not a new NVMe protocol gate.
|
||||
|
||||
## Preconditions
|
||||
|
||||
- Host: M02 k3s lab or equivalent single-node k3s host.
|
||||
- Host: node-b k3s lab or equivalent single-node k3s host.
|
||||
- Required host tools:
|
||||
- `kubectl`,
|
||||
- `nvme-cli`,
|
||||
|
||||
-384
@@ -1,384 +0,0 @@
|
||||
# Phase 120 NVMe/TCP Performance Baseline QA Sign-off
|
||||
|
||||
Verdict: **FAIL**
|
||||
|
||||
Classification: **product** - the live gate failed in the synced current product
|
||||
tree after successful local image build/import, Helm install, PVC binding, and
|
||||
perf pod readiness. This was not a lab access, disk, image availability, or
|
||||
cleanup failure.
|
||||
|
||||
## Scope
|
||||
|
||||
- Branch tested: `phase120-nvme-tcp-performance-baseline`
|
||||
- Commit tested: `949a8e9`
|
||||
- Scenario: `testops/scenarios/nvme-tcp-performance-baseline-chain.yaml`
|
||||
- Run command: `C:\work\swblock.exe run -env product_root=/tmp/seaweed_block testops/scenarios/nvme-tcp-performance-baseline-chain.yaml`
|
||||
- Run id: `20260702-163714-0048`
|
||||
- Bundle path: `C:\work\seaweed_block\results\20260702-163714-0048`
|
||||
- Remote artifact path: `/mnt/smb/work/share/g15d-k8s/20260702-163714-0048-phase120-nvme-perf`
|
||||
- Image mode: local images (`sw-block:local`, `sw-block-csi:local`) built and imported by the gate
|
||||
|
||||
## Result
|
||||
|
||||
The scenario failed in `run_gate` before the `assert_summary` phase ran:
|
||||
|
||||
```text
|
||||
volume status=ok, want ready
|
||||
```
|
||||
|
||||
Runner state:
|
||||
|
||||
```text
|
||||
pre_clean=pass
|
||||
run_gate=fail
|
||||
collect=pass
|
||||
scenario_status=FAIL
|
||||
```
|
||||
|
||||
The gate wrote partial summary rows only; no baseline performance rows were
|
||||
collected.
|
||||
|
||||
## Full Summary Rows
|
||||
|
||||
```text
|
||||
phase120_nvme_tcp_performance_baseline_status=running
|
||||
protocol=nvme
|
||||
frontend_transport=tcp
|
||||
roce_claim_allowed=false
|
||||
nvme_rdma_claim_allowed=false
|
||||
performance_claim_allowed=false
|
||||
performance_slo_claim_allowed=false
|
||||
perf_gate_type=baseline_no_slo
|
||||
go_test_blockvolume_sw_block=pass
|
||||
image_ready=true
|
||||
generated_external_nvme=true
|
||||
blockvolume_node=m01
|
||||
app_node=m02
|
||||
helm_template_external_nvme=true
|
||||
helm_install=pass
|
||||
pvc_bound=true
|
||||
perf_pod_ready=true
|
||||
```
|
||||
|
||||
Missing required PASS rows include:
|
||||
|
||||
```text
|
||||
phase120_nvme_tcp_performance_baseline_status=ok
|
||||
managed_volume_status=ready
|
||||
managed_volume_reason=first_volume_verified
|
||||
publish_target_loopback=false
|
||||
marker_verified=true
|
||||
final_data_verified=true
|
||||
seq_write_mibps=<number>
|
||||
seq_read_mibps=<number>
|
||||
small_write_iops=<number>
|
||||
cleanup_status=ok
|
||||
```
|
||||
|
||||
## Failure Evidence
|
||||
|
||||
`status/cluster-evidence.json` contained a ready managed-volume view but the
|
||||
gate script checked the older `volumes` status field:
|
||||
|
||||
```text
|
||||
cluster_evidence.status=ok
|
||||
cluster_evidence.volumes[0].status=ok
|
||||
cluster_evidence.volumes[0].publish_target=192.168.1.181:4420
|
||||
cluster_evidence.managed_volumes[0].status=ready
|
||||
cluster_evidence.managed_volumes[0].reason_code=first_volume_verified
|
||||
cluster_evidence.managed_volumes[0].publish_target=192.168.1.181:4420
|
||||
```
|
||||
|
||||
The current gate script exits unless `cluster_evidence.volumes[0].status` is
|
||||
`ready`, so it failed before marker verification and performance measurements.
|
||||
|
||||
## Cleanup Status
|
||||
|
||||
The gate exited before its in-script `verify-helm-cleanup.sh` step, so QA ran the
|
||||
cleanup verifier separately after the failure:
|
||||
|
||||
```text
|
||||
cleanup_status=ok
|
||||
helm_release=sw-block
|
||||
helm_namespace=kube-system
|
||||
iqn_substr=io.seaweedfs
|
||||
k8s_residue_count=0
|
||||
iscsi_residue_count=0
|
||||
process_residue_count=0
|
||||
multipath_residue_count=0
|
||||
hostpath_residue_count=0
|
||||
failure_count=0
|
||||
cleanup_observed_at=2026-07-02T23:41:10Z
|
||||
```
|
||||
|
||||
Final residue checks found no `swblock*` CRDs, no `sw-block` Helm release, and no
|
||||
`sw-block` pods/PVCs/PVs/namespaces. Only the physical local NVMe PCI subsystem
|
||||
remained in `nvme list-subsys`.
|
||||
|
||||
## Lab Notes
|
||||
|
||||
- Synced the current Windows product tree to `m02:/tmp/seaweed_block` before the run.
|
||||
- Sync verification hashes matched for the Phase 120 script, scenario, and `go.mod`.
|
||||
- m01 and m02 were `Ready`; tp01 was `NotReady` but not used by this two-node gate.
|
||||
- m02 root disk was 61% used.
|
||||
- Pre-flight empty `swblock*` CRDs were removed before running.
|
||||
|
||||
## RE-VALIDATION (b9b3bac) - FAIL
|
||||
|
||||
Classification: **lab** - the fixed managed-volume readiness path passed and the
|
||||
baseline reached marker verification, sequential/small-write measurements, and
|
||||
final data verification. The scenario still failed because the in-gate cleanup
|
||||
verifier observed one transient Kubernetes residue pod immediately after Helm
|
||||
uninstall. A post-exit cleanup verifier run one minute later reported
|
||||
`cleanup_status=ok` with all residue counts zero.
|
||||
|
||||
## Re-validation Scope
|
||||
|
||||
- Branch tested: `phase120-nvme-tcp-performance-baseline`
|
||||
- Commit tested: `b9b3bac`
|
||||
- Scenario: `testops/scenarios/nvme-tcp-performance-baseline-chain.yaml`
|
||||
- Run command: `C:\work\swblock.exe run -env product_root=/tmp/seaweed_block testops/scenarios/nvme-tcp-performance-baseline-chain.yaml`
|
||||
- Run id: `20260702-164616-ea17`
|
||||
- Bundle path: `C:\work\seaweed_block\results\20260702-164616-ea17`
|
||||
- Remote artifact path: `/mnt/smb/work/share/g15d-k8s/20260702-164616-ea17-phase120-nvme-perf`
|
||||
- Image mode: local images (`sw-block:local`, `sw-block-csi:local`) built and imported by the gate
|
||||
- Synced product root: `m02:/tmp/seaweed_block` from Git archive `b9b3bac`
|
||||
|
||||
## Re-validation Result
|
||||
|
||||
The scenario failed in `run_gate` before `assert_summary` ran because the gate
|
||||
did not append `cleanup_status=ok` or the final
|
||||
`phase120_nvme_tcp_performance_baseline_status=ok` row.
|
||||
|
||||
Runner state:
|
||||
|
||||
```text
|
||||
pre_clean=pass
|
||||
run_gate=fail
|
||||
collect=pass
|
||||
scenario_status=FAIL
|
||||
```
|
||||
|
||||
Runner failure excerpt:
|
||||
|
||||
```text
|
||||
ERROR: phase "run_gate" failed: action 0 (exec) failed: exec: code=1
|
||||
```
|
||||
|
||||
The runner stderr only surfaced Docker legacy-builder warnings, but the artifact
|
||||
summary and cleanup verifier show the actual terminal condition: all baseline
|
||||
checks completed, then in-gate cleanup verification failed on Kubernetes residue.
|
||||
|
||||
## Re-validation Full Summary Rows
|
||||
|
||||
```text
|
||||
phase120_nvme_tcp_performance_baseline_status=running
|
||||
protocol=nvme
|
||||
frontend_transport=tcp
|
||||
roce_claim_allowed=false
|
||||
nvme_rdma_claim_allowed=false
|
||||
performance_claim_allowed=false
|
||||
performance_slo_claim_allowed=false
|
||||
perf_gate_type=baseline_no_slo
|
||||
go_test_blockvolume_sw_block=pass
|
||||
image_ready=true
|
||||
generated_external_nvme=true
|
||||
blockvolume_node=m01
|
||||
app_node=m02
|
||||
helm_template_external_nvme=true
|
||||
helm_install=pass
|
||||
pvc_bound=true
|
||||
perf_pod_ready=true
|
||||
managed_volume_status=ready
|
||||
managed_volume_reason=first_volume_verified
|
||||
publish_target_loopback=false
|
||||
publish_target=192.168.1.181:4420
|
||||
marker_verify_ms=197
|
||||
marker_verified=true
|
||||
seq_size_mib=64
|
||||
seq_write_duration_ms=750
|
||||
seq_write_mibps=85.33
|
||||
seq_read_duration_ms=219
|
||||
seq_read_mibps=292.24
|
||||
small_write_ops=256
|
||||
small_write_block_bytes=4096
|
||||
small_write_duration_ms=302
|
||||
small_write_iops=847.68
|
||||
small_write_mibps=3.31
|
||||
final_data_verified=true
|
||||
```
|
||||
|
||||
Missing required PASS rows:
|
||||
|
||||
```text
|
||||
cleanup_status=ok
|
||||
phase120_nvme_tcp_performance_baseline_status=ok
|
||||
```
|
||||
|
||||
## Re-validation Cleanup Evidence
|
||||
|
||||
In-gate cleanup verifier rows:
|
||||
|
||||
```text
|
||||
cleanup_status=failed
|
||||
helm_release=sw-block
|
||||
helm_namespace=kube-system
|
||||
iqn_substr=io.seaweedfs
|
||||
k8s_residue_count=1
|
||||
iscsi_residue_count=0
|
||||
process_residue_count=0
|
||||
multipath_residue_count=0
|
||||
hostpath_residue_count=0
|
||||
failure_count=1
|
||||
cleanup_observed_at=2026-07-02T23:49:28Z
|
||||
```
|
||||
|
||||
In-gate cleanup failure:
|
||||
|
||||
```text
|
||||
kubernetes_sw_block_resources_present
|
||||
pod/sw-block-csi-node-55jt2
|
||||
```
|
||||
|
||||
Post-exit cleanup verifier rows:
|
||||
|
||||
```text
|
||||
cleanup_status=ok
|
||||
helm_release=sw-block
|
||||
helm_namespace=kube-system
|
||||
iqn_substr=io.seaweedfs
|
||||
k8s_residue_count=0
|
||||
iscsi_residue_count=0
|
||||
process_residue_count=0
|
||||
multipath_residue_count=0
|
||||
hostpath_residue_count=0
|
||||
failure_count=0
|
||||
cleanup_observed_at=2026-07-02T23:50:34Z
|
||||
```
|
||||
|
||||
Final residue checks found no `sw-block` Helm release, no `sw-block` pods/PVCs/PVs
|
||||
or namespaces, no `swblock*` CRDs, and no `sw-block` admission policies.
|
||||
|
||||
## Re-validation Lab Notes
|
||||
|
||||
- m01 and m02 were `Ready`; tp01 was `NotReady` but not used by this gate.
|
||||
- m02 root disk was 62% used.
|
||||
- No pre-existing `sw-block` Helm, pod/PVC/PV/namespace, CRD, or admission-policy residue was present before the run.
|
||||
- The remote product root was synced from `b9b3bac` before running; the synced gate script contained the fixed `managed_volume_status=ready` check.
|
||||
|
||||
## RE-VALIDATION (fb19f58) - PASS
|
||||
|
||||
Verdict: **PASS**
|
||||
|
||||
## Re-validation Scope
|
||||
|
||||
- Branch tested: `phase120-nvme-tcp-performance-baseline`
|
||||
- Commit tested: `fb19f5894262cb598f0d321538242fac186e4358`
|
||||
- Scenario: `testops/scenarios/nvme-tcp-performance-baseline-chain.yaml`
|
||||
- Run command: `C:\work\swblock.exe run testops/scenarios/nvme-tcp-performance-baseline-chain.yaml -env product_root=/tmp/seaweed_block`
|
||||
- Run id: `20260702-165514-8196`
|
||||
- Bundle path: `C:\work\seaweed_block\results\20260702-165514-8196`
|
||||
- Remote artifact path: `/mnt/smb/work/share/g15d-k8s/20260702-165514-8196-phase120-nvme-perf`
|
||||
- Image mode: local images (`sw-block:local`, `sw-block-csi:local`) built and imported by the gate
|
||||
- Synced product root: `m02:/tmp/seaweed_block` from Git archive `fb19f58`
|
||||
|
||||
## Re-validation Result
|
||||
|
||||
The scenario passed all phases and assertions:
|
||||
|
||||
```text
|
||||
=== nvme-tcp-performance-baseline-chain === PASS (3m0.599s)
|
||||
pre_clean=PASS
|
||||
run_gate=PASS
|
||||
assert_summary=PASS
|
||||
collect=PASS
|
||||
actions=24 passed, 0 failed
|
||||
```
|
||||
|
||||
Asserted summary keys all matched:
|
||||
|
||||
```text
|
||||
phase120_status_ok=1
|
||||
protocol_nvme=1
|
||||
frontend_transport_tcp=1
|
||||
performance_claim_denied=1
|
||||
roce_claim_denied=1
|
||||
seq_write_metric=1
|
||||
seq_read_metric=1
|
||||
small_write_metric=1
|
||||
final_data_verified=1
|
||||
cleanup_ok=1
|
||||
```
|
||||
|
||||
## Re-validation Full Summary Rows
|
||||
|
||||
```text
|
||||
phase120_nvme_tcp_performance_baseline_status=running
|
||||
protocol=nvme
|
||||
frontend_transport=tcp
|
||||
roce_claim_allowed=false
|
||||
nvme_rdma_claim_allowed=false
|
||||
performance_claim_allowed=false
|
||||
performance_slo_claim_allowed=false
|
||||
perf_gate_type=baseline_no_slo
|
||||
go_test_blockvolume_sw_block=pass
|
||||
image_ready=true
|
||||
generated_external_nvme=true
|
||||
blockvolume_node=m01
|
||||
app_node=m02
|
||||
helm_template_external_nvme=true
|
||||
helm_install=pass
|
||||
pvc_bound=true
|
||||
perf_pod_ready=true
|
||||
managed_volume_status=ready
|
||||
managed_volume_reason=first_volume_verified
|
||||
publish_target_loopback=false
|
||||
publish_target=192.168.1.181:4420
|
||||
marker_verify_ms=163
|
||||
marker_verified=true
|
||||
seq_size_mib=64
|
||||
seq_write_duration_ms=777
|
||||
seq_write_mibps=82.37
|
||||
seq_read_duration_ms=277
|
||||
seq_read_mibps=231.05
|
||||
small_write_ops=256
|
||||
small_write_block_bytes=4096
|
||||
small_write_duration_ms=332
|
||||
small_write_iops=771.08
|
||||
small_write_mibps=3.01
|
||||
final_data_verified=true
|
||||
cleanup_status=ok
|
||||
phase120_nvme_tcp_performance_baseline_status=ok
|
||||
```
|
||||
|
||||
## Re-validation Cleanup Evidence
|
||||
|
||||
In-gate cleanup verifier rows:
|
||||
|
||||
```text
|
||||
cleanup_status=ok
|
||||
helm_release=sw-block
|
||||
helm_namespace=kube-system
|
||||
iqn_substr=io.seaweedfs
|
||||
k8s_residue_count=0
|
||||
iscsi_residue_count=0
|
||||
process_residue_count=0
|
||||
multipath_residue_count=0
|
||||
hostpath_residue_count=0
|
||||
failure_count=0
|
||||
cleanup_observed_at=2026-07-02T23:58:11Z
|
||||
```
|
||||
|
||||
Final residue checks found no `sw-block` Helm release, no `sw-block` pods/PVCs/PVs
|
||||
or namespaces, no `swblock*` CRDs, no `sw-block` admission policies, and no
|
||||
Seaweed NVMe subsystem entries.
|
||||
|
||||
## Re-validation Lab Notes
|
||||
|
||||
- m01 and m02 were `Ready`; tp01 was `NotReady` but not used by this gate.
|
||||
- m02 root disk was 63% used.
|
||||
- No pre-existing `sw-block` Helm, pod/PVC/PV/namespace, CRD, or admission-policy residue was present before the run.
|
||||
- The remote product root was synced from Git archive `fb19f58`; the synced gate script contained `SW_BLOCK_CLEANUP_WAIT_SECONDS="${SW_BLOCK_CLEANUP_WAIT_SECONDS:-180}"`.
|
||||
- `publish_target=192.168.1.181:4420` is the NVMe/TCP LAN target on m01. It is
|
||||
not a RoCE/RDMA address and does not change the explicit
|
||||
`roce_claim_allowed=false` / `nvme_rdma_claim_allowed=false` boundary.
|
||||
+1
-1
@@ -106,7 +106,7 @@ failure_count=0
|
||||
|
||||
## Notes
|
||||
|
||||
- `tp01` remains NotReady in the lab, but this gate only requires the m01/m02
|
||||
- `node-c` remains NotReady in the lab, but this gate only requires the node-a/node-b
|
||||
NVMe/TCP path.
|
||||
- Throughput was recorded as diagnostic evidence only. It is not a performance
|
||||
claim.
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
# Phase 166 NVMe/RDMA Kubernetes Multipath Status
|
||||
|
||||
Status: **HOLD - implementation complete, live close gate infrastructure-blocked**
|
||||
|
||||
Phase 166 requires an already-mounted RF2 Kubernetes volume to have two live
|
||||
RDMA controllers, keep I/O running while one non-primary target is unavailable,
|
||||
reconnect that exact RDMA path, and replace one desired endpoint without
|
||||
restaging. No TCP controller may satisfy an RDMA path.
|
||||
|
||||
## Implemented Contract
|
||||
|
||||
- CSI matches a desired path by exact `(transport, NQN, address)` and accepts
|
||||
only controllers whose state is `live`.
|
||||
- Initial stage and mounted reconcile connect missing desired endpoints before
|
||||
pruning stale controllers.
|
||||
- Initial-stage rollback is scoped to controllers created by that attempt; it
|
||||
does not disconnect pre-existing or unrelated controllers.
|
||||
- A mounted volume rejects a transport change and requires restage instead of
|
||||
silently mixing TCP and RDMA.
|
||||
- Publish context carries explicit `rdma` intent while preserving legacy TCP
|
||||
behavior when the transport field is absent.
|
||||
- The close gate requires a non-primary outage, surviving-path mounted I/O,
|
||||
exact path restoration, endpoint replacement, cross-surface agreement, no
|
||||
TCP fallback, and scoped zero-residue cleanup.
|
||||
|
||||
## Evidence
|
||||
|
||||
| Check | Result | Evidence |
|
||||
| --- | --- | --- |
|
||||
| Source and script contracts | PASS | `go test ./core/csi ./cmd/blockcsi ./core/ops ./core/launcher ./scripts -count=1`; changed shell scripts pass `bash -n`; Phase 133 and 166 scenarios validate. |
|
||||
| Kubernetes single-path RDMA regression | PASS | Phase 165 run `20260718-054945-77d5`: transport `rdma`, host controller `10.0.0.3`, writer/reader verified, no TCP fallback, clean detach and zero residue. |
|
||||
| Shared RF2 reconnect logic over NVMe/TCP | PASS | Phase 133 run `20260718-061457-5ed4`, 35/35 actions: two initial paths; non-primary endpoint `192.168.1.184:4420` replaced by `192.168.1.184:4520`; surviving `192.168.1.181:4420` controller preserved; mounted I/O and Pod UID preserved; old path absent; CRD/report/dashboard/explain agree; cleanup clean. |
|
||||
| RF2 RDMA mounted reconnect close gate | BLOCKED | The current lab has only two RoCE-capable nodes, m01 (`10.0.0.1`) and m02 (`10.0.0.3`), and both must host the RF2 targets. The initiator therefore shares a node with one target; Linux rejects that local RDMA self-connect with `Invalid argument`. tp01 is offline and is not a RoCE-capable replacement. |
|
||||
|
||||
The Phase 133 regression asserts stable behavior, not observation of a transient
|
||||
stale controller. A valid result is that the old path is already absent when
|
||||
sampled, provided the new desired path is live, the surviving controller is
|
||||
unchanged, the final exact path set is correct, mounted I/O is continuous, and
|
||||
`stale_old_path_pruned=true`.
|
||||
|
||||
## Unblock Requirement
|
||||
|
||||
Provide a third Ready Kubernetes node with working RoCE configuration and
|
||||
reachability to both m01 and m02 RDMA frontend addresses. Both RF2 targets must
|
||||
be remote from the initiator. Then run:
|
||||
|
||||
```powershell
|
||||
C:\work\swblock.exe run -results-dir C:\work\seaweed_block\results `
|
||||
-env app_node=<third-kubernetes-node> `
|
||||
-env app_ssh_addr=<third-node-management-ip> `
|
||||
C:\work\seaweed_block\testops\scenarios\nvme-rdma-k8s-multipath-reconnect-chain.yaml
|
||||
```
|
||||
|
||||
Phase 166 closes only after that live gate emits
|
||||
`phase166_nvme_rdma_k8s_multipath_reconnect_status=ok` and
|
||||
`cleanup_status=ok`. Component regressions do not substitute for this result.
|
||||
-266
@@ -1,266 +0,0 @@
|
||||
# Phase 172 D1 WAL Materialization Baseline QA Sign-off
|
||||
|
||||
## Verdict
|
||||
|
||||
**PASS**
|
||||
|
||||
Exact commit `6dd89e71298b5fa5a46d80c4c27efce7d5bba02f` passed the
|
||||
unchanged Phase 172 D1 Linux gate, the assigned race test at `-count=20`,
|
||||
and `go vet ./core/storage`.
|
||||
|
||||
The baseline admits D2:
|
||||
|
||||
```text
|
||||
d2_single_read_candidate_admitted=true
|
||||
next_recommendation=implement_disabled_single_read_materialization
|
||||
```
|
||||
|
||||
## Source And Environment
|
||||
|
||||
```text
|
||||
tested_sha=6dd89e71298b5fa5a46d80c4c27efce7d5bba02f
|
||||
tested_branch=detached_exact_commit
|
||||
source_dirty=false
|
||||
lab_host=M02
|
||||
go_version=go version go1.25.0 linux/amd64
|
||||
kernel=Linux 6.17.0-23-generic #23~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 14 16:11:48 UTC 2 x86_64 GNU/Linux
|
||||
strace_version=strace -- version 6.8
|
||||
```
|
||||
|
||||
The source was transferred as a Git bundle and checked out detached in the
|
||||
isolated Linux worktree
|
||||
`/tmp/phase172-d1-qa-6dd89e7-20260730-050249`. The shared development
|
||||
worktree was not used or modified.
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
bash scripts/run-phase172-wal-materialization-baseline-gate.sh
|
||||
|
||||
go test -race ./core/storage \
|
||||
-run 'Test(DirtyMapSnapshotCarriesRecordGeometry|WALStoreDirtyRecordGeometryAppendPaths|WALStoreRecoverReconstructsRecordGeometry|WALStoreRecoverReconstructsLegacyTrimRecordGeometry|WALStoreRecordGeometrySurvivesRingWrap|FlusherInstrumentationCountsWALRecordMaterializationShape|FlusherInstrumentationExposesCurrentDuplicateReadsForSharedRecord)$' \
|
||||
-count=20
|
||||
|
||||
go vet ./core/storage
|
||||
```
|
||||
|
||||
The gate ran with its committed defaults: five repetitions, one second per
|
||||
benchmark, normal checkpoint behavior, final Sync and drain, 20 geometry
|
||||
repetitions, and 1024 records in the scoped syscall probe.
|
||||
|
||||
## Required Gates
|
||||
|
||||
| Gate | Evidence | Result |
|
||||
|---|---|---|
|
||||
| Storage regression | `storage_regression=pass` | PASS |
|
||||
| Geometry repeat | `record_geometry_repeat_20=pass` | PASS |
|
||||
| Legacy range trim | Three blocks recovered, flushed, checkpointed; `legacy_trim_recovery_fixture=pass` | PASS |
|
||||
| Ring wrap | Wrap, crash, reopen, and recovered identity; `ring_wrap_geometry_fixture=pass` | PASS |
|
||||
| Checkpoint/failures | 20/20 complete checkpoints; 160/160 failure metrics zero | PASS |
|
||||
| Duplicate-read baseline | Sequential `5/5`; scattered `5/5` | PASS |
|
||||
| Current reuse behavior | 20/20 workload samples reported zero actual reuse hits | PASS |
|
||||
| Exact-path syscall probe | Product `2048`; `strace -P` `2048` | PASS |
|
||||
| Race | `ok ... core/storage 3.807s`, `-count=20` | PASS |
|
||||
| Vet | Exit 0, no output | PASS |
|
||||
| D2 admission | `d2_single_read_candidate_admitted=true` | PASS |
|
||||
|
||||
The append/recovery fixtures cover ordinary append, independent explicit
|
||||
batch records, disabled-by-default multi-block records, replicated
|
||||
`ApplyEntry`, crash/reopen recovery, a three-block legacy trim, and ring
|
||||
wrap followed by crash/reopen. The exact `RecordSize` and shared record
|
||||
identity assertions passed.
|
||||
|
||||
The commit changes no WAL/superblock format file and adds no default
|
||||
materialization selector. The D1 path still performs one header read and one
|
||||
full-record read per validated record.
|
||||
|
||||
## Scoped Strace
|
||||
|
||||
The probe used `strace -f -c -e trace=pread64 -P <exact-store-file>` rather
|
||||
than whole-process syscall counts:
|
||||
|
||||
```text
|
||||
phase172_probe_validated_records=1024
|
||||
phase172_probe_header_read_ops=1024
|
||||
phase172_probe_record_read_ops=1024
|
||||
phase172_probe_materialization_read_ops=2048
|
||||
|
||||
% time seconds usecs/call calls errors syscall
|
||||
100.00 0.004185 2 2048 pread64
|
||||
```
|
||||
|
||||
Therefore:
|
||||
|
||||
```text
|
||||
scoped_product_materialization_reads=2048
|
||||
scoped_strace_pread64_calls=2048
|
||||
scoped_strace_matches_product_counter=true
|
||||
```
|
||||
|
||||
## Workload Medians
|
||||
|
||||
| Workload | MiB/s | p99 ns | Unique records/snapshot entry | Reuse opportunities/snapshot entry | Header reads/validated | Record reads/validated | Materialization reads/validated | Read bytes/entry | Actual reuse hits/validated | WAL wraps |
|
||||
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|
|
||||
| Sequential 4 KiB | 66.11 | 2212380 | 1.000 | 0 | 1.000 | 1.000 | 2.000 | 4172 | 0 | 6.000 |
|
||||
| Scattered 4 KiB | 63.86 | 2208120 | 1.000 | 0 | 1.000 | 1.000 | 2.000 | 4172 | 0 | 5.000 |
|
||||
| Explicit 16x4 KiB batch | 77.75 | 5770525 | 1.000 | 0 | 1.000 | 1.000 | 2.000 | 3912 | 0 | 9.000 |
|
||||
| Multi-block 16x4 KiB opt-in | 53.41 | 5791757 | 0.06250 | 0.9375 | 1.000 | 1.000 | 2.000 | 58565 | 0 | 9.000 |
|
||||
|
||||
The explicit batch remained independent. The opt-in multi-block workload had
|
||||
one unique record per 16 logical entries and nonzero reuse opportunity, while
|
||||
the unchanged D1 implementation recorded zero actual reuse hits.
|
||||
|
||||
## Independent Metric Audit
|
||||
|
||||
An independent pass over all raw benchmark rows reported:
|
||||
|
||||
```text
|
||||
benchmark_rows=20
|
||||
zero_failure_metric_checks=160
|
||||
checkpoint_checks=20
|
||||
balanced_cycle_checks=20
|
||||
zero_actual_reuse_checks=20
|
||||
duplicate_materialization_checks=20
|
||||
ordinary_read_shape_checks=10
|
||||
independent_batch_shape_checks=5
|
||||
multiblock_reuse_opportunity_checks=5
|
||||
qa_independent_metric_audit=pass
|
||||
```
|
||||
|
||||
## Full Gate Summary
|
||||
|
||||
```text
|
||||
phase172_wal_materialization_baseline_status=running
|
||||
git_sha=6dd89e71298b5fa5a46d80c4c27efce7d5bba02f
|
||||
git_dirty=false
|
||||
go_version=go_version_go1.25.0_linux/amd64
|
||||
kernel=Linux_6.17.0-23-generic_#23~24.04.1-Ubuntu_SMP_PREEMPT_DYNAMIC_Tue_Apr_14_16:11:48_UTC_2_x86_64_GNU/Linux
|
||||
benchmark_time=1s
|
||||
repetitions=5
|
||||
writers=4
|
||||
workloads=sequential_4k,scattered_4k,explicit_16x4k_batch,multiblock_16x4k_opt_in
|
||||
d2_admission=4_of_5_sequential_and_scattered_samples_each_header_and_record_reads_per_validated_record_in_0.95_to_1.05_and_combined_at_least_1.90
|
||||
strace_scope=exact_store_file_path
|
||||
storage_regression=pass
|
||||
record_geometry_repeat_20=pass
|
||||
legacy_trim_recovery_fixture=pass
|
||||
ring_wrap_geometry_fixture=pass
|
||||
repetition_1_order=sequential scattered batch multiblock
|
||||
repetition_2_order=multiblock batch scattered sequential
|
||||
repetition_3_order=scattered sequential multiblock batch
|
||||
repetition_4_order=batch multiblock sequential scattered
|
||||
repetition_5_order=sequential batch scattered multiblock
|
||||
all_samples_checkpoint_coverage_complete=true
|
||||
all_samples_failed_cycles_zero=true
|
||||
sequential_mibps_samples=55.66,61.63,67.32,120.64,66.11
|
||||
sequential_mibps_median=66.11
|
||||
sequential_p99_ns_samples=2265736,2214159,2212380,1187207,2210448
|
||||
sequential_p99_ns_median=2212380
|
||||
sequential_unique_records_per_snapshot_entry_samples=1.000,1.000,1.000,1.000,1.000
|
||||
sequential_unique_records_per_snapshot_entry_median=1.000
|
||||
sequential_reuse_opportunities_per_snapshot_entry_samples=0,0,0,0,0
|
||||
sequential_reuse_opportunities_per_snapshot_entry_median=0
|
||||
sequential_header_reads_per_validated_record_samples=1.000,1.000,1.000,1.000,1.000
|
||||
sequential_header_reads_per_validated_record_median=1.000
|
||||
sequential_record_reads_per_validated_record_samples=1.000,1.000,1.000,1.000,1.000
|
||||
sequential_record_reads_per_validated_record_median=1.000
|
||||
sequential_materialization_reads_per_validated_record_samples=2.000,2.000,2.000,2.000,2.000
|
||||
sequential_materialization_reads_per_validated_record_median=2.000
|
||||
sequential_materialization_read_bytes_per_entry_samples=4172,4172,4172,4172,4172
|
||||
sequential_materialization_read_bytes_per_entry_median=4172
|
||||
sequential_record_reuse_hits_per_validated_record_samples=0,0,0,0,0
|
||||
sequential_record_reuse_hits_per_validated_record_median=0
|
||||
sequential_wal_wraps_samples=7.000,6.000,6.000,6.000,6.000
|
||||
sequential_wal_wraps_median=6.000
|
||||
scattered_mibps_samples=63.86,66.13,81.54,56.55,43.65
|
||||
scattered_mibps_median=63.86
|
||||
scattered_p99_ns_samples=2220691,2208120,2201888,2207386,2337337
|
||||
scattered_p99_ns_median=2208120
|
||||
scattered_unique_records_per_snapshot_entry_samples=1.000,1.000,1.000,1.000,1.000
|
||||
scattered_unique_records_per_snapshot_entry_median=1.000
|
||||
scattered_reuse_opportunities_per_snapshot_entry_samples=0,0,0,0,0
|
||||
scattered_reuse_opportunities_per_snapshot_entry_median=0
|
||||
scattered_header_reads_per_validated_record_samples=1.000,1.000,1.000,1.000,1.000
|
||||
scattered_header_reads_per_validated_record_median=1.000
|
||||
scattered_record_reads_per_validated_record_samples=1.000,1.000,1.000,1.000,1.000
|
||||
scattered_record_reads_per_validated_record_median=1.000
|
||||
scattered_materialization_reads_per_validated_record_samples=2.000,2.000,2.000,2.000,2.000
|
||||
scattered_materialization_reads_per_validated_record_median=2.000
|
||||
scattered_materialization_read_bytes_per_entry_samples=4172,4172,4172,4172,4172
|
||||
scattered_materialization_read_bytes_per_entry_median=4172
|
||||
scattered_record_reuse_hits_per_validated_record_samples=0,0,0,0,0
|
||||
scattered_record_reuse_hits_per_validated_record_median=0
|
||||
scattered_wal_wraps_samples=5.000,6.000,5.000,5.000,6.000
|
||||
scattered_wal_wraps_median=5.000
|
||||
batch_mibps_samples=77.75,88.87,116.70,64.87,66.22
|
||||
batch_mibps_median=77.75
|
||||
batch_p99_ns_samples=5816134,5741796,5765574,5770525,5782230
|
||||
batch_p99_ns_median=5770525
|
||||
batch_unique_records_per_snapshot_entry_samples=1.000,1.000,1.000,1.000,1.000
|
||||
batch_unique_records_per_snapshot_entry_median=1.000
|
||||
batch_reuse_opportunities_per_snapshot_entry_samples=0,0,0,0,0
|
||||
batch_reuse_opportunities_per_snapshot_entry_median=0
|
||||
batch_header_reads_per_validated_record_samples=1.000,1.000,1.000,1.000,1.000
|
||||
batch_header_reads_per_validated_record_median=1.000
|
||||
batch_record_reads_per_validated_record_samples=1.000,1.000,1.000,1.000,1.000
|
||||
batch_record_reads_per_validated_record_median=1.000
|
||||
batch_materialization_reads_per_validated_record_samples=2.000,2.000,2.000,2.000,2.000
|
||||
batch_materialization_reads_per_validated_record_median=2.000
|
||||
batch_materialization_read_bytes_per_entry_samples=4122,4112,3658,3730,3912
|
||||
batch_materialization_read_bytes_per_entry_median=3912
|
||||
batch_record_reuse_hits_per_validated_record_samples=0,0,0,0,0
|
||||
batch_record_reuse_hits_per_validated_record_median=0
|
||||
batch_wal_wraps_samples=9.000,9.000,9.000,9.000,9.000
|
||||
batch_wal_wraps_median=9.000
|
||||
multiblock_mibps_samples=54.74,58.98,45.92,49.20,53.41
|
||||
multiblock_mibps_median=53.41
|
||||
multiblock_p99_ns_samples=5892553,5731452,5786637,5803821,5791757
|
||||
multiblock_p99_ns_median=5791757
|
||||
multiblock_unique_records_per_snapshot_entry_samples=0.06250,0.06250,0.06250,0.06250,0.06250
|
||||
multiblock_unique_records_per_snapshot_entry_median=0.06250
|
||||
multiblock_reuse_opportunities_per_snapshot_entry_samples=0.9375,0.9375,0.9375,0.9375,0.9375
|
||||
multiblock_reuse_opportunities_per_snapshot_entry_median=0.9375
|
||||
multiblock_header_reads_per_validated_record_samples=1.000,1.000,1.000,1.000,1.000
|
||||
multiblock_header_reads_per_validated_record_median=1.000
|
||||
multiblock_record_reads_per_validated_record_samples=1.000,1.000,1.000,1.000,1.000
|
||||
multiblock_record_reads_per_validated_record_median=1.000
|
||||
multiblock_materialization_reads_per_validated_record_samples=2.000,2.000,2.000,2.000,2.000
|
||||
multiblock_materialization_reads_per_validated_record_median=2.000
|
||||
multiblock_materialization_read_bytes_per_entry_samples=58395,58565,56312,64007,65147
|
||||
multiblock_materialization_read_bytes_per_entry_median=58565
|
||||
multiblock_record_reuse_hits_per_validated_record_samples=0,0,0,0,0
|
||||
multiblock_record_reuse_hits_per_validated_record_median=0
|
||||
multiblock_wal_wraps_samples=9.000,9.000,9.000,8.000,9.000
|
||||
multiblock_wal_wraps_median=9.000
|
||||
sequential_duplicate_read_pass_count=5
|
||||
scattered_duplicate_read_pass_count=5
|
||||
sequential_wrap_pass_count=5
|
||||
strace_available=true
|
||||
scoped_product_materialization_reads=2048
|
||||
scoped_strace_pread64_calls=2048
|
||||
scoped_strace_matches_product_counter=true
|
||||
d2_single_read_candidate_admitted=true
|
||||
next_recommendation=implement_disabled_single_read_materialization
|
||||
phase172_wal_materialization_baseline_status=ok
|
||||
```
|
||||
|
||||
## Artifacts And Cleanup
|
||||
|
||||
```text
|
||||
artifact_path=/mnt/smb/work/share/g15d-k8s/phase172-d1-6dd89e7-20260730-050249/phase172-d1-6dd89e7-20260730-050249-artifacts.tar.gz
|
||||
archive_sha256=c04b2c1d8868d05cb3412b23e4508f63c3c98ba4ecb4c16570a465dc526b9277
|
||||
archive_file_count=105
|
||||
durable_archive_integrity=pass
|
||||
archive_filename_cr=false
|
||||
lingering_test_process=false
|
||||
temp_cleanup=pass
|
||||
lab_resource_cleanup=pass
|
||||
```
|
||||
|
||||
The archive contains the full gate summary, all 20 benchmark logs and metric
|
||||
value files, storage and geometry logs, race and vet logs, exact-path strace
|
||||
and probe output, script checksum, source provenance, and per-file checksums.
|
||||
|
||||
No product or gate finding was found. One QA-created audit filename initially
|
||||
contained a carriage return due to a PowerShell here-string; it was renamed
|
||||
before the final archive, and the discarded archive checksum is not used.
|
||||
-198
@@ -1,198 +0,0 @@
|
||||
# Phase 172 D2 Single-Read Materialization QA Sign-off
|
||||
|
||||
## Verdict
|
||||
|
||||
**PASS**
|
||||
|
||||
Exact commit `a46af56f850ab3faa03fcad92243bf1bad484a69` passed the
|
||||
unchanged Phase 172 D2 correctness gate on Linux m02. The disabled candidate
|
||||
uses one exact-file WAL read per validated record, while the shipped default
|
||||
continues to use the existing header-plus-record two-read path.
|
||||
|
||||
```text
|
||||
phase172_single_read_correctness_status=ok
|
||||
d3_shared_record_reuse_eligible=true
|
||||
```
|
||||
|
||||
No product, gate, artifact, or lab finding was found.
|
||||
|
||||
## Source And Environment
|
||||
|
||||
```text
|
||||
tested_sha=a46af56f850ab3faa03fcad92243bf1bad484a69
|
||||
tested_branch=qa/phase172-d2-a46af56
|
||||
source_dirty=false
|
||||
lab_host=m02
|
||||
go_version=go version go1.25.0 linux/amd64
|
||||
cgo_enabled=1
|
||||
kernel=Linux 6.17.0-23-generic #23~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 14 16:11:48 UTC 2 x86_64 GNU/Linux
|
||||
strace_version=strace -- version 6.8
|
||||
```
|
||||
|
||||
The exact commit was transferred as a verified Git bundle and cloned into an
|
||||
isolated clean worktree on m02. The shared development worktree and its
|
||||
unrelated modified files were not used or changed.
|
||||
|
||||
## Command
|
||||
|
||||
The committed gate script was run without modification:
|
||||
|
||||
```bash
|
||||
SW_BLOCK_ARTIFACT_DIR=/tmp/phase172-d2-a46af56-artifacts \
|
||||
bash scripts/run-phase172-single-read-correctness-gate.sh
|
||||
```
|
||||
|
||||
The external artifact directory kept the source worktree clean while the gate
|
||||
checked `git_dirty=false`.
|
||||
|
||||
## Exact Test Execution
|
||||
|
||||
All eight assigned top-level tests executed 20 times in the focused pass and
|
||||
20 times under `go test -race`. No test or subtest was skipped or missing:
|
||||
|
||||
| Test | Focused | Race |
|
||||
|---|---:|---:|
|
||||
| `TestWALStoreSingleReadMaterializationDisabledByDefault` | 20 | 20 |
|
||||
| `TestWALStoreSingleReadMaterializesOrdinaryAndMultiBlockRecords` | 20 | 20 |
|
||||
| `TestWALStoreSingleReadMaterializesLegacyRangeTrim` | 20 | 20 |
|
||||
| `TestWALStoreSingleReadFailsClosedOnInvalidRecord` | 20 | 20 |
|
||||
| `TestWALStoreSingleReadRejectsInvalidMultiBlockSemantics` | 20 | 20 |
|
||||
| `TestWALStoreSingleReadRejectsInvalidTrimSemantics` | 20 | 20 |
|
||||
| `TestWALStoreSingleReadFailureAtEachPhysicalRecordKeepsWholeSnapshot` | 20 | 20 |
|
||||
| `TestWALStoreSingleReadHandlesReverseGappedAndWrappedRecords` | 20 | 20 |
|
||||
|
||||
The focused log contains 36 distinct top-level test/subtest names, each with
|
||||
20 executions. The audit reported:
|
||||
|
||||
```text
|
||||
focused_skip_or_missing_count=0
|
||||
race_skip_or_missing_count=0
|
||||
focused_fail_count=0
|
||||
race_fail_count=0
|
||||
```
|
||||
|
||||
## Fail-Closed Review
|
||||
|
||||
The executed failure table covers:
|
||||
|
||||
- zero, short, long, and out-of-bounds record geometry;
|
||||
- short physical reads, stale LSN, corrupt length or payload, invalid flags,
|
||||
unsupported type, record LBA mismatch, dirty length mismatch, and dirty data
|
||||
offset mismatch;
|
||||
- multi-block reserved-count, base-LBA, data-offset, and dirty-length
|
||||
mismatches;
|
||||
- legacy range-trim record-length, unaligned/out-of-range data-offset, and
|
||||
dirty-length mismatches;
|
||||
- corruption at each of three physical record positions;
|
||||
- reverse, gapped, and ring-wrapped record placement.
|
||||
|
||||
Every failure case uses the same terminal-state assertion:
|
||||
|
||||
```text
|
||||
checkpoint_lsn=0
|
||||
logical_wal_tail=1
|
||||
physical_wal_tail=0
|
||||
dirty_entries=original_snapshot_size
|
||||
```
|
||||
|
||||
Thus no failed cycle publishes checkpoint progress, advances the WAL tail, or
|
||||
deletes a dirty entry. Earlier partial extent writes are allowed, but the
|
||||
checkpoint and dirty-map transition remains all-or-nothing.
|
||||
|
||||
The multi-block success test reports three logical materializations, three
|
||||
physical record reads, and zero actual record-reuse hits. Shared-record reuse
|
||||
is not claimed in D2.
|
||||
|
||||
## Exact-File Probes
|
||||
|
||||
The unchanged gate's candidate probe produced:
|
||||
|
||||
```text
|
||||
phase172_probe_single_read=true
|
||||
phase172_probe_validated_records=1024
|
||||
phase172_probe_header_read_ops=0
|
||||
phase172_probe_record_read_ops=1024
|
||||
phase172_probe_materialization_read_ops=1024
|
||||
|
||||
100.00 0.006696 6 1024 pread64
|
||||
```
|
||||
|
||||
An additional exact-file control probe with the candidate disabled confirmed
|
||||
the shipped default remains the two-read path:
|
||||
|
||||
```text
|
||||
phase172_probe_single_read=false
|
||||
phase172_probe_validated_records=1024
|
||||
phase172_probe_header_read_ops=1024
|
||||
phase172_probe_record_read_ops=1024
|
||||
phase172_probe_materialization_read_ops=2048
|
||||
|
||||
100.00 0.009566 4 2048 pread64
|
||||
```
|
||||
|
||||
The candidate switch is an unexported package test helper. Its environment
|
||||
variable is consumed only by a `_test.go` scoped probe. The commit changes no
|
||||
`cmd/` or chart file and adds no CLI, Helm, configuration, or production
|
||||
environment selector.
|
||||
|
||||
## Full Gate Summary
|
||||
|
||||
```text
|
||||
phase172_single_read_correctness_status=running
|
||||
git_sha=a46af56f850ab3faa03fcad92243bf1bad484a69
|
||||
git_dirty=false
|
||||
go_version=go_version_go1.25.0_linux/amd64
|
||||
kernel=Linux_6.17.0-23-generic_#23~24.04.1-Ubuntu_SMP_PREEMPT_DYNAMIC_Tue_Apr_14_16:11:48_UTC_2_x86_64_GNU/Linux
|
||||
TestWALStoreSingleReadMaterializationDisabledByDefault=pass
|
||||
TestWALStoreSingleReadMaterializesOrdinaryAndMultiBlockRecords=pass
|
||||
TestWALStoreSingleReadMaterializesLegacyRangeTrim=pass
|
||||
TestWALStoreSingleReadFailsClosedOnInvalidRecord=pass
|
||||
TestWALStoreSingleReadRejectsInvalidMultiBlockSemantics=pass
|
||||
TestWALStoreSingleReadRejectsInvalidTrimSemantics=pass
|
||||
TestWALStoreSingleReadFailureAtEachPhysicalRecordKeepsWholeSnapshot=pass
|
||||
TestWALStoreSingleReadHandlesReverseGappedAndWrappedRecords=pass
|
||||
focused_repeat_20=pass
|
||||
default_two_read_path=pass
|
||||
ordinary_single_read=pass
|
||||
legacy_range_trim_single_read=pass
|
||||
multiblock_single_read_without_reuse=pass
|
||||
invalid_geometry_fails_closed=pass
|
||||
short_read_fails_closed=pass
|
||||
stale_corrupt_flags_unsupported_fail_closed=pass
|
||||
ordinary_batch_trim_semantic_mismatches_fail_closed=pass
|
||||
failed_cycle_retains_wal_tail=pass
|
||||
physical_record_failure_positions=pass
|
||||
reverse_gapped_wrap=pass
|
||||
race_repeat_20=pass
|
||||
storage_regression=pass
|
||||
storage_vet=pass
|
||||
scoped_probe_single_read=true
|
||||
scoped_probe_validated_records=1024
|
||||
scoped_probe_header_reads=0
|
||||
scoped_probe_record_reads=1024
|
||||
scoped_probe_product_materialization_reads=1024
|
||||
scoped_probe_strace_pread64_calls=1024
|
||||
scoped_strace_matches_product_counter=true
|
||||
default_materialization_unchanged=true
|
||||
external_selector_added=false
|
||||
d3_shared_record_reuse_eligible=true
|
||||
phase172_single_read_correctness_status=ok
|
||||
```
|
||||
|
||||
## Artifacts And Cleanup
|
||||
|
||||
```text
|
||||
artifact_path=V:\share\g15d-k8s\phase172-d2-a46af56-20260730-124744\phase172-d2-a46af56-artifacts.tar.gz
|
||||
archive_sha256=b08c3c547c5df39205ea4067ea8cd85634f5ae93302cac8570f1a1cc56cd9219
|
||||
durable_archive_integrity=pass
|
||||
qa_matching_process_count=0
|
||||
qa_source_git_dirty=false
|
||||
qa_kubernetes_resources_touched=false
|
||||
remote_temp_cleanup_status=ok
|
||||
qa_cleanup_status=ok
|
||||
```
|
||||
|
||||
The archive contains the full gate summary, focused and race logs, storage
|
||||
regression and vet logs, candidate and default exact-file probe/strace output,
|
||||
the compiled probe binary and stores, gate stdout/stderr, and the independent
|
||||
execution audit.
|
||||
-106
@@ -1,106 +0,0 @@
|
||||
# Phase 172 D3 Shared-Record Materialization QA Sign-Off
|
||||
|
||||
## Verdict
|
||||
|
||||
**PASS**
|
||||
|
||||
- Exact commit: `7d099248993582eaeea66683089f45c55065320b`
|
||||
- Branch: `phase172-wal-materialization-pipeline`
|
||||
- Execution host: `M02` (`linux/amd64`, Go 1.25.0, `CGO_ENABLED=1`)
|
||||
- Source: isolated clean Linux clone at `/tmp/phase172-d3-qa-7d09924`
|
||||
- Gate command:
|
||||
|
||||
```bash
|
||||
SW_BLOCK_ARTIFACT_DIR=/tmp/phase172-d3-artifacts-7d09924 \
|
||||
bash scripts/run-phase172-shared-record-correctness-gate.sh
|
||||
```
|
||||
|
||||
- Gate exit: `0`
|
||||
- Committed gate SHA-256:
|
||||
`e91ee4e6d5d58f41d089ea85d9d3e9412c3b0b3d2a3bb62b9f2f50dd9c5c9339`
|
||||
|
||||
## Required Evidence
|
||||
|
||||
```text
|
||||
phase172_shared_record_correctness_status=running
|
||||
git_sha=7d099248993582eaeea66683089f45c55065320b
|
||||
git_dirty=false
|
||||
go_version=go_version_go1.25.0_linux/amd64
|
||||
kernel=Linux_6.17.0-23-generic_#23~24.04.1-Ubuntu_SMP_PREEMPT_DYNAMIC_Tue_Apr_14_16:11:48_UTC_2_x86_64_GNU/Linux
|
||||
TestWALStoreSingleReadMaterializationDisabledByDefault=pass
|
||||
TestWALStoreSingleReadMaterializesOrdinaryAndMultiBlockRecords=pass
|
||||
TestWALStoreSharedRecordMaterializationReadsEachRecordOnce=pass
|
||||
TestWALStoreSharedRecordMaterializationReadsRangeTrimOnce=pass
|
||||
TestWALStoreSharedRecordMaterializationConcurrentPartialOverwrite=pass
|
||||
TestWALStoreSharedRecordMaterializationSurvivesLegalRingWrap=pass
|
||||
TestWALStoreSharedRecordMaterializationFailsClosedOnMalformedRecord=pass
|
||||
focused_repeat_20=pass
|
||||
default_two_read_path_unchanged=pass
|
||||
d2_single_read_path_unchanged=pass
|
||||
ordinary_and_multiblock_shared_reuse=pass
|
||||
legacy_range_trim_shared_reuse=pass
|
||||
concurrent_partial_overwrite=pass
|
||||
legal_ring_wrap_recovery_reuse=pass
|
||||
malformed_shared_record_fails_closed=pass
|
||||
race_repeat_20=pass
|
||||
storage_regression=pass
|
||||
storage_vet=pass
|
||||
scoped_probe_shared_record=true
|
||||
scoped_probe_snapshot_entries=1024
|
||||
scoped_probe_unique_records=64
|
||||
scoped_probe_reuse_candidates=960
|
||||
scoped_probe_validated_records=1024
|
||||
scoped_probe_header_reads=0
|
||||
scoped_probe_record_reads=64
|
||||
scoped_probe_product_materialization_reads=64
|
||||
scoped_probe_reuse_hits=960
|
||||
scoped_probe_strace_pread64_calls=64
|
||||
scoped_strace_matches_product_counter=true
|
||||
cache_scope=single_flush_cycle
|
||||
cache_bound=one_decoded_record
|
||||
external_selector_added=false
|
||||
d4_equivalence_gate_eligible=true
|
||||
phase172_shared_record_correctness_status=ok
|
||||
```
|
||||
|
||||
The focused and CGO race logs contain no `SKIP` or `no tests to run`. Each of
|
||||
the seven top-level race tests ran exactly 20 times. A race-binary inspection
|
||||
on the same tree found `runtime.raceinit` and `runtime.racefuncenter`.
|
||||
|
||||
The exact-file `strace -P` summary reports 64 `pread64` calls. This matches
|
||||
`scoped_probe_product_materialization_reads=64` for 1,024 logical blocks in 64
|
||||
physical records. The path records 960 reuse hits and no header reads.
|
||||
|
||||
## Contract Checks
|
||||
|
||||
- Reuse compares both `WALOffset` and `RecordSize`; one decoded record is cached
|
||||
only inside one `flushOnceInternal` invocation.
|
||||
- Every reuse calls `validateMaterializedDirtyEntry`, independently validating
|
||||
LSN, LBA, logical length, and data offset before extent publication.
|
||||
- Malformed shared records, including `Reserved * blockSize` overflow, fail
|
||||
closed without changing checkpoint, logical/physical WAL tails, or dirty map.
|
||||
- The legal wrap fixture crash-reopens offset zero, reads once, reuses twice,
|
||||
and advances the physical tail exactly to the recovered head.
|
||||
- Concurrent partial overwrite publishes current old blocks, retains the newer
|
||||
same-LBA LSN dirty, preserves first-cycle tail, then publishes it next flush.
|
||||
- Default two-read and D2 single-read paths remain unchanged; no external
|
||||
selector was added.
|
||||
|
||||
## Artifacts
|
||||
|
||||
- Directory: `/mnt/smb/work/share/g15d-k8s/20260730-061645-phase172-d3-shared-record-materialization`
|
||||
- Archive: `/mnt/smb/work/share/g15d-k8s/20260730-061645-phase172-d3-shared-record-materialization.tar.gz`
|
||||
- Archive SHA-256: `6418511c7ab72a2053dc6bf12e2e9f96f40f8a9b079fb30bf3127e8a1de9534a`
|
||||
- Per-file hashes: `artifact-files.sha256` in the artifact directory/archive.
|
||||
|
||||
## Findings And Cleanup
|
||||
|
||||
- Product findings: none. Gate findings: none. Lab blockers: none.
|
||||
- All k3s nodes were Ready, m02 disk use was 65%, and no deploy was required.
|
||||
- SMB rejected timestamp preservation by `cp -a`; the partial QA-owned path was
|
||||
removed, then ordinary copying and SHA-256 verification succeeded.
|
||||
- The QA temporary bundle, Linux clone, and local artifact staging directory
|
||||
were removed after sign-off capture. Only persistent SMB evidence remains.
|
||||
No shared development worktree or Kubernetes resource was modified.
|
||||
|
||||
Phase 172 D3 is eligible to close and D4 may proceed.
|
||||
-108
@@ -1,108 +0,0 @@
|
||||
# Phase 173 D1 Fixed-Work Baseline QA Sign-Off
|
||||
|
||||
Verdict: **PASS** at `29897cc` on the dedicated m02 NVMe filesystem.
|
||||
|
||||
## Source And Run
|
||||
|
||||
```text
|
||||
commit=29897cc
|
||||
branch=phase173-storage-execution-architecture
|
||||
host=M02
|
||||
kernel=Linux 6.17.0-23-generic x86_64
|
||||
go=go1.25.0 linux/amd64
|
||||
store_source=/dev/nvme0n1p1
|
||||
store_filesystem=ext4 rw,noatime
|
||||
cpu_affinity=0-15
|
||||
scheduler=SCHED_OTHER priority 0
|
||||
thermal_celsius=34.0,27.8,34.0
|
||||
```
|
||||
|
||||
```bash
|
||||
SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/20260801T071605Z-phase173-d1-fixed-work-nvme \
|
||||
SW_BLOCK_PHASE173_STORE_DIR=/data/nvme/block/phase173-d1-stores-29897cc \
|
||||
bash scripts/run-phase173-fixed-work-baseline-gate.sh \
|
||||
/tmp/seaweed-block-qa-phase173-d1-29897cc
|
||||
```
|
||||
|
||||
The gate used fixed operations rather than Go benchmark auto-calibration. Each
|
||||
matrix point ran one full precondition pass against a persistent store. The
|
||||
measured runs reopened and recovered that same store. The second set used
|
||||
separate files and reversed shape/writer order.
|
||||
|
||||
## Terminal Evidence
|
||||
|
||||
```text
|
||||
contract=phase173-fixed-work-v1
|
||||
sets=2
|
||||
four_writer_runs_per_set=5
|
||||
diagnostic_runs_per_set=1
|
||||
fixed_work_result_count=64
|
||||
precondition_runs=32
|
||||
measured_store_reuse_required=true
|
||||
flusher_interval_ms=100
|
||||
flusher_phase_policy=restart_after_warmup_with_start_signal
|
||||
go_benchmark_autocalibration_allowed=false
|
||||
fixed_work_counter_reconciliation=true
|
||||
fixed_work_complete_drain=true
|
||||
fixed_work_correctness_samples=true
|
||||
four_writer_stability_gate=pass
|
||||
architecture_candidate_admission_allowed=true
|
||||
phase173_fixed_work_baseline_status=ok
|
||||
```
|
||||
|
||||
Every result had one final `Sync`, zero dirty entries, equal
|
||||
checkpoint/head/synced frontiers, `store_reused=true`, and
|
||||
`flusher_phase_reset=true`. Logical blocks reconciled with encoded WAL records;
|
||||
API calls reconciled with commit-lock observations; physical appends, wrap
|
||||
padding, and `WriteAt` calls reconciled separately.
|
||||
|
||||
## Stability Result
|
||||
|
||||
```text
|
||||
shape set1 set2 combined median MiB/s median p99 ns
|
||||
sequential_4k 1.065 1.143 1.143 208.383 1,144,308
|
||||
scattered_4k 1.042 1.129 1.129 214.366 1,147,132
|
||||
batch_16 1.047 1.076 1.078 277.290 5,336,886
|
||||
mounted_mixed 1.143 1.048 1.143 250.480 3,359,970
|
||||
limit <=1.250
|
||||
```
|
||||
|
||||
These are engine fixed-work baseline values. They are not mounted NVMe,
|
||||
frontend, RF3, or release performance claims.
|
||||
|
||||
## Harness Findings Retained
|
||||
|
||||
Earlier runs correctly held architecture admission and were not relabeled as
|
||||
passes:
|
||||
|
||||
- short 32 MiB samples could finish before one 100 ms flusher period;
|
||||
- `/tmp` selected the shared OS SATA SSD rather than the dedicated NVMe;
|
||||
- 256 MiB samples exhausted a different consumer-NVMe write/GC state across
|
||||
the full matrix;
|
||||
- recreating sparse store files measured allocator/device churn rather than a
|
||||
long-lived block volume;
|
||||
- the flusher ticker started at store creation, so post-warmup foreground runs
|
||||
inherited a random periodic phase and could report false-fast samples.
|
||||
|
||||
The final gate fixes those measurement defects without changing the shipped
|
||||
WALStore algorithm, durability boundary, default interval, or threshold.
|
||||
|
||||
## Additional Validation And Cleanup
|
||||
|
||||
```text
|
||||
linux_storage_tests=pass
|
||||
linux_storage_race=pass
|
||||
linux_storage_vet=pass
|
||||
store_residue_count=0
|
||||
```
|
||||
|
||||
Artifact:
|
||||
|
||||
```text
|
||||
/mnt/smb/work/share/g15d-k8s/20260801T071605Z-phase173-d1-fixed-work-nvme.tar.gz
|
||||
sha256=760805ac218b0b5e112d56976623669335c593fd1af88cfb3ae0ac190da07db1
|
||||
```
|
||||
|
||||
m02's k3s API was unavailable during preflight. D1 is an engine/filesystem
|
||||
gate and did not use Kubernetes; this does not weaken its result, but it must
|
||||
be repaired before any later mounted or cluster gate.
|
||||
-172
@@ -1,172 +0,0 @@
|
||||
# Phase 173 D2 Shipped-Path Attribution QA Sign-Off
|
||||
|
||||
Verdict: **PASS** at `f780cc4` on the dedicated m02 NVMe filesystem.
|
||||
|
||||
## Source And Run
|
||||
|
||||
```text
|
||||
commit=f780cc4
|
||||
branch=phase173-storage-execution-architecture
|
||||
host=M02
|
||||
kernel=Linux 6.17.0-23-generic x86_64
|
||||
go=go1.25.0 linux/amd64
|
||||
store_source=/dev/nvme0n1p1
|
||||
store_filesystem=ext4 rw,noatime
|
||||
shape=mounted_mixed
|
||||
writers=4
|
||||
```
|
||||
|
||||
```bash
|
||||
SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/20260801T074011Z-phase173-d2-close \
|
||||
SW_BLOCK_PHASE173_STORE_DIR=/data/nvme/block/20260801T074011Z-phase173-d2-close-stores \
|
||||
bash scripts/run-phase173-shipped-path-attribution-gate.sh \
|
||||
/tmp/seaweed-block-phase173-d2-f780cc4
|
||||
```
|
||||
|
||||
The source directory was a `git archive` of exactly `f780cc4`. The gate used
|
||||
one preconditioned persistent store, then reopened it for independent plain,
|
||||
CPU/memory-profile, exact-strace, and exact-perf runs.
|
||||
|
||||
## Terminal Evidence
|
||||
|
||||
```text
|
||||
phase173_shipped_path_attribution_status=ok
|
||||
scope=walstore_engine_checkpoint_path
|
||||
fixed_work_runs_reconciled=4
|
||||
product_counter_reconciliation=true
|
||||
cpu_profile_scope_exact=true
|
||||
memory_delta_scope_exact=true
|
||||
heap_profile_scope=post_window_after_gc
|
||||
allocs_profile_scope=process_cumulative_reference
|
||||
strace_scope_exact=true
|
||||
strace_product_counter_reconciliation=true
|
||||
perf_scope_exact=true
|
||||
perf_required_events_present=true
|
||||
iostat_device_observed=true
|
||||
checkpoint_frontiers_equal=true
|
||||
complete_drain=true
|
||||
architecture_candidate_selected=false
|
||||
optimization_code_present=false
|
||||
store_residue_count=0
|
||||
```
|
||||
|
||||
The CPU profile covers foreground through final drain. Exact memory deltas use
|
||||
`runtime.MemStats` over that same window. The heap profile is post-window and
|
||||
post-GC. Go's allocs profile is process-cumulative and is retained only as a
|
||||
function-level reference; it is not mislabeled as exact-window evidence.
|
||||
|
||||
## Fixed Work And Foreground
|
||||
|
||||
```text
|
||||
logical_operations=2560
|
||||
logical_blocks=16000
|
||||
logical_bytes=65536000
|
||||
foreground_ns=254058894
|
||||
foreground_mib_per_second=246.006
|
||||
final_sync_ns=8011919
|
||||
final_drain_ns=41494323
|
||||
measured_alloc_bytes=223983976
|
||||
measured_mallocs=49196
|
||||
measured_frees=49036
|
||||
measured_heap_alloc_start=2515616
|
||||
measured_heap_alloc_end=3764560
|
||||
```
|
||||
|
||||
The three non-strace runs were 235.174-246.006 MiB/s. Exact per-syscall tracing
|
||||
reduced its own run to 121.445 MiB/s, so the trace is used for operation-count
|
||||
reconciliation, not throughput admission.
|
||||
|
||||
Foreground stage counters from the plain run:
|
||||
|
||||
```text
|
||||
stage operations/bytes cumulative ns
|
||||
copy 16000 / 65536000 7173141
|
||||
encode 16000 / 66144000 26635621
|
||||
checksum 16000 / 66016000 12190529
|
||||
WAL physical append 2561 / 66145642 26779673
|
||||
WAL append lock wait 2561 calls implied 275727
|
||||
volume commit lock wait 2560 203396679
|
||||
dirty-map update 16000 6492432
|
||||
```
|
||||
|
||||
Encode includes its nested copy and checksum work, so those values must not be
|
||||
added as independent wall time. Commit-lock wait is accumulated across four
|
||||
concurrent writers and overlaps elapsed wall time; D2 does not call it a wall
|
||||
share or select an owner/queue redesign from that number alone.
|
||||
|
||||
## Flusher And Checkpoint
|
||||
|
||||
```text
|
||||
stage operations/bytes cumulative ns
|
||||
complete cycles 3 241180476
|
||||
snapshot 16000 entries 3229490
|
||||
opportunity analysis 3 cycles plus written sets 7858511
|
||||
WAL header pread 16000 / 608000 22757747
|
||||
WAL record pread 16000 / 66144000 32655078
|
||||
WAL decode and CRC 16000 / 66144000 40527294
|
||||
extent pwrite 16000 / 65536000 50519084
|
||||
extent fsync 3 53255381
|
||||
checkpoint pwrite 3 46548
|
||||
checkpoint fsync 3 3456795
|
||||
unattributed remainder 26874548
|
||||
```
|
||||
|
||||
All 16,000 records were validated and written, with zero decode/validation
|
||||
failure, superseded entry, dirty entry, or incomplete checkpoint frontier.
|
||||
|
||||
## Independent OS Evidence
|
||||
|
||||
The controlled test blocked after warmup. `strace` attached before foreground
|
||||
work and detached after final Sync, complete drain, and ten correctness reads,
|
||||
but before `Close` metadata I/O.
|
||||
|
||||
```text
|
||||
pread64=32010 = 16000 header + 16000 record + 10 correctness
|
||||
pwrite64=18564 = 2561 WAL + 16000 extent + 3 checkpoint
|
||||
sync=7 = 3 extent + 3 checkpoint + 1 final Sync
|
||||
```
|
||||
|
||||
Perf stat ran over the same controlled window with sudo because
|
||||
`perf_event_paranoid=4`:
|
||||
|
||||
```text
|
||||
task_clock=495298674
|
||||
cycles=1147474971
|
||||
instructions=1275404137
|
||||
cache_misses=7667121
|
||||
context_switches=4650
|
||||
cpu_migrations=89
|
||||
page_faults=2379
|
||||
```
|
||||
|
||||
The exact CPU profile had syscall execution at 36.59% flat,
|
||||
`flusher.flushOnceInternal` at 46.34% cumulative, WALStore foreground writes at
|
||||
about 14.6% cumulative, and `readDirtyRecord` at 26.83% cumulative. No single
|
||||
CPU function establishes an architecture boundary by itself.
|
||||
|
||||
## D2 Decision
|
||||
|
||||
D2 closes the local shipped WALStore engine/checkpoint attribution. It proves
|
||||
the complete logical-to-physical I/O accounting and names three facts for D3:
|
||||
|
||||
- four-writer commit-lock wait is large but concurrent/overlapping;
|
||||
- same-file pread/pwrite/fsync and syscall CPU are material;
|
||||
- the measured window allocates about 224 MB for 62.5 MiB logical data while
|
||||
retaining only about 3.8 MB at the endpoint.
|
||||
|
||||
These are control hypotheses, not selected optimizations. D3 must compare a
|
||||
no-contention writer, deferred-writeback foreground ceiling, prefilled
|
||||
flusher-only drain, same-device split-file scratch path, and the engine versus
|
||||
frontend/RF1/RF3 boundaries before selecting at most one direction.
|
||||
|
||||
## Artifact And Cleanup
|
||||
|
||||
```text
|
||||
/mnt/smb/work/share/g15d-k8s/20260801T074011Z-phase173-d2-close.tar.gz
|
||||
sha256=7647cf7f075afaf1d06a48c1b9ef3256ff864626b70633b000ff40246b6e4e9a
|
||||
source_dirs_remaining=0
|
||||
store_files_remaining=0
|
||||
processes_remaining=0
|
||||
```
|
||||
|
||||
This gate is engine/filesystem-only and does not require Kubernetes.
|
||||
-145
@@ -1,145 +0,0 @@
|
||||
# Phase 173 D3 Architecture Decision QA Sign-Off
|
||||
|
||||
Verdict: **PASS / NO BACKEND CHANGE**. Local diagnostic controls ran at
|
||||
`c4bb1991d750`; the mounted NVMe/TCP close control ran at
|
||||
`8ba98af72f360` after the teardown gate was hardened.
|
||||
|
||||
## Decision
|
||||
|
||||
Phase 173 selected no storage-backend candidate. This is an intended terminal
|
||||
outcome, not an incomplete implementation:
|
||||
|
||||
```text
|
||||
local_architecture_direction=no_backend_change_unstable_counterfactuals
|
||||
shipped_control_stability_gate=pass
|
||||
counterfactual_control_stability_gate=inconclusive
|
||||
diagnostic_controls_candidate_eligible=false
|
||||
architecture_candidate_selected=false
|
||||
product_mutation_present=false
|
||||
```
|
||||
|
||||
The authoritative D1 fixed-work baseline remained stable. The smaller D3
|
||||
counterfactual controls were retained as attribution evidence, but two exceeded
|
||||
their predeclared `1.25x` range. None of the three predeclared `1.30x` direction
|
||||
signals fired:
|
||||
|
||||
```text
|
||||
owner_queue_signal=false
|
||||
writeback_interference_signal=false
|
||||
media_separation_signal=false
|
||||
deferred_four_vs_shipped_four_ratio=0.256
|
||||
deferred_one_vs_deferred_four_ratio=0.557
|
||||
split_vs_shared_scratch_ratio=0.993
|
||||
```
|
||||
|
||||
Therefore an owner/queue rewrite, WAL/extent media split, or another local
|
||||
WALStore implementation would not be evidence-selected. D4-D8 are not
|
||||
applicable under the Phase 173 stop rules.
|
||||
|
||||
## Local Controls
|
||||
|
||||
The exact Linux run used `/dev/nvme0n1p1`, ext4, CPU set `0,2,4,6`, and
|
||||
`GOMAXPROCS=4`. Each control had five isolated process runs and used
|
||||
preconditioned persistent stores.
|
||||
|
||||
```text
|
||||
control median MiB/s max/min
|
||||
shipped concurrent, 4 writers 255.743 1.203
|
||||
deferred foreground, 1 writer 36.528 1.010
|
||||
deferred foreground, 4 writers 65.538 1.539
|
||||
prefilled flusher 366.112 1.585
|
||||
shared-file scratch 424.485 1.252
|
||||
split-file scratch 421.580 1.196
|
||||
```
|
||||
|
||||
All correctness and counter checks passed, the shipped diagnostic stayed
|
||||
inside its range, no diagnostic was presented as product throughput, and
|
||||
`store_residue_count=0`.
|
||||
|
||||
Earlier control runs that exposed allocation, CPU-placement, process-isolation,
|
||||
preconditioning, and noisy-benchmark parsing defects remain in the evidence
|
||||
share. They were not relabeled as passes:
|
||||
|
||||
```text
|
||||
20260801T075555Z-phase173-d3-local
|
||||
20260801T080104Z-phase173-d3-local
|
||||
20260801T080352Z-phase173-d3-local
|
||||
20260801T080623Z-phase173-d3-local
|
||||
20260801T080904Z-phase173-d3-local
|
||||
20260801T081147Z-phase173-d3-local
|
||||
20260801T081426Z-phase173-d3-local
|
||||
20260801T081634Z-phase173-d3-local
|
||||
```
|
||||
|
||||
## Adapter And Replication Attribution
|
||||
|
||||
The fixed-iteration component controls completed without fallback:
|
||||
|
||||
```text
|
||||
RF1 durable adapter: 61.28 MiB/s, 66,845 ns/op
|
||||
RF3 TCP, 1 writer: 91.56 MiB/s, 28,683 ns/op ACK wait
|
||||
RF3 TCP, 4 writers: 14.69 MiB/s, 1,068,505 ns/op ACK wait
|
||||
rf3_queue_saturation_observed=true
|
||||
rf1_rf3_component_attribution=complete
|
||||
```
|
||||
|
||||
These are component diagnostics with different contracts from the D1 engine
|
||||
baseline. They do not justify a direct throughput ratio or a backend change.
|
||||
They do justify measuring the adapter/frontend/replication boundary next.
|
||||
|
||||
## Mounted NVMe/TCP Close Control
|
||||
|
||||
The final independent run used matching images built from `8ba98af72f360` on
|
||||
all three schedulable nodes. The application ran on m02, the volume target ran
|
||||
on m01, and the publish target used the 100 GbE data network rather than the
|
||||
management LAN:
|
||||
|
||||
```text
|
||||
phase122_nvme_tcp_100gbe_baseline_status=ok
|
||||
publish_target=10.0.0.1:4420
|
||||
publish_target_route_dev=enp1s0np0
|
||||
internal_ip_not_reused_as_performance_target=true
|
||||
managed_volume_status=ready
|
||||
managed_volume_reason=first_volume_verified
|
||||
marker_verified=true
|
||||
seq_write_mibps=127.49
|
||||
seq_read_mibps=262.30
|
||||
small_write_iops=737.75
|
||||
final_data_verified=true
|
||||
pv_deleted_before_csi_uninstall=true
|
||||
cleanup_status=ok
|
||||
```
|
||||
|
||||
Cleanup evidence was zero across Kubernetes resources, NVMe targets, iSCSI,
|
||||
processes, multipath, and host paths.
|
||||
|
||||
## Gate Findings
|
||||
|
||||
The first mounted attempt exposed stale image distribution when blockmaster
|
||||
landed on tp01. The final run imported both exact images to m01, m02, and tp01.
|
||||
|
||||
An interrupted attempt also exposed an unsafe gate order: CSI was uninstalled
|
||||
before the external provisioner had deleted the PV. Commit `8ba98af` now waits
|
||||
for the exact PV to disappear while CSI is still available and records
|
||||
`pv_deleted_before_csi_uninstall=true`. A stale VolumeAttachment from the
|
||||
interrupted run was removed only after its PV was absent and both nodes proved
|
||||
there was no mount, NVMe connection, target subsystem, or process for its NQN.
|
||||
The final run began from and returned to a verifier-proven clean baseline.
|
||||
|
||||
The live run also produced repeated launcher Deployment/ReplicaSet churn while
|
||||
the deleted PVC was converging out of master inventory. It did not prevent
|
||||
safe detach, PV deletion, uninstall, or zero-residue cleanup. It is retained as
|
||||
future lifecycle-noise evidence, not treated as a Phase 173 backend finding.
|
||||
|
||||
## Artifacts
|
||||
|
||||
```text
|
||||
/mnt/smb/work/share/g15d-k8s/20260801T081908Z-phase173-d3-local.tar.gz
|
||||
sha256=a025832f484a06958c90e7c0049363df0a7f7a0607e65c06fc4f9aeda8231e51
|
||||
|
||||
/mnt/smb/work/share/g15d-k8s/20260801T081908Z-phase173-d3-mounted-rerun4.tar.gz
|
||||
sha256=bc716ea6590091cf730de8710d4a9de8a6abb34395e2424c46b2ac0807b7548b
|
||||
```
|
||||
|
||||
Phase 173 closes with WALStore and all shipped defaults unchanged. README and
|
||||
user capability claims do not change.
|
||||
-68
@@ -1,68 +0,0 @@
|
||||
# Phase 174 D2 Distinct-Node RF3 QA Sign-Off
|
||||
|
||||
Verdict: **PASS for distinct-node RF3 correctness and attribution; no
|
||||
architecture candidate selected.**
|
||||
|
||||
## Formal Run
|
||||
|
||||
- source: `7d75a47542a949963fd196b3635e99291011cd56`
|
||||
- primary: m02, `/data/nvme/block` on `/dev/nvme0n1p1`
|
||||
- replicas: m01 and tp01
|
||||
- transport: real TCP over the `192.168.1.x` management LAN
|
||||
- artifact:
|
||||
`/mnt/smb/work/share/g15d-k8s/20260801T102712Z-phase174-d2-rf3-distinct.tar.gz`
|
||||
- SHA256:
|
||||
`fc2a220e0183fcb77ea21473ec63cef9ecf4b17ce776f43db3d39389dba48bfb`
|
||||
|
||||
The fixed work was 16,384 deterministic 4 KiB writes per measured run. The
|
||||
foreground ACK profile remained `sync_quorum_rf3`. Probe, recovery, and the
|
||||
final SyncAll were outside the measured foreground interval.
|
||||
|
||||
| Writers | Median MiB/s | Max/min | Queue-terminal rows | Rebuilds |
|
||||
|---:|---:|---:|---:|---:|
|
||||
| 1 | 57.819 | 1.598 | 5/5 | 5 |
|
||||
| 4 | 13.054 | 1.010 | 0/5 | 2 |
|
||||
| 8 | 15.023 | 1.127 | 0/5 | 1 |
|
||||
|
||||
Required evidence passed:
|
||||
|
||||
- 15/15 primary rows and 6/6 independently reopened remote WALStores;
|
||||
- 30 live probes, two per row;
|
||||
- 8 full rebuilds selected by the existing `R < S` rule;
|
||||
- every remote store recovered `stable_lsn=head_lsn=104448` and verified
|
||||
final bytes;
|
||||
- foreground sync-quorum, post-measurement recovery, and final SyncAll all
|
||||
passed;
|
||||
- remote process/store residue count was zero.
|
||||
|
||||
## Findings
|
||||
|
||||
The first real run exposed a product defect: queue saturation cancelled old
|
||||
work but immediately installed a fresh steady queue before recovery closed the
|
||||
LSN gap. `deebcf9` now permits queue replacement only while the peer is
|
||||
positively `Healthy`; saturation remains terminal until the recovery handoff.
|
||||
The queue/recovery race tests passed 20 iterations under the Linux race
|
||||
detector.
|
||||
|
||||
An intermediate run correctly returned typed `WALRecycled`: the replica was at
|
||||
R=1024 while the primary tail/checkpoint had reached S=17408. The final gate
|
||||
uses the engine's existing classification (`R < S` means rebuild, otherwise
|
||||
catch up) instead of treating SyncAll as recovery.
|
||||
|
||||
No catch-up occurred because this WALStore configuration reports retention
|
||||
zero and every observed lag was outside the retained window. Distinct-node
|
||||
catch-up with an explicit retained window remains a D6 recovery gate; this D2
|
||||
run does not claim it.
|
||||
|
||||
The one-writer shape is unstable (`1.598x`, above `1.25x`), and the transport is
|
||||
the management LAN rather than 100 GbE. The four/eight-writer results are
|
||||
attribution data only. No throughput ratio can authorize D4/D5 implementation.
|
||||
|
||||
## Attempt Record
|
||||
|
||||
- `d1ef486`: failed before workload due stale helper listeners from an earlier
|
||||
failed gate; failure cleanup now stops scoped helper PIDs before removing
|
||||
their directories.
|
||||
- `d1ef486`: reached recovery and failed honestly with typed `WALRecycled`
|
||||
because the test helper fixed every lag to catch-up.
|
||||
- `7d75a47`: PASS after using the existing R/S/H recovery classification.
|
||||
@@ -1,52 +0,0 @@
|
||||
# Phase 174 D2 Distinct-Node RF3 QA
|
||||
|
||||
Run this gate from Windows Git Bash. It cross-compiles one test-only binary,
|
||||
uses m02 as primary, and runs persistent replica listeners on m01 and tp01.
|
||||
Each replica writes to its own host's NVMe filesystem. The transport is the
|
||||
shared `192.168.1.x` management LAN because tp01 has no RoCE interface; this is
|
||||
not a 100 GbE performance claim.
|
||||
|
||||
```bash
|
||||
cd /c/work/seaweed_block
|
||||
SW_BLOCK_PHASE174_SSH_KEY=/c/work/dev_server/testdev_key \
|
||||
bash scripts/run-phase174-distinct-node-rf3-gate.sh "$PWD"
|
||||
```
|
||||
|
||||
If the workstation Go toolchain is older than the module requirement, build
|
||||
the exact assignment commit's Linux test binary on a Go 1.25 host and pass it
|
||||
as `SW_BLOCK_PHASE174_PREBUILT_BINARY`. The gate copies but never modifies the
|
||||
provided binary.
|
||||
|
||||
## Contract
|
||||
|
||||
- 16,384 deterministic 4 KiB writes and 64 MiB per measured run;
|
||||
- 1, 4, and 8 writers, five runs each, after a persistent precondition run;
|
||||
- foreground ACK remains `sync_quorum_rf3`;
|
||||
- after the measured Sync, an explicitly excluded recovery phase probes each
|
||||
external replica, catches any lagging replica up from its durable `R+1`,
|
||||
or rebuilds it when `R < S` proves the WAL window has moved past it,
|
||||
completes the production-equivalent live-session handoff, and only then
|
||||
requires SyncAll;
|
||||
- each remote process stops, reopens WALStore, recovers the exact expected
|
||||
frontier, and verifies final payload bytes independently;
|
||||
- the primary also closes, reopens, recovers, and verifies bytes every run.
|
||||
|
||||
## Required Evidence
|
||||
|
||||
- `phase174_distinct_node_rf3_status=ok`;
|
||||
- 15 primary result rows and six independently recovered remote results;
|
||||
- `foreground_sync_quorum_preserved=true`;
|
||||
- `post_measurement_recovery_verified=true`;
|
||||
- `post_measurement_sync_all_verified=true`;
|
||||
- `remote_replica_frontiers_and_bytes_equal=true`;
|
||||
- `rf3_distinct_node_healthy=true`;
|
||||
- peer queue saturation is reported, not hidden;
|
||||
- every primary row reports two live probes; catch-up/rebuild counts and
|
||||
maximum LSN lag are preserved as evidence rather than inferred from the
|
||||
final barrier;
|
||||
- no cross-ACK-profile throughput ratio, candidate selection, or product
|
||||
mutation;
|
||||
- remote process/store cleanup leaves no gate residue.
|
||||
|
||||
This is D2 attribution/correctness evidence. It does not override the D1 local
|
||||
HOLD and cannot authorize D4/D5 implementation.
|
||||
@@ -1,88 +0,0 @@
|
||||
# Phase 33 F1 Live Negative QA Result
|
||||
|
||||
Status: PASS on 2026-05-28.
|
||||
|
||||
Source branch: `phase33-testops-failure-hardening`
|
||||
|
||||
Scenario:
|
||||
|
||||
- `testops/scenarios/helm-support-bundle-diagnostics-chain.yaml`
|
||||
|
||||
Run:
|
||||
|
||||
- `20260528-190738-51a2`
|
||||
- Result bundle: `C:\work\seaweed_block\results\phase33-f1-live-negative-r3\20260528-190738-51a2`
|
||||
- Demo artifacts: `V:\share\g15d-k8s\20260528-190738-51a2-helm-support-bundle\`
|
||||
|
||||
## Result
|
||||
|
||||
49/49 actions passed across all 8 phases:
|
||||
|
||||
- `pre_clean`
|
||||
- `build_and_generate_values`
|
||||
- `helm_install_stack`
|
||||
- `first_volume_kept_for_bundle`
|
||||
- `collect_support_bundle`
|
||||
- `blocked_bundle_asserts`
|
||||
- `failure_snapshot`
|
||||
- `helm_uninstall_cleanup`
|
||||
|
||||
## Evidence
|
||||
|
||||
Support bundle:
|
||||
|
||||
```text
|
||||
support_bundle_status=ok
|
||||
report_status=ok
|
||||
explain_status=ok
|
||||
timeline_status=ok
|
||||
capture_status=ok
|
||||
read_only=true
|
||||
```
|
||||
|
||||
Blocked-path explanation:
|
||||
|
||||
```text
|
||||
volume pvc-blocked status=blocked rf=3 reason=csi_node_image_pull_failed
|
||||
managed_volume pvc-blocked status=blocked reason=csi_node_image_pull_failed
|
||||
managed_volume_condition Ready status=False reason=csi_node_image_pull_failed severity=warning
|
||||
managed_volume_condition Blocked status=True reason=csi_node_image_pull_failed severity=warning
|
||||
managed_volume_action safe_k8s.import_csi_image mode=dry_run side_effect=safe_k8s executor=installer_or_operator
|
||||
```
|
||||
|
||||
Failure snapshot:
|
||||
|
||||
```text
|
||||
failure_snapshot_status=ok
|
||||
capture_failure_count=0
|
||||
read_only=true
|
||||
k8s_snapshot=k8s
|
||||
logs=logs
|
||||
host_snapshot=host
|
||||
```
|
||||
|
||||
Cleanup:
|
||||
|
||||
```text
|
||||
cleanup_status=ok
|
||||
k8s_residue_count=0
|
||||
iscsi_residue_count=0
|
||||
process_residue_count=0
|
||||
multipath_residue_count=0
|
||||
hostpath_residue_count=0
|
||||
failure_count=0
|
||||
```
|
||||
|
||||
## Fixes Verified
|
||||
|
||||
- `collect-helm-support-bundle.sh` no longer treats expected optional diagnostics
|
||||
such as no active iSCSI sessions as support-bundle failure.
|
||||
- `collect-k8s-failure-snapshot.sh` no longer treats expected optional
|
||||
diagnostics such as missing previous logs or no active iSCSI sessions as
|
||||
failure-snapshot failure.
|
||||
|
||||
## Verdict
|
||||
|
||||
F1 is release-gate green. The blocked CSI image-pull path does not claim
|
||||
`Ready=True`, carries stable reason `csi_node_image_pull_failed`, exports
|
||||
cold-readable support evidence, and cleans up with zero residue.
|
||||
-131
@@ -1,131 +0,0 @@
|
||||
# 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.
|
||||
+1
-1
@@ -196,7 +196,7 @@ Clean — helm uninstalled, both CRDs deleted, stubs deleted, PVC/PV deleted,
|
||||
## RE-VALIDATION (`e3cf010`) — PASS
|
||||
|
||||
Re-ran the exact live flow against `e3cf010 phase35: fix volume status action
|
||||
schema` (fresh images built + imported to m01/m02/tp01; `helm install … --set
|
||||
schema` (fresh images built + imported to node-a/node-b/node-c; `helm install … --set
|
||||
operatorStatus.create=true --set operatorStatus.dryRun=false`, exit=0).
|
||||
|
||||
### The fix
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ Source commit: `6859be1 phase35: cover stale operator status projections`
|
||||
Note: `6859be1` is **test-only** relative to `a2714c8` (the diff is
|
||||
`operator_status_controller_test.go` + two docs; zero product `.go`). The
|
||||
product binary is therefore the D4-validated `a2714c8` binary; the a2714c8
|
||||
images already on m01/m02/tp01 were reused (no rebuild). The D5 unit additions
|
||||
images already on node-a/node-b/node-c were reused (no rebuild). The D5 unit additions
|
||||
pass: `go test ./core/ops` → ok.
|
||||
|
||||
## How the gate was driven
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ deduplicates it instead of creating a fresh Event. Including `event.Type` keeps
|
||||
`Normal` and `Warning` for the same object/reason on distinct names.
|
||||
|
||||
Only `core/ops/kubernetes_status_writer.go` changed (product) vs `a2714c8`;
|
||||
fresh images built + imported to m01/m02/tp01. `go test ./core/ops` ok.
|
||||
fresh images built + imported to node-a/node-b/node-c. `go test ./core/ops` ok.
|
||||
|
||||
## Live results — repeated reconcile, no Event growth
|
||||
|
||||
|
||||
@@ -11,18 +11,18 @@ Date: 2026-06-05
|
||||
Source commit: `9900be5 phase36: project node readiness status`
|
||||
(branch `phase33-testops-failure-hardening`)
|
||||
|
||||
Environment: 3-node k3s `v1.34.4+k3s1` (m01/m02/tp01), write-mode operator-status
|
||||
Environment: 3-node k3s `v1.34.4+k3s1` (node-a/node-b/node-c), write-mode operator-status
|
||||
(`operatorStatus.create=true, dryRun=false`), fresh `9900be5` images on all nodes.
|
||||
|
||||
## G1 — Healthy 1-Node Lab — PASS
|
||||
|
||||
Default chart (single `blockNodes` entry, m02). Deployed controller patched
|
||||
Default chart (single `blockNodes` entry, node-b). Deployed controller patched
|
||||
`SwBlockCluster.status` live from blockmaster (`--master-api`):
|
||||
|
||||
```text
|
||||
SwBlockCluster.status.nodeCount=1
|
||||
node name=m02 k8s=m02 status=ready reason=node_ready ready=true schedulable=true
|
||||
operator-snapshot.json: node_count=1, nodes[0]={name:m02, status:ready, reason_code:node_ready, Ready=True}
|
||||
node name=node-b k8s=node-b status=ready reason=node_ready ready=true schedulable=true
|
||||
operator-snapshot.json: node_count=1, nodes[0]={name:node-b, status:ready, reason_code:node_ready, Ready=True}
|
||||
```
|
||||
|
||||
CRD status and operator-snapshot agree. PASS.
|
||||
@@ -34,10 +34,10 @@ nodes, real InternalIPs). All three launchers registered with blockmaster:
|
||||
|
||||
```text
|
||||
SwBlockCluster.status.nodeCount=3
|
||||
node=m01 k8s=m01 status=ready reason=node_ready ready=true
|
||||
node=m02 k8s=m02 status=ready reason=node_ready ready=true
|
||||
node=tp01 k8s=tp01 status=ready reason=node_ready ready=true
|
||||
operator-snapshot.json: node_count=3, names m01/m02/tp01 all status=ready
|
||||
node=node-a k8s=node-a status=ready reason=node_ready ready=true
|
||||
node=node-b k8s=node-b status=ready reason=node_ready ready=true
|
||||
node=node-c k8s=node-c status=ready reason=node_ready ready=true
|
||||
operator-snapshot.json: node_count=3, names node-a/node-b/node-c all status=ready
|
||||
```
|
||||
|
||||
One entry per observed k3s node; all ready/schedulable show
|
||||
@@ -61,7 +61,7 @@ Driven via a crafted `cluster-evidence.json` node with
|
||||
so the live controller's `sw-block` writes don't race it):
|
||||
|
||||
```text
|
||||
node=m02 status=blocked reason=image_missing_on_node ready=true
|
||||
node=node-b status=blocked reason=image_missing_on_node ready=true
|
||||
missingImages=["sw-block-csi:local"]
|
||||
node conditions: Ready=False (image_missing_on_node), Blocked=True (image_missing_on_node)
|
||||
cluster: readyVolumeCount=0, blockedVolumeCount=0, volumeCount=0, Ready=True conditions=0
|
||||
|
||||
+15
-15
@@ -31,7 +31,7 @@ SwBlockCluster.status.readyVolumeCount=1 volumeCount=1
|
||||
operator-snapshot.json: status=ready ; summary.txt: managed_volume=… status=ready reason=first_volume_verified
|
||||
dashboard /operator-snapshot.json: first_volume_verified, status=ready
|
||||
Event: Normal / first_volume_verified (name d5-vol-normal-first-volume-verified)
|
||||
writer/reader: pod 1/1 Running, log "D5_DATA" (wrote + read back on m02)
|
||||
writer/reader: pod 1/1 Running, log "D5_DATA" (wrote + read back on node-b)
|
||||
```
|
||||
|
||||
All surfaces agree; the consuming pod actually writes+reads (after the two
|
||||
@@ -126,22 +126,22 @@ failure_count=0`. Pass criterion met.
|
||||
|
||||
### F1 — build-alpha-images.sh does not import the CSI image into the build host's k3s (recurring; masked by status)
|
||||
|
||||
`sw-block-csi:local` was present on m01/tp01 (imported via
|
||||
`SW_BLOCK_IMPORT_K3S_NODES`) but **absent from m02's k3s containerd** — only
|
||||
present in m02's *docker*. The build host (m02) imports `sw-block:local` locally
|
||||
`sw-block-csi:local` was present on node-a/node-c (imported via
|
||||
`SW_BLOCK_IMPORT_K3S_NODES`) but **absent from node-b's k3s containerd** — only
|
||||
present in node-b's *docker*. The build host (node-b) imports `sw-block:local` locally
|
||||
but not `sw-block-csi:local`. Result on the default install: `sw-block-csi-node`
|
||||
on m02 is `Init:ErrImageNeverPull`, `CSINode m02` lists no driver, and any pod
|
||||
scheduled on m02 fails `AttachVolume` with
|
||||
`CSINode m02 does not contain driver block.csi.seaweedfs.com`.
|
||||
on node-b is `Init:ErrImageNeverPull`, `CSINode node-b` lists no driver, and any pod
|
||||
scheduled on node-b fails `AttachVolume` with
|
||||
`CSINode node-b does not contain driver block.csi.seaweedfs.com`.
|
||||
|
||||
This is **recurring** — it is almost certainly the same condition I previously
|
||||
mis-attributed to "iSCSI mount latency" in the Phase 35 D3 live first-volume
|
||||
(its pod never reached Running either). Worked around by
|
||||
`docker save sw-block-csi:local | k3s ctr -n k8s.io images import -` on m02 +
|
||||
restarting the m02 csi-node, after which the driver registered.
|
||||
`docker save sw-block-csi:local | k3s ctr -n k8s.io images import -` on node-b +
|
||||
restarting the node-b csi-node, after which the driver registered.
|
||||
|
||||
Crucially, the status surface showed the volume `ready/first_volume_verified`
|
||||
and node m02 `ready/node_ready` the whole time — a live instance of the **D2
|
||||
and node node-b `ready/node_ready` the whole time — a live instance of the **D2
|
||||
node-evidence gap** (live node evidence hardcodes ready/schedulable and does not
|
||||
detect a missing CSI image). Recommend: (a) fix the build to import the CSI image
|
||||
into the build host's k3s; (b) the D2 live-node follow-up (detect
|
||||
@@ -150,13 +150,13 @@ missing-image/CSINode-unregistered) so this is not masked.
|
||||
### F2 — default single-node install uses a loopback publish target (cross-node unusable)
|
||||
|
||||
The default chart `blockNodes[0].internalIP=127.0.0.1`, so the iSCSI target
|
||||
publishes on `127.0.0.1:3260`. A consumer pod on any node other than m02 attaches
|
||||
publishes on `127.0.0.1:3260`. A consumer pod on any node other than node-b attaches
|
||||
but fails to mount: `iscsiadm: cannot make connection to 127.0.0.1: Connection
|
||||
refused`. The volume is only usable by pods pinned to m02. The product already
|
||||
refused`. The volume is only usable by pods pinned to node-b. The product already
|
||||
has a `publish_target_loopback_cross_node` reason for this class; the default
|
||||
install simply ships the loopback value. Pinning `d5-rw` to m02 made it mount and
|
||||
install simply ships the loopback value. Pinning `d5-rw` to node-b made it mount and
|
||||
write/read cleanly. Non-blocking for D5, but worth a note in the default-install
|
||||
docs (single-node default = m02-local consumers only).
|
||||
docs (single-node default = node-b-local consumers only).
|
||||
|
||||
### F3 — force-deleting a pod with a mounted volume leaves a stale iSCSI node DB record
|
||||
|
||||
@@ -183,7 +183,7 @@ removed; final verifier `cleanup_status=ok`; 0 sw-block pods, 0 CRDs.
|
||||
create Events. Final cleanup verifier `cleanup_status=ok`.
|
||||
- **Three environment/build findings**, none a surface disagreement: F1
|
||||
(CSI image not imported to build-host k3s — recurring, masked by the D2 gap),
|
||||
F2 (default loopback publish target = m02-local only), F3 (force-delete leaves a
|
||||
F2 (default loopback publish target = node-b-local only), F3 (force-delete leaves a
|
||||
stale iSCSI node record). F1 is the most actionable — it has been silently
|
||||
failing live consumer pods since at least Phase 35 D3.
|
||||
- **D5 can close.** Recommend filing F1 (build import) and re-confirming the D2
|
||||
|
||||
+18
-18
@@ -31,21 +31,21 @@ and no 422 (G1/G2/G4/G5). Two issues remained on `6c5105d` (G3 precedence, B2
|
||||
incomplete) and are fixed on `052b321` — see Re-Validation.
|
||||
|
||||
Environment: 3-node k3s `v1.34.4+k3s1`, `values.day1.yaml` 3-node install,
|
||||
write-mode operator-status, fresh `6c5105d` images (CSI imported to m02 to work
|
||||
around the open F1 build gap). Faults induced on tp01 (least-critical agent),
|
||||
write-mode operator-status, fresh `6c5105d` images (CSI imported to node-b to work
|
||||
around the open F1 build gap). Faults induced on node-c (least-critical agent),
|
||||
restored between gates; final verifier `cleanup_status=ok`.
|
||||
|
||||
## G1 — Healthy Live Node Path — PASS
|
||||
|
||||
`nodeCount=3`; m01/m02/tp01 all `status=ready reason=node_ready ready=true
|
||||
`nodeCount=3`; node-a/node-b/node-c all `status=ready reason=node_ready ready=true
|
||||
schedulable=true`; CRD and operator-snapshot agree.
|
||||
|
||||
## G2 — SchedulingDisabled — PASS (B1 fixed)
|
||||
|
||||
`kubectl cordon tp01` →
|
||||
`kubectl cordon node-c` →
|
||||
|
||||
```text
|
||||
CRD tp01: status=blocked reason=node_scheduling_disabled schedulable=false ready=true
|
||||
CRD node-c: status=blocked reason=node_scheduling_disabled schedulable=false ready=true
|
||||
conditions: Blocked=True/node_scheduling_disabled Ready=False/node_scheduling_disabled
|
||||
```
|
||||
|
||||
@@ -54,12 +54,12 @@ CRD-valid condition types (`Ready`/`Blocked`), no 422. The exact scenario that
|
||||
|
||||
## G3 — NotReady — PARTIAL (precedence)
|
||||
|
||||
Stopped `k3s-agent` on tp01; the node Ready condition flipped to `Unknown` at
|
||||
Stopped `k3s-agent` on node-c; the node Ready condition flipped to `Unknown` at
|
||||
~60s. The enrichment correctly detected it (`ready=false`), and there is **no
|
||||
false `node_ready`** — but the headline is wrong:
|
||||
|
||||
```text
|
||||
CRD tp01: status=blocked reason=csi_node_pod_not_ready ready=false
|
||||
CRD node-c: status=blocked reason=csi_node_pod_not_ready ready=false
|
||||
conditions: Ready=Unknown/node_not_ready <-- root cause, present but outranked
|
||||
Ready=False/csi_node_pod_not_ready
|
||||
Blocked=True/csi_node_pod_not_ready
|
||||
@@ -80,11 +80,11 @@ keeps a healthy CSI pod — G2 is clean.)
|
||||
|
||||
## G4 — CSI Registration Blocker — PASS (B1 fixed; closes my F1 scenario)
|
||||
|
||||
Removed `sw-block-csi:local` from tp01's k3s and restarted its csi-node →
|
||||
`Init:ErrImagePull`, `CSINode tp01` lost its driver →
|
||||
Removed `sw-block-csi:local` from node-c's k3s and restarted its csi-node →
|
||||
`Init:ErrImagePull`, `CSINode node-c` lost its driver →
|
||||
|
||||
```text
|
||||
CRD tp01: status=blocked reason=csi_driver_not_registered
|
||||
CRD node-c: status=blocked reason=csi_driver_not_registered
|
||||
conditions: Ready=False/csi_driver_not_registered
|
||||
Ready=False/csi_node_pod_not_ready
|
||||
Blocked=True/csi_driver_not_registered
|
||||
@@ -120,8 +120,8 @@ The enricher (`EnrichNodeEvidence`) is invoked **only** inside
|
||||
via `readMasterClusterEvidence` / `BuildObservationFromBundle` and **do not
|
||||
enrich**.
|
||||
|
||||
Confirmed live: with tp01 cordoned, `ops report --master-api` showed
|
||||
`node=tp01 ... status=ready reason=node_ready schedulable=true` while the CRD
|
||||
Confirmed live: with node-c cordoned, `ops report --master-api` showed
|
||||
`node=node-c ... status=ready reason=node_ready schedulable=true` while the CRD
|
||||
correctly showed `blocked/node_scheduling_disabled`. So report/dashboard/explain
|
||||
disagree with the CRD for any non-healthy node — the G4 "CRD, report, dashboard,
|
||||
explain agree" requirement is not met.
|
||||
@@ -133,7 +133,7 @@ facts.
|
||||
|
||||
## Final Cleanup Verifier — cleanup_status=ok
|
||||
|
||||
`cleanup_status=ok`, all residue counters 0; tp01 uncordoned, agent restarted and
|
||||
`cleanup_status=ok`, all residue counters 0; node-c uncordoned, agent restarted and
|
||||
`Ready`, CSI restored. Pass criterion met.
|
||||
|
||||
## Bottom Line
|
||||
@@ -164,7 +164,7 @@ facts.
|
||||
## RE-VALIDATION (`052b321`) — PASS
|
||||
|
||||
Re-ran G3 and B2 live on `052b321` (fresh 3-node `values.day1.yaml` install,
|
||||
write-mode operator-status, faults on tp01, restored between gates).
|
||||
write-mode operator-status, faults on node-c, restored between gates).
|
||||
|
||||
### The fixes (verified in code)
|
||||
|
||||
@@ -182,11 +182,11 @@ write-mode operator-status, faults on tp01, restored between gates).
|
||||
|
||||
| Check | Result | Evidence |
|
||||
|---|---|---|
|
||||
| G3 NotReady → root cause | **PASS** | stopped `k3s-agent` on tp01 (Ready→Unknown): CRD `status=unknown reason=node_not_ready ready=false`; conditions `Ready=Unknown/node_not_ready`, `EvidenceStale=True/node_not_ready` — was `blocked/csi_node_pod_not_ready` on `6c5105d` |
|
||||
| G3 NotReady → root cause | **PASS** | stopped `k3s-agent` on node-c (Ready→Unknown): CRD `status=unknown reason=node_not_ready ready=false`; conditions `Ready=Unknown/node_not_ready`, `EvidenceStale=True/node_not_ready` — was `blocked/csi_node_pod_not_ready` on `6c5105d` |
|
||||
| G3 no false node_ready | **PASS** | `ready=false`, no `Ready=True` condition |
|
||||
| B2 report agrees with CRD | **PASS** | cordon tp01: CRD `blocked/node_scheduling_disabled`; `ops report --master-api` → `node=tp01 status=blocked reason=node_scheduling_disabled` |
|
||||
| B2 dashboard agrees | **PASS** | dashboard `/operator-snapshot.json` → `tp01` + `node_scheduling_disabled` |
|
||||
| Final cleanup verifier | **PASS** | `cleanup_status=ok`, all residue 0; tp01 `Ready`, agent restarted, CSI intact |
|
||||
| B2 report agrees with CRD | **PASS** | cordon node-c: CRD `blocked/node_scheduling_disabled`; `ops report --master-api` → `node=node-c status=blocked reason=node_scheduling_disabled` |
|
||||
| B2 dashboard agrees | **PASS** | dashboard `/operator-snapshot.json` → `node-c` + `node_scheduling_disabled` |
|
||||
| Final cleanup verifier | **PASS** | `cleanup_status=ok`, all residue 0; node-c `Ready`, agent restarted, CSI intact |
|
||||
|
||||
### Full D2 gate status (across the fix chain)
|
||||
|
||||
|
||||
+8
-8
@@ -27,17 +27,17 @@ Source commits: `c28ada7 phase37: project csi image pull node blockers` (partial
|
||||
|
||||
Environment: 3-node k3s `v1.34.4+k3s1`, `values.day1.yaml` install
|
||||
(`csiImage.pullPolicy` defaulted to `IfNotPresent`), write-mode operator-status,
|
||||
fresh `c28ada7` images. Missing-image fault induced on tp01 (remove
|
||||
fresh `c28ada7` images. Missing-image fault induced on node-c (remove
|
||||
`sw-block-csi:local` from its k3s + restart its csi-node), restored after.
|
||||
|
||||
## Core Detection — PASS (CRD / operator-status)
|
||||
|
||||
tp01 csi-node init container went `ErrImagePull` → `ImagePullBackOff`; its
|
||||
node-c csi-node init container went `ErrImagePull` → `ImagePullBackOff`; its
|
||||
CSINode driver deregistered. The CRD correctly headlines the image-pull root
|
||||
cause:
|
||||
|
||||
```text
|
||||
SwBlockCluster.status.nodes[tp01]:
|
||||
SwBlockCluster.status.nodes[node-c]:
|
||||
status=blocked reasonCode=image_missing_on_node
|
||||
missingImages=["sw-block-csi:local"]
|
||||
conditions: Ready=False/image_missing_on_node Blocked=True/image_missing_on_node
|
||||
@@ -64,7 +64,7 @@ With the missing-image fault active and pod `ImagePullBackOff`, CSINode
|
||||
deregistered:
|
||||
|
||||
```text
|
||||
CRD tp01: blocked / image_missing_on_node missing=["sw-block-csi:local"]
|
||||
CRD node-c: blocked / image_missing_on_node missing=["sw-block-csi:local"]
|
||||
ops report (default --namespace): blocked / csi_driver_not_registered missing_images=- (x2, consistent)
|
||||
ops report --namespace kube-system: blocked / image_missing_on_node missing_images=sw-block-csi:local
|
||||
```
|
||||
@@ -114,7 +114,7 @@ Non-blocking.
|
||||
|
||||
## Lab State
|
||||
|
||||
Clean — tp01 CSI image restored, `SwBlockCluster` stub deleted, helm uninstalled,
|
||||
Clean — node-c CSI image restored, `SwBlockCluster` stub deleted, helm uninstalled,
|
||||
both CRDs deleted; final verifier `cleanup_status=ok`, all residue 0; 0 sw-block
|
||||
pods/CRDs.
|
||||
|
||||
@@ -153,7 +153,7 @@ pods/CRDs.
|
||||
|
||||
### Live results
|
||||
|
||||
Same missing-image fault on tp01 (`IfNotPresent` → `ErrImagePull` →
|
||||
Same missing-image fault on node-c (`IfNotPresent` → `ErrImagePull` →
|
||||
`ImagePullBackOff`), then `pullPolicy=Never` → `ErrImageNeverPull`:
|
||||
|
||||
| Check | Result | Evidence |
|
||||
@@ -161,8 +161,8 @@ Same missing-image fault on tp01 (`IfNotPresent` → `ErrImagePull` →
|
||||
| CRD `image_missing_on_node` | PASS | `blocked/image_missing_on_node missing=["sw-block-csi:local"]` |
|
||||
| `ops report` **default namespace** agrees | PASS | `reason=image_missing_on_node missing_images=sw-block-csi:local` (was `csi_driver_not_registered` on `c28ada7`) |
|
||||
| `ops dashboard` **default namespace** agrees | PASS | `/operator-snapshot.json` → `image_missing_on_node` (only) |
|
||||
| `ErrImageNeverPull` (pullPolicy=Never) detected | PASS | patched DaemonSet to `Never`; tp01 init `ErrImageNeverPull`; CRD `blocked/image_missing_on_node missing=["sw-block-csi:local"]` |
|
||||
| Final cleanup verifier | PASS | `cleanup_status=ok`, all residue 0; tp01 CSI image restored |
|
||||
| `ErrImageNeverPull` (pullPolicy=Never) detected | PASS | patched DaemonSet to `Never`; node-c init `ErrImageNeverPull`; CRD `blocked/image_missing_on_node missing=["sw-block-csi:local"]` |
|
||||
| Final cleanup verifier | PASS | `cleanup_status=ok`, all residue 0; node-c CSI image restored |
|
||||
|
||||
### Bottom line
|
||||
|
||||
|
||||
+10
-10
@@ -22,16 +22,16 @@ evidence`; branch `phase33-testops-failure-hardening`)
|
||||
Synthetic bundle `host/host-prereq-summary.txt`:
|
||||
|
||||
```text
|
||||
node=m02 iscsi_prereq=missing multipath_prereq=ok command_iscsiadm=missing read_only=true
|
||||
node=tp01 iscsi_prereq=ok multipath_prereq=missing command_multipath=missing command_dmsetup=present read_only=true
|
||||
node=node-b iscsi_prereq=missing multipath_prereq=ok command_iscsiadm=missing read_only=true
|
||||
node=node-c iscsi_prereq=ok multipath_prereq=missing command_multipath=missing command_dmsetup=present read_only=true
|
||||
```
|
||||
|
||||
`sw-block ops report/dashboard --from-bundle`:
|
||||
|
||||
```text
|
||||
summary.txt:
|
||||
node=m02 status=blocked reason=iscsi_prereq_missing
|
||||
node=tp01 status=blocked reason=multipath_prereq_missing
|
||||
node=node-b status=blocked reason=iscsi_prereq_missing
|
||||
node=node-c status=blocked reason=multipath_prereq_missing
|
||||
operator-snapshot.json: iscsi_prereq_missing + multipath_prereq_missing present
|
||||
dashboard /operator-snapshot.json: HTTP 200, same reasons
|
||||
safe_next_step=observe.collect_bundle mode=read_only mutation_allowed=false
|
||||
@@ -58,7 +58,7 @@ validated directly with a faithful artifact matching the documented format:
|
||||
|
||||
```text
|
||||
issue=unsupported_cross_node_loopback_attach
|
||||
volume_id=pvc-xnode app_node=m01 blockvolume_node=m02 frontend=127.0.0.1:3260 replica_id=r1
|
||||
volume_id=pvc-xnode app_node=node-a blockvolume_node=node-b frontend=127.0.0.1:3260 replica_id=r1
|
||||
```
|
||||
|
||||
`sw-block ops report/explain/dashboard --from-bundle`:
|
||||
@@ -66,7 +66,7 @@ volume_id=pvc-xnode app_node=m01 blockvolume_node=m02 frontend=127.0.0.1:3260
|
||||
```text
|
||||
report: managed_volume=pvc-xnode status=blocked reason=publish_target_loopback_cross_node
|
||||
explain: volume pvc-xnode status=blocked reason=publish_target_loopback_cross_node
|
||||
condition Blocked: "app node m01 differs from blockvolume node m02;
|
||||
condition Blocked: "app node node-a differs from blockvolume node node-b;
|
||||
loopback frontend is not cross-node reachable"
|
||||
dashboard /operator-snapshot.json: HTTP 200, publish_target_loopback_cross_node
|
||||
operator-snapshot.json: publish_target_loopback_cross_node
|
||||
@@ -84,8 +84,8 @@ attempt (the fixture's app-vs-blockvolume node-mismatch rendering).
|
||||
|
||||
## D5 Same-Node Positive — NOT COMPLETED LIVE (environment)
|
||||
|
||||
Installed the default `--set` loopback config (blockNode m02 `internalIP=127.0.0.1`)
|
||||
and pinned a writer/reader pod to m02 (same node). The attach failed:
|
||||
Installed the default `--set` loopback config (blockNode node-b `internalIP=127.0.0.1`)
|
||||
and pinned a writer/reader pod to node-b (same node). The attach failed:
|
||||
|
||||
```text
|
||||
FailedAttachVolume: volume "pvc-…" has no publish target
|
||||
@@ -106,7 +106,7 @@ Two things that *are* confirmed here, both consistent with the gate intent:
|
||||
`publish_target_loopback_cross_node` — it surfaced `primary_unavailable`, so
|
||||
the loopback reason is not wrongly triggered for the same-node case.
|
||||
- The same-node writer/reader happy-path itself was already proven in Phase 36
|
||||
D5 (`values.day1.yaml`, pod pinned to m02, log `D5_DATA`).
|
||||
D5 (`values.day1.yaml`, pod pinned to node-b, log `D5_DATA`).
|
||||
|
||||
Not completed: a clean live same-node loopback attach with writer/reader on this
|
||||
default install (blocked by the launcher-skip), and the `swblock`-driven
|
||||
@@ -215,7 +215,7 @@ Live-produced `unsupported-cross-node-loopback-attach.txt`:
|
||||
```text
|
||||
issue=unsupported_cross_node_loopback_attach
|
||||
app_node=sw-block-not-the-blockvolume-node
|
||||
blockvolume_node=m01
|
||||
blockvolume_node=node-a
|
||||
frontend=127.0.0.1:3260
|
||||
volume_id=pvc-f36f31cb-f36b-4294-bcaf-66c702fcd0b0
|
||||
replica_id=r1
|
||||
|
||||
@@ -1,130 +0,0 @@
|
||||
# Phase 37 D4/D5 QA Assignment: Host Prereq And Loopback Blockers
|
||||
|
||||
Status: ready for QA.
|
||||
|
||||
Source branch: `phase33-testops-failure-hardening`.
|
||||
|
||||
Required source floor:
|
||||
|
||||
- `9e5a4ea phase37: carry host prereq evidence in bundles`
|
||||
- `c32e07a phase37: project loopback cross-node evidence`
|
||||
|
||||
## Goal
|
||||
|
||||
Validate the two remaining Phase 37 node-evidence blockers without widening the
|
||||
operator boundary:
|
||||
|
||||
- D4: iSCSI/multipath prerequisite evidence from read-only artifacts.
|
||||
- D5: loopback publish target is allowed only for same-node/local consumers and
|
||||
becomes visible as `publish_target_loopback_cross_node` for cross-node
|
||||
consumers.
|
||||
|
||||
The operator must not probe hosts with privileged commands and must not repair,
|
||||
reinstall, cleanup, mutate PVC/PV, or change image state.
|
||||
|
||||
## D4: Host Prereq Replay Gate
|
||||
|
||||
Use a synthetic or collected support/failure bundle containing:
|
||||
|
||||
```text
|
||||
host/host-prereq-summary.txt
|
||||
```
|
||||
|
||||
Minimum artifact examples:
|
||||
|
||||
```text
|
||||
node=m02 iscsi_prereq=missing multipath_prereq=ok command_iscsiadm=missing read_only=true
|
||||
node=tp01 iscsi_prereq=ok multipath_prereq=missing command_multipath=missing command_dmsetup=present read_only=true
|
||||
```
|
||||
|
||||
Run:
|
||||
|
||||
```bash
|
||||
sw-block ops report --from-bundle <bundle> --out /tmp/sw-block-report
|
||||
sw-block ops dashboard --from-bundle <bundle> --listen 127.0.0.1:9334
|
||||
sw-block ops explain --from-bundle <bundle>
|
||||
```
|
||||
|
||||
Pass criteria:
|
||||
|
||||
- `summary.txt` has node lines with `reason=iscsi_prereq_missing` and
|
||||
`reason=multipath_prereq_missing`.
|
||||
- `operator-snapshot.json` has the same node statuses and reasons.
|
||||
- Dashboard `/operator-snapshot.json` returns HTTP 200 and the same reasons.
|
||||
- Safe next steps mention read-only/scripted evidence collection or
|
||||
verification, with `mutation_allowed=false`.
|
||||
- No status surface suggests automatic host repair.
|
||||
|
||||
Optional live smoke:
|
||||
|
||||
- Run `scripts/collect-helm-support-bundle.sh` or
|
||||
`scripts/collect-k8s-failure-snapshot.sh`.
|
||||
- Confirm the produced bundle includes `host/host-prereq-summary.txt`.
|
||||
- Replay that bundle with `sw-block ops report --from-bundle`.
|
||||
|
||||
## D5: Loopback Cross-Node Gate
|
||||
|
||||
Run both existing TestOps scenarios from a clean lab:
|
||||
|
||||
```text
|
||||
testops/scenarios/same-node-alpha-attach-chain.yaml
|
||||
testops/scenarios/same-node-alpha-attach-negative-chain.yaml
|
||||
```
|
||||
|
||||
Pass criteria for same-node:
|
||||
|
||||
- Writer and reader verify successfully.
|
||||
- Loopback frontend remains accepted when app pod and blockvolume are on the
|
||||
same node.
|
||||
- No `publish_target_loopback_cross_node` appears in the healthy report.
|
||||
|
||||
Pass criteria for cross-node negative:
|
||||
|
||||
- Scenario exits through the expected unsupported-placement path.
|
||||
- `unsupported-cross-node-loopback-attach.txt` exists and names:
|
||||
`issue=unsupported_cross_node_loopback_attach`, `app_node`,
|
||||
`blockvolume_node`, `frontend=127.0.0.1:*`, and `volume_id`.
|
||||
- Replaying the result bundle with `sw-block ops report --from-bundle` produces
|
||||
`managed_volume ... status=blocked reason=publish_target_loopback_cross_node`.
|
||||
- `operator-snapshot.json`, dashboard `/operator-snapshot.json`, and
|
||||
`ops explain --from-bundle` agree on
|
||||
`publish_target_loopback_cross_node`.
|
||||
- No surface shows `Ready=True` for the cross-node loopback case.
|
||||
- The suggested action is dry-run/read-only, not an executed reinstall.
|
||||
|
||||
## Boundary Checks
|
||||
|
||||
Confirm the operator-status ServiceAccount still has no mutation power:
|
||||
|
||||
```bash
|
||||
kubectl auth can-i patch swblockvolumes --subresource=status --as system:serviceaccount:kube-system:sw-block-operator-status -n kube-system
|
||||
kubectl auth can-i create events --as system:serviceaccount:kube-system:sw-block-operator-status -n kube-system
|
||||
kubectl auth can-i patch pods --as system:serviceaccount:kube-system:sw-block-operator-status -n kube-system
|
||||
kubectl auth can-i patch pvc --as system:serviceaccount:kube-system:sw-block-operator-status -n default
|
||||
kubectl auth can-i update storageclasses --as system:serviceaccount:kube-system:sw-block-operator-status
|
||||
```
|
||||
|
||||
Expected:
|
||||
|
||||
- status patch and events: `yes`
|
||||
- pods/PVC/storageclasses: `no`
|
||||
|
||||
## Report
|
||||
|
||||
Write the sign-off to:
|
||||
|
||||
```text
|
||||
internal/docs/qa-assignments/phase37-d4-d5-host-prereq-loopback-qa-signoff.md
|
||||
```
|
||||
|
||||
Required verdict fields:
|
||||
|
||||
- source commit
|
||||
- D4 replay result
|
||||
- D4 optional live smoke result, or explicit reason skipped
|
||||
- D5 same-node result
|
||||
- D5 cross-node negative result
|
||||
- boundary result
|
||||
- final cleanup audit
|
||||
- blocking findings
|
||||
- non-blocking findings
|
||||
+7
-7
@@ -16,8 +16,8 @@ evidence gate`, `2ad2447 add dry-run action evidence gate`; branch
|
||||
`phase33-testops-failure-hardening`)
|
||||
|
||||
Environment: k3s `v1.34.4+k3s1`; from-bundle replays + a live write-mode install
|
||||
(operator-status pinned to m02). Note: tp01 was `NotReady`/unreachable during
|
||||
this run — see non-blocking findings; all gates were validated on m02/m01.
|
||||
(operator-status pinned to node-b). Note: node-c was `NotReady`/unreachable during
|
||||
this run — see non-blocking findings; all gates were validated on node-b/node-a.
|
||||
|
||||
## G1 — Local Contract Tests — PASS
|
||||
|
||||
@@ -129,12 +129,12 @@ None. The action-model executable contract holds end to end.
|
||||
|
||||
## Non-Blocking Findings
|
||||
|
||||
1. **Lab infra: tp01 is `NotReady`/unreachable.** During this run the image build
|
||||
1. **Lab infra: node-c is `NotReady`/unreachable.** During this run the image build
|
||||
failed importing to `192.168.1.188` with "No route to host", and
|
||||
`kubectl get nodes` shows tp01 `NotReady` (m01/m02 `Ready`). I cannot reach tp01
|
||||
`kubectl get nodes` shows node-c `NotReady` (node-a/node-b `Ready`). I cannot reach node-c
|
||||
to recover it (no SSH route). This is a lab-infrastructure issue, not a Phase
|
||||
38 defect — all gates were validated on m02/m01. Flag for the lab admin to
|
||||
bring tp01 back (and re-run any multi-node scenario that needs 3 nodes).
|
||||
38 defect — all gates were validated on node-b/node-a. Flag for the lab admin to
|
||||
bring node-c back (and re-run any multi-node scenario that needs 3 nodes).
|
||||
2. **`authority.request_promotion` is contract-only (intentional, worth noting).**
|
||||
It is a defined contract entry but is not surfaced on any live volume state, so
|
||||
it is exercised only by the evaluator (G2). This is the correct fail-closed
|
||||
@@ -148,4 +148,4 @@ None. The action-model executable contract holds end to end.
|
||||
and surfaced with camelCase CRD vocabulary aligned across report, explain,
|
||||
dashboard, operator-snapshot, and CRD status — with no mutation power added.
|
||||
- Proceed to **Phase 39 (finalizer/delete safety)** as planned. Recommend the lab
|
||||
admin restore tp01 before any Phase 39 multi-node delete-safety scenarios.
|
||||
admin restore node-c before any Phase 39 multi-node delete-safety scenarios.
|
||||
+9
-9
@@ -32,10 +32,10 @@ endpoint` (URL fixed, now 403; branch `phase33-testops-failure-hardening`)
|
||||
|
||||
## Lab Node Health
|
||||
|
||||
- m01 `Ready`, m02 `Ready`, **tp01 `NotReady`/unreachable** ("No route to host" on
|
||||
- node-a `Ready`, node-b `Ready`, **node-c `NotReady`/unreachable** ("No route to host" on
|
||||
SSH/image-import; same as Phase 38). D4/D5 are single-`SwBlockVolume` finalizer
|
||||
gates and do not need tp01; the install used operator-status pinned to m02 with
|
||||
the CSI image imported to m01 only. Flag for the lab admin to restore tp01
|
||||
gates and do not need node-c; the install used operator-status pinned to node-b with
|
||||
the CSI image imported to node-a only. Flag for the lab admin to restore node-c
|
||||
before D6 multi-volume isolation.
|
||||
|
||||
## RBAC Boundary — PASS (with a follow-on concern)
|
||||
@@ -144,7 +144,7 @@ and `del-vol` deleted.)
|
||||
1. **RBAC follow-on.** After the URL fix, verify the `finalizers` subresource
|
||||
permission (the SA lacks main `patch swblockvolumes`) authorizes the
|
||||
finalizer-only patch for add-on-fresh and remove-on-deleting.
|
||||
2. **Lab infra: tp01 `NotReady`/unreachable.** Not a Phase 39 defect; restore
|
||||
2. **Lab infra: node-c `NotReady`/unreachable.** Not a Phase 39 defect; restore
|
||||
before D6 multi-volume isolation.
|
||||
|
||||
## Recommendation for D6 (Multi-Volume Isolation)
|
||||
@@ -153,7 +153,7 @@ Do **not** advance to D6 yet. D6 multiplies the finalizer lifecycle across many
|
||||
volumes; it cannot pass while the single-volume finalizer patch 404s. Fix the
|
||||
`/finalizers` URL, add the envtest regression, re-run D4/D5 live (finalizer
|
||||
added → blocked-hold under a real `kubectl delete` → clean-release with one
|
||||
`finalizer_released` Event and object deletion completing), and restore tp01 —
|
||||
`finalizer_released` Event and object deletion completing), and restore node-c —
|
||||
then D6.
|
||||
|
||||
---
|
||||
@@ -233,7 +233,7 @@ and now the 403).
|
||||
finalizer → object stuck terminating).
|
||||
- Final cleanup: clean (`cleanup_status=ok`, residue 0); the stuck `del-vol` was
|
||||
cleared by an admin finalizer patch.
|
||||
- Lab: tp01 still `NotReady`/unreachable.
|
||||
- Lab: node-c still `NotReady`/unreachable.
|
||||
|
||||
### Bottom line (updated)
|
||||
|
||||
@@ -318,7 +318,7 @@ action.
|
||||
| D4 blocked delete-safety status | **BLOCKED** — `allowedActions[].mode=scripted` 422 |
|
||||
| D5 clean delete-safety status | PASS |
|
||||
| Final cleanup verifier | PASS (`cleanup_status=ok`, residue 0) |
|
||||
| Lab: tp01 | still `NotReady`/unreachable |
|
||||
| Lab: node-c | still `NotReady`/unreachable |
|
||||
|
||||
### Bottom line (status-only)
|
||||
|
||||
@@ -366,13 +366,13 @@ storage/workload/host mutation. PASS.
|
||||
| D4 blocked delete-safety status | **PASS** (`f167f9a`) |
|
||||
| D5 clean delete-safety status | PASS |
|
||||
| Final cleanup verifier | PASS |
|
||||
| Lab: tp01 | still `NotReady`/unreachable |
|
||||
| Lab: node-c | still `NotReady`/unreachable |
|
||||
|
||||
**D4 and D5 both pass on the status-only path.** The operator surfaces
|
||||
delete-safety (`blocked`/`releasable`, decision, `CleanupRequired`, the scripted
|
||||
verify_cleanup action, `finalizerReleaseAllowed` as a fact) and emits Events,
|
||||
with **zero finalizer/spec/storage/workload mutation** and an RBAC boundary that
|
||||
proves it. **Phase 39 D4/D5 can close; proceed to D6 multi-volume status
|
||||
isolation** (restore tp01 first if D6 exercises multiple nodes). Still recommend
|
||||
isolation** (restore node-c first if D6 exercises multiple nodes). Still recommend
|
||||
adding the live/envtest status-writer regression — it would have caught the
|
||||
404/403/422 chain before each handoff.
|
||||
-161
@@ -1,161 +0,0 @@
|
||||
# Phase 39 D4/D5 QA Assignment: Delete-Safety Status Boundary
|
||||
|
||||
Status: ready for QA after the lifecycle-owner pivot.
|
||||
|
||||
Required source floor:
|
||||
|
||||
- `1630de2 phase39: keep delete safety status-only`
|
||||
|
||||
Live QA on `b371e2e` proved CRD finalizer mutation cannot be bounded by
|
||||
`swblockvolumes/finalizers` RBAC alone. The chosen product direction is:
|
||||
operator-status remains status/events-only, while actual finalizer add/remove is
|
||||
deferred to a future component that owns the `SwBlockVolume` lifecycle.
|
||||
|
||||
## Goal
|
||||
|
||||
Validate that delete-safety remains observable and actionable without granting
|
||||
operator-status any finalizer, spec, workload, storage, or host mutation power.
|
||||
|
||||
The controller may write:
|
||||
|
||||
```text
|
||||
SwBlockCluster/status
|
||||
SwBlockVolume/status
|
||||
Kubernetes Events
|
||||
```
|
||||
|
||||
It must not write:
|
||||
|
||||
```text
|
||||
SwBlockVolume.metadata.finalizers
|
||||
SwBlockVolume.spec
|
||||
PVC/PV/Pod/Deployment/StorageClass/Secret/Node resources
|
||||
iSCSI/multipath/dmsetup/hostPath/Helm/storage state
|
||||
```
|
||||
|
||||
## Preflight
|
||||
|
||||
Use a clean lab. If multi-node gates are run, restore `tp01` first; Phase 38/39
|
||||
QA previously reported it as `NotReady`/unreachable.
|
||||
|
||||
Install with operator-status write mode:
|
||||
|
||||
```bash
|
||||
helm install sw-block charts/seaweed-block --namespace kube-system \
|
||||
--create-namespace -f values.day1.yaml \
|
||||
--set operatorStatus.create=true \
|
||||
--set operatorStatus.dryRun=false \
|
||||
--wait --timeout 10m
|
||||
```
|
||||
|
||||
Confirm RBAC:
|
||||
|
||||
```bash
|
||||
kubectl auth can-i patch swblockvolumes --subresource=status \
|
||||
--as system:serviceaccount:kube-system:sw-block-operator-status -n kube-system
|
||||
kubectl auth can-i create events \
|
||||
--as system:serviceaccount:kube-system:sw-block-operator-status -n kube-system
|
||||
kubectl auth can-i patch swblockvolumes \
|
||||
--as system:serviceaccount:kube-system:sw-block-operator-status -n kube-system
|
||||
kubectl auth can-i patch swblockvolumes --subresource=finalizers \
|
||||
--as system:serviceaccount:kube-system:sw-block-operator-status -n kube-system
|
||||
kubectl auth can-i patch pods \
|
||||
--as system:serviceaccount:kube-system:sw-block-operator-status -n kube-system
|
||||
kubectl auth can-i patch pvc \
|
||||
--as system:serviceaccount:kube-system:sw-block-operator-status -n default
|
||||
kubectl auth can-i update storageclasses \
|
||||
--as system:serviceaccount:kube-system:sw-block-operator-status
|
||||
```
|
||||
|
||||
Expected:
|
||||
|
||||
- status/events: `yes`,
|
||||
- main `swblockvolumes`, finalizers, pods/PVC/storageclasses: `no`.
|
||||
|
||||
## D4: Blocked Delete-Safety Status
|
||||
|
||||
Feed delete-safety evidence with residue, for example:
|
||||
|
||||
```text
|
||||
swblockvolume-delete-summary.txt:
|
||||
delete_requested=true
|
||||
finalizer_present=true
|
||||
volume_id=<volume-id>
|
||||
pvc_name=<pvc-name>
|
||||
pv_name=<pv-name>
|
||||
|
||||
cleanup-summary.txt:
|
||||
cleanup_status=failed
|
||||
iscsi_residue_count=1
|
||||
reason_codes=iscsi_node_records_present
|
||||
```
|
||||
|
||||
Pass criteria:
|
||||
|
||||
- `SwBlockVolume.status.deleteSafety.state=blocked`,
|
||||
- `SwBlockVolume.status.deleteSafety.decision=rejected`,
|
||||
- reason is the verifier reason or `cleanup_required`,
|
||||
- `status.conditions[]` includes `CleanupRequired=True`,
|
||||
- safe next action is `observe.verify_cleanup` or collect bundle with
|
||||
`mutationAllowed=false`,
|
||||
- no `Ready=True` or executed/released mutation claim appears,
|
||||
- `operator_status=... finalizer_patches=0`,
|
||||
- no finalizer-added or finalizer-released Events appear,
|
||||
- repeated reconcile does not mint unbounded Events,
|
||||
- no PVC/PV/Pod/Deployment/StorageClass/iSCSI/multipath/dmsetup/hostPath
|
||||
mutation is performed by operator-status.
|
||||
|
||||
## D5: Clean Delete-Safety Status
|
||||
|
||||
Feed clean cleanup evidence:
|
||||
|
||||
```text
|
||||
delete_requested=true
|
||||
finalizer_present=true
|
||||
volume_id=<volume-id>
|
||||
pvc_name=<pvc-name>
|
||||
pv_name=<pv-name>
|
||||
cleanup_status=ok
|
||||
k8s_residue_count=0
|
||||
iscsi_residue_count=0
|
||||
multipath_residue_count=0
|
||||
process_residue_count=0
|
||||
hostpath_residue_count=0
|
||||
failure_count=0
|
||||
```
|
||||
|
||||
Pass criteria:
|
||||
|
||||
- `SwBlockVolume.status.deleteSafety.state=releasable`,
|
||||
- `SwBlockVolume.status.deleteSafety.decision=allowed`,
|
||||
- `finalizerReleaseAllowed=true` is visible as a decision fact only,
|
||||
- no finalizer patch is attempted and no finalizer-released Event is emitted,
|
||||
- `operator_status=... finalizer_patches=0`,
|
||||
- repeated reconcile is idempotent,
|
||||
- final cleanup verifier returns `cleanup_status=ok`,
|
||||
- all residue counters are zero.
|
||||
|
||||
## D6 Preview: Multi-Volume Status Isolation
|
||||
|
||||
Do not test finalizer add/remove. Test that delete-safety evidence for volume A
|
||||
does not change volume B/C status, identity, publish target, or Events.
|
||||
|
||||
## Report
|
||||
|
||||
Write or update the sign-off at:
|
||||
|
||||
```text
|
||||
internal/docs/qa-assignments/phase39-d4-d5-finalizer-delete-safety-qa-signoff.md
|
||||
```
|
||||
|
||||
Required verdict fields:
|
||||
|
||||
- source commit,
|
||||
- lab node health, especially `tp01`,
|
||||
- RBAC boundary result,
|
||||
- D4 blocked delete-safety status result,
|
||||
- D5 clean delete-safety status result,
|
||||
- final cleanup audit,
|
||||
- blocking findings,
|
||||
- non-blocking findings,
|
||||
- recommendation for D6 multi-volume status isolation.
|
||||
+5
-5
@@ -18,11 +18,11 @@ on the validated floor `f167f9a phase39: allow scripted volume actions`; branch
|
||||
|
||||
## Lab Node Health
|
||||
|
||||
- m01 `Ready`, m02 `Ready`, **tp01 `NotReady`/unreachable** (unchanged since
|
||||
- node-a `Ready`, node-b `Ready`, **node-c `NotReady`/unreachable** (unchanged since
|
||||
Phase 38; "No route to host"). D6 is a status/events-only gate on three
|
||||
from-bundle volumes; it does not require a healthy 3-node RF=3 cluster. Install
|
||||
used operator-status pinned to m02 with the image re-imported from docker
|
||||
(binary unchanged from `f167f9a`; `afd98f5` is test/docs-only). Restore tp01
|
||||
used operator-status pinned to node-b with the image re-imported from docker
|
||||
(binary unchanged from `f167f9a`; `afd98f5` is test/docs-only). Restore node-c
|
||||
before any RF=3 live multi-node work.
|
||||
|
||||
## Evidence Shape
|
||||
@@ -122,7 +122,7 @@ completed deletion.
|
||||
clearing/refreshing `deleteSafety` for managed volumes that have no current
|
||||
delete evidence so a consumer never sees `status=ready` with
|
||||
`deleteSafety=blocked`.
|
||||
2. **Lab: tp01 `NotReady`/unreachable.** Lab infra; restore before RF=3 live work.
|
||||
2. **Lab: node-c `NotReady`/unreachable.** Lab infra; restore before RF=3 live work.
|
||||
3. **(Carried) live/envtest status-writer regression.** Six live-vs-mock CRD
|
||||
schema defects across this phase chain (D3 casing, D2/D37 condition enum,
|
||||
finalizer URL 404 → RBAC 403, scripted-mode 422) all passed `go test`/`helm
|
||||
@@ -137,5 +137,5 @@ observable and isolated per volume (blocked/releasable/decision/CleanupRequired/
|
||||
the scripted verify_cleanup action/`finalizerReleaseAllowed` as a fact), with
|
||||
RBAC-provable zero finalizer/spec/storage/workload mutation. **Phase 39 can
|
||||
close.** Track the stale-`deleteSafety` polish and the envtest-regression
|
||||
follow-up, and restore tp01 — these do not block close. Actual finalizer
|
||||
follow-up, and restore node-c — these do not block close. Actual finalizer
|
||||
add/remove remains correctly deferred to the future lifecycle-owner component.
|
||||
-99
@@ -1,99 +0,0 @@
|
||||
# Phase 39 D6 QA Assignment: Multi-Volume Delete-Safety Status Isolation
|
||||
|
||||
Status: ready for QA. D4/D5 status-boundary validation passed on `f167f9a`.
|
||||
|
||||
Required source floor:
|
||||
|
||||
- `f167f9a phase39: allow scripted volume actions`
|
||||
|
||||
## Goal
|
||||
|
||||
Validate that delete-safety evidence for one volume does not contaminate other
|
||||
volumes. This is a status/events-only gate. Do not test finalizer add/remove.
|
||||
|
||||
The operator-status controller may write only:
|
||||
|
||||
```text
|
||||
SwBlockCluster/status
|
||||
SwBlockVolume/status
|
||||
Kubernetes Events
|
||||
```
|
||||
|
||||
It must not patch `SwBlockVolume.metadata.finalizers`, `SwBlockVolume.spec`,
|
||||
PVCs, PVs, Pods, Deployments, StorageClasses, Secrets, Nodes, iSCSI, multipath,
|
||||
dmsetup, hostPath data, or Helm resources.
|
||||
|
||||
## Preflight
|
||||
|
||||
- Use a clean lab.
|
||||
- Restore `tp01` first if running on the 3-node RF=3 lab.
|
||||
- Install with `operatorStatus.create=true` and `operatorStatus.dryRun=false`.
|
||||
- Confirm RBAC:
|
||||
- `patch swblockclusters/status`: yes
|
||||
- `patch swblockvolumes/status`: yes
|
||||
- `create events`: yes
|
||||
- main `patch swblockvolumes`: no
|
||||
- `patch swblockvolumes --subresource=finalizers`: no
|
||||
- pod/PVC/PV/deployment/storageclass mutations: no
|
||||
|
||||
## Scenario Shape
|
||||
|
||||
Create or replay evidence for three managed volumes:
|
||||
|
||||
- Volume A: delete requested + cleanup residue.
|
||||
- Volume B: healthy and not deleting.
|
||||
- Volume C: clean delete-safety evidence or healthy, depending on available
|
||||
fixture.
|
||||
|
||||
Minimum expected status:
|
||||
|
||||
```text
|
||||
volume A: deleteSafety.state=blocked, decision=rejected
|
||||
volume B: status=ready, reasonCode=first_volume_verified
|
||||
volume C: status remains independent; if clean-delete evidence is used,
|
||||
deleteSafety.state=releasable, decision=allowed
|
||||
```
|
||||
|
||||
## Pass Criteria
|
||||
|
||||
- Volume A has `deleteSafety.state=blocked` and a stable residue reason.
|
||||
- Volume B keeps its original `volumeID`, `pvcName`, status, reason, and publish
|
||||
target identity.
|
||||
- Volume C keeps independent status; if it has clean delete-safety evidence, it
|
||||
becomes `releasable` without changing A/B.
|
||||
- `SwBlockCluster.status.volumeCount` and ready/blocked/stale counts match the
|
||||
three-volume evidence.
|
||||
- No cross-volume reason-code mix-up appears in CRD status, report,
|
||||
operator-snapshot, dashboard, or explain output.
|
||||
- Events, if emitted, reference the correct `SwBlockVolume` object only.
|
||||
- `operator_status=... finalizer_patches=0`.
|
||||
- No finalizer-added or finalizer-released Events appear.
|
||||
- Cleanup verifier ends with `cleanup_status=ok` and all residue counters zero.
|
||||
|
||||
## Failure Conditions
|
||||
|
||||
- Any volume other than A shows A's residue reason.
|
||||
- A blocked delete-safety decision prevents B/C status publication.
|
||||
- Any finalizer patch is attempted.
|
||||
- Any workload/storage/host mutation occurs from operator-status.
|
||||
- Any surface claims object deletion completed because of operator-status.
|
||||
|
||||
## Report
|
||||
|
||||
Write the sign-off to:
|
||||
|
||||
```text
|
||||
internal/docs/qa-assignments/phase39-d6-multi-volume-delete-safety-status-isolation-qa-signoff.md
|
||||
```
|
||||
|
||||
Include:
|
||||
|
||||
- source commit,
|
||||
- lab node health,
|
||||
- evidence shape used,
|
||||
- per-volume CRD status,
|
||||
- cross-surface agreement matrix,
|
||||
- RBAC boundary result,
|
||||
- final cleanup audit,
|
||||
- blocking/non-blocking findings,
|
||||
- recommendation for Phase 39 close.
|
||||
+18
-18
@@ -72,7 +72,7 @@ seaweed-block-csi:
|
||||
### G2 on the fresh release image — PASS (2026-06-14)
|
||||
|
||||
Ran the operator-status live write-mode path against the shipped release images
|
||||
(`sha-dc2972d0059b`, pulled into m01+m02 k3s) on the gated chart (`5f0566e`, lab
|
||||
(`sha-dc2972d0059b`, pulled into node-a+node-b k3s) on the gated chart (`5f0566e`, lab
|
||||
tree; chart unchanged through `340e05f`). Image preflight: the shipped blockmaster
|
||||
binary defines **both** `--launcher-durable-root` and `--launcher-durable-impl`
|
||||
(fully current), and `sw-block ops` exposes `operator-status`.
|
||||
@@ -146,7 +146,7 @@ writer/reader fails") for the as-published artifacts.
|
||||
Date: 2026-06-13
|
||||
|
||||
Source commit: `9a8df78 phase40: update beta candidate evidence` (branch
|
||||
`feature/sw-block` working tree, synced to `/tmp/seaweed_block` on m02)
|
||||
`feature/sw-block` working tree, synced to `/tmp/seaweed_block` on node-b)
|
||||
|
||||
Image(s):
|
||||
- **Tested-good:** fresh local build from `9a8df78` → `sw-block:local` /
|
||||
@@ -155,23 +155,23 @@ Image(s):
|
||||
`:sha-6260e46fd3be` — both lack `--launcher-durable-impl`; blockmaster crashes.
|
||||
|
||||
Runner: `swblock` from `sw-test-runner-standalone` `d45c60c` (built to
|
||||
`C:\work\swblock.exe`; runs from Windows, SSHes to m02).
|
||||
`C:\work\swblock.exe`; runs from Windows, SSHes to node-b).
|
||||
|
||||
## Lab Node Health
|
||||
|
||||
- m01 `Ready`, m02 `Ready`, **tp01 `NotReady`/unreachable** (Connection timed
|
||||
out; unchanged since Phase 37). Generated day1 values correctly exclude tp01
|
||||
(m01+m02 only), and the csi-node DaemonSet's desired count is 2 (tp01 excluded)
|
||||
— so the 2-node install does not wait on tp01. Restore tp01 before any RF=3
|
||||
- node-a `Ready`, node-b `Ready`, **node-c `NotReady`/unreachable** (Connection timed
|
||||
out; unchanged since Phase 37). Generated day1 values correctly exclude node-c
|
||||
(node-a+node-b only), and the csi-node DaemonSet's desired count is 2 (node-c excluded)
|
||||
— so the 2-node install does not wait on node-c. Restore node-c before any RF=3
|
||||
live multi-node gate.
|
||||
- Two lab-infra issues were hit and resolved during this run (neither is a
|
||||
product defect; both are recorded under Non-Blocking):
|
||||
1. **m02 disk pressure** (88% > k3s 85% image-GC-high-threshold) caused k3s to
|
||||
1. **node-b disk pressure** (88% > k3s 85% image-GC-high-threshold) caused k3s to
|
||||
continuously GC the unused `:local` images, so installs raced GC →
|
||||
`ErrImageNeverPull`. Reclaimed 54 GB of dangling docker layers (no project
|
||||
data touched) → 63%; GC stopped; installs stable.
|
||||
2. **`build-alpha-images.sh` remote import** did not refresh m01's containerd
|
||||
tag; pushed the fresh tar to m01 explicitly. (F1-class image-distribution
|
||||
2. **`build-alpha-images.sh` remote import** did not refresh node-a's containerd
|
||||
tag; pushed the fresh tar to node-a explicitly. (F1-class image-distribution
|
||||
friction.)
|
||||
|
||||
## Local Gate — PASS
|
||||
@@ -240,7 +240,7 @@ Status/events-only, exactly as claimed; no storage/workload/spec/finalizer
|
||||
mutation power. Note: the controller keys `SwBlockVolume` by **PVC name**
|
||||
(`sw-block-example-pvc`), not by `volume_id`.
|
||||
|
||||
## G3 — Negative Status — PASS (substance), full-install path blocked by tp01
|
||||
## G3 — Negative Status — PASS (substance), full-install path blocked by node-c
|
||||
|
||||
The negative-status substance was validated on `9a8df78` via the scenario's own
|
||||
cold synthetic-bundle + `sw-block ops explain`/`report` path (deterministic; no
|
||||
@@ -248,7 +248,7 @@ live cluster needed):
|
||||
|
||||
```text
|
||||
volume pvc-blocked status=blocked reason=csi_node_image_pull_failed
|
||||
condition Attach ... pod sw-block-csi-node waiting=ImagePullBackOff on node m02
|
||||
condition Attach ... pod sw-block-csi-node waiting=ImagePullBackOff on node node-b
|
||||
managed_volume_condition Ready status=False reason=csi_node_image_pull_failed
|
||||
managed_volume_condition Blocked status=True reason=csi_node_image_pull_failed
|
||||
safe action: import_csi_image mode=dry_run side_effect=safe_k8s decision=rejected
|
||||
@@ -263,7 +263,7 @@ Pass criteria met: stable blocked reason, no false `Ready=True` on any surface
|
||||
The full `helm-support-bundle-diagnostics-chain` live-install path was **not**
|
||||
run end-to-end because its `build_and_generate_values` phase hardcodes
|
||||
`SW_BLOCK_IMPORT_K3S_NODES='192.168.1.181,192.168.1.188'` under `set -euo
|
||||
pipefail`, and the `.188` (tp01) import aborts the step. Lab-infra block (tp01
|
||||
pipefail`, and the `.188` (node-c) import aborts the step. Lab-infra block (node-c
|
||||
down), not a product defect — see Non-Blocking.
|
||||
|
||||
## G4 — Status API Conformance TestOps Gate — PASS (with a fidelity caveat)
|
||||
@@ -329,13 +329,13 @@ resources), `hostpath_residue` (no `/var/lib/sw-block` testops residue),
|
||||
The six sub-gates derive from one status; the envtest harness for
|
||||
`KubernetesStatusClient` (real apiserver + real RBAC) remains the gap-closer
|
||||
for the live-only RBAC/subresource class.
|
||||
3. **`helm-support-bundle-diagnostics-chain` hardcodes tp01 in the build import
|
||||
3. **`helm-support-bundle-diagnostics-chain` hardcodes node-c in the build import
|
||||
list** (`SW_BLOCK_IMPORT_K3S_NODES='192.168.1.181,192.168.1.188'`, fail-fast),
|
||||
so it cannot run while tp01 is down. Recommend parameterizing the import node
|
||||
so it cannot run while node-c is down. Recommend parameterizing the import node
|
||||
list (env-overridable) so single-node-down labs can still run it.
|
||||
4. **tp01 `NotReady`/unreachable** — lab infra; restore before RF=3 live work.
|
||||
5. **m02 local-image GC under disk pressure** — `:local` images get pruned when
|
||||
m02 disk > 85%; keep m02 below the GC threshold (it was at 88%; 54 GB of
|
||||
4. **node-c `NotReady`/unreachable** — lab infra; restore before RF=3 live work.
|
||||
5. **node-b local-image GC under disk pressure** — `:local` images get pruned when
|
||||
node-b disk > 85%; keep node-b below the GC threshold (it was at 88%; 54 GB of
|
||||
dangling docker layers reclaimed this run → 63%) or use a registry image so
|
||||
`helm install --wait` does not race containerd GC.
|
||||
|
||||
|
||||
-167
@@ -1,167 +0,0 @@
|
||||
# QA Sign-off — Phase 41 Lifecycle Owner Foundation
|
||||
|
||||
Verdict: **PASS (non-mutating slice).** Phase 41 establishes the lifecycle-owner
|
||||
control boundary, converts delete-safety into executable preconditions, and ships
|
||||
a dry-run lifecycle-owner action surface — **without** turning `operator-status`
|
||||
into a mutating controller and **without** any finalizer add/remove. G1–G7 pass.
|
||||
|
||||
**Required carry-forward (recorded per the assignment):**
|
||||
|
||||
```text
|
||||
A full live-apiserver/envtest lifecycle-owner RBAC/admission gate is still
|
||||
required before any finalizer mutation (main-object patch swblockvolumes) can
|
||||
ship. Phase 41's API boundary gate (G2) is schema-aware/equivalent-RBAC, not a
|
||||
live apiserver/admission proof.
|
||||
```
|
||||
|
||||
Date: 2026-06-14
|
||||
Source: branch `phase41-lifecycle-owner-foundation` @ `43c7a87 phase41: prepare
|
||||
qa close handoff` (commits `d0ba1fb`..`b414a9f` + close handoff)
|
||||
Runner/env: local `go test` + PowerShell boundary gate on the branch tree; live
|
||||
`kubectl auth can-i` + `verify-helm-cleanup.sh` on the m02 k3s lab (clean).
|
||||
|
||||
## Lab Node Health
|
||||
|
||||
m01 `Ready`, m02 `Ready`, **tp01 `NotReady`/unreachable** (unchanged). Phase 41
|
||||
is non-mutating status/dry-run work; no multi-node RF=3 gate is required. Restore
|
||||
tp01 before any future live finalizer-mutation gate.
|
||||
|
||||
## G1 — Contract Review — PASS
|
||||
|
||||
Reviewed `lifecycle-owner-control-contract.md`,
|
||||
`lifecycle-owner-finalizer-strategy.md`, `current-plan.md`, `docs/roadmap.md`.
|
||||
|
||||
- Three roles are explicit and separately permissioned: **observer/status
|
||||
writer** (`operator-status`; CRD `/status` + Events only), **lifecycle owner**
|
||||
(separate; owns lifecycle metadata, may patch finalizers *only if a future
|
||||
phase proves the boundary*), **executor** (separate; not introduced here).
|
||||
- Finalizer mutation is explicitly **deferred** (strategy doc "Decision": "Phase
|
||||
41 does **not** ship `SwBlockVolume` finalizer add/remove").
|
||||
- Delete-safety is framed as **status guidance, not deletion protection**
|
||||
("Delete-safety is status-only guidance, not Kubernetes deletion protection").
|
||||
- Non-claims list excludes mutating operator, finalizer add/remove, automatic
|
||||
cleanup, rebuild, backup, NVMe — consistent across roadmap and current-plan.
|
||||
|
||||
No doc implies operator-status owns finalizers or that cleanup/deletion-protection/
|
||||
rebuild/backup/NVMe is delivered. Pass criteria met; no fail conditions present.
|
||||
|
||||
## G2 — API Boundary Gate — PASS (schema-aware; carry-forward applies)
|
||||
|
||||
`scripts/run-phase41-lifecycle-owner-api-boundary.ps1`
|
||||
(`results/phase41-api-boundary-qa/...-summary.txt`):
|
||||
|
||||
```text
|
||||
phase41_lifecycle_owner_api_boundary_status=ok
|
||||
go_test_core_ops=ok
|
||||
operator_status_main_patch_allowed=false
|
||||
lifecycle_owner_finalizer_patch_allowed=true
|
||||
lifecycle_owner_spec_patch_allowed=false
|
||||
lifecycle_owner_unrelated_metadata_patch_allowed=false
|
||||
finalizers_endpoint_allowed=false
|
||||
```
|
||||
|
||||
As the assignment notes, this is schema-aware/equivalent-RBAC (CRD schema + token
|
||||
RBAC equivalence), **not** a live-apiserver/admission envtest. Called out as the
|
||||
open carry-forward, not a product failure.
|
||||
|
||||
## G3 — Delete-Safety Decision Semantics — PASS
|
||||
|
||||
`go test ./core/ops -run
|
||||
'TestEvaluateSwBlockVolumeDeleteSafety|TestObservationBundle_DeleteSafety'` → `ok`.
|
||||
All decision behaviors green (both the evaluator and the observation-bundle
|
||||
projection):
|
||||
|
||||
```text
|
||||
clean evidence -> state=releasable decision=allowed release_allowed=true
|
||||
residue -> state=blocked decision=rejected release_allowed=false
|
||||
missing evidence -> state=requested decision=unknown release_allowed=false
|
||||
stale evidence -> state=requested decision=unknown reason=cleanup_evidence_stale
|
||||
not requested -> no premature decision
|
||||
```
|
||||
|
||||
Missing/stale never becomes `allowed`; missing is not reported as confirmed
|
||||
residue; data-plane `Ready` is not used to imply finalizer release is safe.
|
||||
|
||||
## G4 — Cleanup Freshness Source — PASS
|
||||
|
||||
`scripts/verify-helm-cleanup.sh` on the clean m02 lab:
|
||||
|
||||
```text
|
||||
cleanup_status=ok
|
||||
k8s_residue_count=0 iscsi_residue_count=0 process_residue_count=0
|
||||
multipath_residue_count=0 hostpath_residue_count=0
|
||||
cleanup_observed_at=2026-06-14T17:56:28Z
|
||||
```
|
||||
|
||||
`cleanup_observed_at` is present and RFC3339 UTC (`date -u +%Y-%m-%dT%H:%M:%SZ`,
|
||||
script line 237); `cleanup_status` and all residue counters are preserved; exit
|
||||
behavior unchanged (`exit 1` on failure, line 242). The verifier does not hide
|
||||
residue.
|
||||
|
||||
## G5 — Dry-Run Lifecycle-Owner Action Surface — PASS
|
||||
|
||||
`go test ./core/ops -run
|
||||
'TestOperatorStatusReconcilerProjectsDeleteSafetyWithoutFinalizerMutation|TestOperatorStatusReconcilerDeleteSafetyDoesNotContaminateOtherVolumes'`
|
||||
→ `ok`. The reconciler projects, for each delete-safety volume, an `allowedActions`
|
||||
entry `safe_k8s.release_swblockvolume_finalizer` with `Mode=dry_run`,
|
||||
`OwnerExecutor=lifecycle_owner`, `MutationAllowed=false`, and `Decision` equal to
|
||||
the volume's `deleteSafety` decision. `FinalizerPatchCount==0` and no
|
||||
`finalizer_added`/`finalizer_released` Events are emitted.
|
||||
|
||||
## G6 — Multi-Volume Isolation — PASS
|
||||
|
||||
The isolation test drives four volumes in one reconcile and asserts per-volume
|
||||
isolation:
|
||||
|
||||
```text
|
||||
A delete-a (blocked, iscsi_node_records_present) -> deleteSafety blocked / decision rejected
|
||||
B healthy-b (ready, first_volume_verified) -> NO deleteSafety (uncontaminated)
|
||||
C clean-c (clean evidence) -> deleteSafety releasable / decision allowed
|
||||
D stale-d (stale evidence) -> deleteSafety requested / decision unknown / cleanup_evidence_stale
|
||||
```
|
||||
|
||||
A does not contaminate B/C/D; C does not release A/B/D; D stays unknown only for
|
||||
D; each volume carries its own `deleteSafety` + dry-run lifecycle-owner action;
|
||||
`FinalizerPatchCount==0` (no finalizer mutation attempted).
|
||||
|
||||
## G7 — Live Boundary / Non-Mutation — PASS
|
||||
|
||||
Phase 41 makes **no change** to `operator-status` RBAC (git-confirmed: no Phase 41
|
||||
commit touches `templates/operator-status-rbac.yaml`; the only chart change is +2
|
||||
lines of SwBlockVolume CRD status schema). Fresh live `kubectl auth can-i` against
|
||||
the applied Phase 41 operator-status RBAC on the m02 apiserver:
|
||||
|
||||
```text
|
||||
patch swblockvolumes.block.seaweedfs.com => no
|
||||
patch swblockvolumes.block.seaweedfs.com --subresource=status => yes
|
||||
create events => yes
|
||||
patch pods => no
|
||||
patch persistentvolumeclaims => no
|
||||
update storageclasses.storage.k8s.io => no
|
||||
```
|
||||
|
||||
`operator-status` remains status/events-only on the live apiserver. (RBAC was
|
||||
applied for the check and removed; lab left clean.)
|
||||
|
||||
## Blocking Findings
|
||||
|
||||
None. Phase 41 is a non-mutating boundary + dry-run/status slice; it neither
|
||||
broadens `operator-status` nor executes any lifecycle mutation.
|
||||
|
||||
## Non-Blocking Findings / Carry-Forwards
|
||||
|
||||
1. **Live-apiserver/envtest lifecycle-owner RBAC/admission gate is still required
|
||||
before any finalizer mutation ships** (the explicit carry-forward above). G2 is
|
||||
schema-aware/equivalent-RBAC; it does not exercise a real apiserver admission
|
||||
path. This is the natural Phase 42 entry point.
|
||||
2. **tp01 `NotReady`** — lab infra; restore before any live finalizer-mutation or
|
||||
RF=3 gate.
|
||||
|
||||
## Recommendation
|
||||
|
||||
**Phase 41 can close** as the lifecycle-owner boundary + delete-safety
|
||||
preconditions + dry-run lifecycle-owner action surface, with `operator-status`
|
||||
provably still status/events-only. The next phase must build the real
|
||||
live-apiserver/admission proof for a constrained main-object finalizer patch
|
||||
before any actual finalizer add/remove is enabled. NVMe / rebuild / backup should
|
||||
remain deferred until that control-plane proof exists.
|
||||
+6
-6
@@ -13,7 +13,7 @@ rejects; `/status` subresource denied and main-object status proven unmutated;
|
||||
object integrity preserved after rejected patches; and create/update/patch/delete
|
||||
denied for all forbidden resources.
|
||||
|
||||
Re-ran on m02 (k3s v1.34.4): `GATE_EXIT=0`. Every criterion in the expanded
|
||||
Re-ran on node-b (k3s v1.34.4): `GATE_EXIT=0`. Every criterion in the expanded
|
||||
assignment holds:
|
||||
|
||||
```text
|
||||
@@ -46,7 +46,7 @@ deny legitimate patches; (b) a probe object drives an admission-propagation wait
|
||||
before the real assertions, with `admission_policy_propagated=true` added to the
|
||||
pass criteria.
|
||||
|
||||
Re-ran `bash scripts/run-phase42-lifecycle-owner-admission-gate.sh` on m02
|
||||
Re-ran `bash scripts/run-phase42-lifecycle-owner-admission-gate.sh` on node-b
|
||||
(k3s v1.34.4, VAP-capable), artifacts `/tmp/p42d1c`. `GATE_EXIT=0`, full summary:
|
||||
|
||||
```text
|
||||
@@ -94,7 +94,7 @@ dev's VAP-less rancher-desktop, and is exactly the class Phase 42 exists to catc
|
||||
Date: 2026-06-14
|
||||
Source: branch `phase41-lifecycle-owner-foundation` @ `bc5ffc0 phase42: add live
|
||||
lifecycle owner admission gate`
|
||||
Environment: m02 k3s **v1.34.4+k3s1** — `admissionregistration.k8s.io/v1`
|
||||
Environment: node-b k3s **v1.34.4+k3s1** — `admissionregistration.k8s.io/v1`
|
||||
`ValidatingAdmissionPolicy` + `ValidatingAdmissionPolicyBinding` served and
|
||||
enforced (this is **not** the env-blocked case; the gate's environment
|
||||
requirement is met).
|
||||
@@ -102,7 +102,7 @@ requirement is met).
|
||||
## How It Was Run
|
||||
|
||||
`bash scripts/run-phase42-lifecycle-owner-admission-gate.sh /tmp/seaweed_block`
|
||||
on m02 (`KUBECONFIG=/etc/rancher/k3s/k3s.yaml`), artifacts in `/tmp/p42d1`. A
|
||||
on node-b (`KUBECONFIG=/etc/rancher/k3s/k3s.yaml`), artifacts in `/tmp/p42d1`. A
|
||||
second diagnostic run injected a 25 s VAP-propagation wait after the policy apply
|
||||
to separate the propagation race from the policy logic.
|
||||
|
||||
@@ -195,13 +195,13 @@ it *did* enforce in run 2; it enforced the wrong outcome.
|
||||
1. Gate has no VAP-propagation wait; the negative checks are order/timing
|
||||
dependent. Add a readiness gate so a fixed policy is deterministically
|
||||
enforced before the checks. (Surface this even after #1 is fixed.)
|
||||
2. tp01 `NotReady` — unrelated to this single-node admission gate.
|
||||
2. node-c `NotReady` — unrelated to this single-node admission gate.
|
||||
|
||||
## Recommendation
|
||||
|
||||
**Hold Phase 42 D1.** The live gate did its job — it surfaced a real CEL defect
|
||||
that no mock could. Dev should: (a) `has()`-guard the optional-field comparisons
|
||||
in the VAP (status, ownerReferences, and any optional metadata), and (b) add a
|
||||
VAP-propagation readiness wait before the deny-checks. Then re-run on m02
|
||||
VAP-propagation readiness wait before the deny-checks. Then re-run on node-b
|
||||
(v1.34.4, VAP-capable) for the full G1–G4 sweep. I can re-run as soon as the fix
|
||||
lands.
|
||||
Loaded 100 of 340 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user