diff --git a/seaweed-block/.github/workflows/test.yml b/seaweed-block/.github/workflows/test.yml index 4f5b6a821a..ced9fcd027 100644 --- a/seaweed-block/.github/workflows/test.yml +++ b/seaweed-block/.github/workflows/test.yml @@ -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 diff --git a/seaweed-block/cmd/blockvolume/testdata/onezero-wrong-geometry-store.txt b/seaweed-block/cmd/blockvolume/testdata/onezero-wrong-geometry-store.txt index 65fff9cac6..f35c288c7f 100644 --- a/seaweed-block/cmd/blockvolume/testdata/onezero-wrong-geometry-store.txt +++ b/seaweed-block/cmd/blockvolume/testdata/onezero-wrong-geometry-store.txt @@ -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 ", then " " for each run of # non-zero bytes; every other byte is zero. diff --git a/seaweed-block/cmd/sw-block/main_test.go b/seaweed-block/cmd/sw-block/main_test.go index 0231872692..7bcb501df4 100644 --- a/seaweed-block/cmd/sw-block/main_test.go +++ b/seaweed-block/cmd/sw-block/main_test.go @@ -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 Ubuntu 24.04 6.8.0 containerd://2.0.0 -m02 Ready control-plane 10d v1.34.4+k3s1 192.168.1.184 Ubuntu 24.04 6.8.0 containerd://2.0.0 -tp01 Ready worker 10d v1.34.4+k3s1 192.168.1.188 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 Ubuntu 24.04 6.8.0 containerd://2.0.0 +node-b Ready control-plane 10d v1.34.4+k3s1 192.168.1.184 Ubuntu 24.04 6.8.0 containerd://2.0.0 +node-c Ready worker 10d v1.34.4+k3s1 192.168.1.188 Ubuntu 24.04 6.8.0 containerd://2.0.0 bad1 Ready,SchedulingDisabled worker 10d v1.34.4+k3s1 192.168.1.199 Ubuntu 24.04 6.8.0 containerd://2.0.0 bad2 NotReady worker 10d v1.34.4+k3s1 192.168.1.200 Ubuntu 24.04 6.8.0 containerd://2.0.0 bad3 Ready worker 10d v1.34.4+k3s1 127.0.0.1 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", diff --git a/seaweed-block/cmd/sw-block/state_persistence_test.go b/seaweed-block/cmd/sw-block/state_persistence_test.go index 19aa1a5764..3eea27369a 100644 --- a/seaweed-block/cmd/sw-block/state_persistence_test.go +++ b/seaweed-block/cmd/sw-block/state_persistence_test.go @@ -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") diff --git a/seaweed-block/core/frontend/nvme/group_sync_test.go b/seaweed-block/core/frontend/nvme/group_sync_test.go index 36443d560e..ee2979ea74 100644 --- a/seaweed-block/core/frontend/nvme/group_sync_test.go +++ b/seaweed-block/core/frontend/nvme/group_sync_test.go @@ -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") diff --git a/seaweed-block/core/host/master/event_ring_test.go b/seaweed-block/core/host/master/event_ring_test.go index 2e81b8bbc1..70fb30a028 100644 --- a/seaweed-block/core/host/master/event_ring_test.go +++ b/seaweed-block/core/host/master/event_ring_test.go @@ -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) diff --git a/seaweed-block/core/host/master/format_gate.go b/seaweed-block/core/host/master/format_gate.go index 07e90d8386..7fa2db0f99 100644 --- a/seaweed-block/core/host/master/format_gate.go +++ b/seaweed-block/core/host/master/format_gate.go @@ -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 { diff --git a/seaweed-block/core/host/master/format_gate_test.go b/seaweed-block/core/host/master/format_gate_test.go index 3882921876..43ffcf5344 100644 --- a/seaweed-block/core/host/master/format_gate_test.go +++ b/seaweed-block/core/host/master/format_gate_test.go @@ -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} { diff --git a/seaweed-block/core/host/master/format_level_new_cluster_test.go b/seaweed-block/core/host/master/format_level_new_cluster_test.go index e2cd395baa..c737a7b648 100644 --- a/seaweed-block/core/host/master/format_level_new_cluster_test.go +++ b/seaweed-block/core/host/master/format_level_new_cluster_test.go @@ -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 { diff --git a/seaweed-block/core/host/master/host.go b/seaweed-block/core/host/master/host.go index e61bb94129..407908c61a 100644 --- a/seaweed-block/core/host/master/host.go +++ b/seaweed-block/core/host/master/host.go @@ -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, diff --git a/seaweed-block/core/host/master/observation_service_test.go b/seaweed-block/core/host/master/observation_service_test.go index 23694dbeea..6d528584d5 100644 --- a/seaweed-block/core/host/master/observation_service_test.go +++ b/seaweed-block/core/host/master/observation_service_test.go @@ -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", }) diff --git a/seaweed-block/core/host/master/observation_snapshot.go b/seaweed-block/core/host/master/observation_snapshot.go index d1755dd506..6d3a7e0e82 100644 --- a/seaweed-block/core/host/master/observation_snapshot.go +++ b/seaweed-block/core/host/master/observation_snapshot.go @@ -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()) diff --git a/seaweed-block/core/host/master/observation_snapshot_test.go b/seaweed-block/core/host/master/observation_snapshot_test.go index 3a4dd940af..ed22298fc5 100644 --- a/seaweed-block/core/host/master/observation_snapshot_test.go +++ b/seaweed-block/core/host/master/observation_snapshot_test.go @@ -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) diff --git a/seaweed-block/core/host/master/server_host_identity_test.go b/seaweed-block/core/host/master/server_host_identity_test.go index 0dcbd7985e..2b07066b3b 100644 --- a/seaweed-block/core/host/master/server_host_identity_test.go +++ b/seaweed-block/core/host/master/server_host_identity_test.go @@ -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) diff --git a/seaweed-block/core/host/master/services.go b/seaweed-block/core/host/master/services.go index 7a89983f9e..01408b13dc 100644 --- a/seaweed-block/core/host/master/services.go +++ b/seaweed-block/core/host/master/services.go @@ -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. diff --git a/seaweed-block/core/host/master/store_attestation.go b/seaweed-block/core/host/master/store_attestation.go index 605bb57609..73cc199f09 100644 --- a/seaweed-block/core/host/master/store_attestation.go +++ b/seaweed-block/core/host/master/store_attestation.go @@ -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 { diff --git a/seaweed-block/core/host/master/v11_host_fake_test.go b/seaweed-block/core/host/master/v11_host_fake_test.go index bb3bd0e85a..6bf5519513 100644 --- a/seaweed-block/core/host/master/v11_host_fake_test.go +++ b/seaweed-block/core/host/master/v11_host_fake_test.go @@ -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 diff --git a/seaweed-block/core/host/master/workspace_binding.go b/seaweed-block/core/host/master/workspace_binding.go index fd44b04a11..03d1a6261d 100644 --- a/seaweed-block/core/host/master/workspace_binding.go +++ b/seaweed-block/core/host/master/workspace_binding.go @@ -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 diff --git a/seaweed-block/core/host/master/workspace_service.go b/seaweed-block/core/host/master/workspace_service.go index 0e20605db0..37f62f3fb0 100644 --- a/seaweed-block/core/host/master/workspace_service.go +++ b/seaweed-block/core/host/master/workspace_service.go @@ -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: diff --git a/seaweed-block/core/ops/kubernetes_node_evidence_test.go b/seaweed-block/core/ops/kubernetes_node_evidence_test.go index 4e4576a63c..5d9adf6430 100644 --- a/seaweed-block/core/ops/kubernetes_node_evidence_test.go +++ b/seaweed-block/core/ops/kubernetes_node_evidence_test.go @@ -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) diff --git a/seaweed-block/core/ops/managed_volume_model_test.go b/seaweed-block/core/ops/managed_volume_model_test.go index 303bf9dd88..2a606f1aa5 100644 --- a/seaweed-block/core/ops/managed_volume_model_test.go +++ b/seaweed-block/core/ops/managed_volume_model_test.go @@ -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{ diff --git a/seaweed-block/core/ops/observation_bundle_test.go b/seaweed-block/core/ops/observation_bundle_test.go index 5768619893..1094f7ddb3 100644 --- a/seaweed-block/core/ops/observation_bundle_test.go +++ b/seaweed-block/core/ops/observation_bundle_test.go @@ -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", diff --git a/seaweed-block/core/ops/observation_test.go b/seaweed-block/core/ops/observation_test.go index 4397c240ee..fce558f443 100644 --- a/seaweed-block/core/ops/observation_test.go +++ b/seaweed-block/core/ops/observation_test.go @@ -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, diff --git a/seaweed-block/core/ops/operator_snapshot_test.go b/seaweed-block/core/ops/operator_snapshot_test.go index 81026a96a6..3096c47d21 100644 --- a/seaweed-block/core/ops/operator_snapshot_test.go +++ b/seaweed-block/core/ops/operator_snapshot_test.go @@ -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, diff --git a/seaweed-block/core/ops/phase32_status_surface_test.go b/seaweed-block/core/ops/phase32_status_surface_test.go index 13d4323896..eaa246b94a 100644 --- a/seaweed-block/core/ops/phase32_status_surface_test.go +++ b/seaweed-block/core/ops/phase32_status_surface_test.go @@ -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) diff --git a/seaweed-block/core/storage/chunk_format_level_test.go b/seaweed-block/core/storage/chunk_format_level_test.go index 869f05668a..2d95d78055 100644 --- a/seaweed-block/core/storage/chunk_format_level_test.go +++ b/seaweed-block/core/storage/chunk_format_level_test.go @@ -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) { diff --git a/seaweed-block/core/storage/chunk_record_open.go b/seaweed-block/core/storage/chunk_record_open.go index a132e47650..8658976f87 100644 --- a/seaweed-block/core/storage/chunk_record_open.go +++ b/seaweed-block/core/storage/chunk_record_open.go @@ -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 diff --git a/seaweed-block/core/storage/chunk_record_runtime.go b/seaweed-block/core/storage/chunk_record_runtime.go index ae021842ff..c32db5297f 100644 --- a/seaweed-block/core/storage/chunk_record_runtime.go +++ b/seaweed-block/core/storage/chunk_record_runtime.go @@ -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) { diff --git a/seaweed-block/core/storage/chunk_ref_table.go b/seaweed-block/core/storage/chunk_ref_table.go index 08eb7240bd..b3a681554e 100644 --- a/seaweed-block/core/storage/chunk_ref_table.go +++ b/seaweed-block/core/storage/chunk_ref_table.go @@ -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 { diff --git a/seaweed-block/core/storage/chunk_space_baseline_test.go b/seaweed-block/core/storage/chunk_space_baseline_test.go index 8ddf182f27..a11cd16904 100644 --- a/seaweed-block/core/storage/chunk_space_baseline_test.go +++ b/seaweed-block/core/storage/chunk_space_baseline_test.go @@ -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 diff --git a/seaweed-block/deploy/k8s/alpha/README.md b/seaweed-block/deploy/k8s/alpha/README.md index 8c4cb69c86..117618d221 100644 --- a/seaweed-block/deploy/k8s/alpha/README.md +++ b/seaweed-block/deploy/k8s/alpha/README.md @@ -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 diff --git a/seaweed-block/docs/design/cut-cow-validation.md b/seaweed-block/docs/design/cut-cow-validation.md index 7ebff9e2db..7027aa4e78 100644 --- a/seaweed-block/docs/design/cut-cow-validation.md +++ b/seaweed-block/docs/design/cut-cow-validation.md @@ -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 diff --git a/seaweed-block/docs/design/invariants.md b/seaweed-block/docs/design/invariants.md index 250b6dee62..6d616638b6 100644 --- a/seaweed-block/docs/design/invariants.md +++ b/seaweed-block/docs/design/invariants.md @@ -1165,8 +1165,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 | @@ -1215,7 +1215,7 @@ Notes: | `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 | diff --git a/seaweed-block/docs/design/wal-v3-burst-admission.md b/seaweed-block/docs/design/wal-v3-burst-admission.md index dd29a0dbf0..0e414b610e 100644 --- a/seaweed-block/docs/design/wal-v3-burst-admission.md +++ b/seaweed-block/docs/design/wal-v3-burst-admission.md @@ -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. diff --git a/seaweed-block/docs/operations-v1.md b/seaweed-block/docs/operations-v1.md index 47f722b304..0a077930b0 100644 --- a/seaweed-block/docs/operations-v1.md +++ b/seaweed-block/docs/operations-v1.md @@ -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 ``` diff --git a/seaweed-block/docs/quickstart-kubernetes.md b/seaweed-block/docs/quickstart-kubernetes.md index 60fb2cb618..731225abc0 100644 --- a/seaweed-block/docs/quickstart-kubernetes.md +++ b/seaweed-block/docs/quickstart-kubernetes.md @@ -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 ``` diff --git a/seaweed-block/docs/spec/README.md b/seaweed-block/docs/spec/README.md index 3a43256433..bd2820c592 100644 --- a/seaweed-block/docs/spec/README.md +++ b/seaweed-block/docs/spec/README.md @@ -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 diff --git a/seaweed-block/docs/spec/cuttime/cfg/EXPECTED.txt b/seaweed-block/docs/spec/cuttime/cfg/EXPECTED.txt index f828c6b574..5fc285a049 100644 --- a/seaweed-block/docs/spec/cuttime/cfg/EXPECTED.txt +++ b/seaweed-block/docs/spec/cuttime/cfg/EXPECTED.txt @@ -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) diff --git a/seaweed-block/internal/docs/README.md b/seaweed-block/internal/docs/README.md index 62c3343c11..0b172944c0 100644 --- a/seaweed-block/internal/docs/README.md +++ b/seaweed-block/internal/docs/README.md @@ -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. | diff --git a/seaweed-block/internal/docs/finished-plans/phase10_finishedplan_light_use_install_lifecycle_operations_mvp.md b/seaweed-block/internal/docs/finished-plans/phase10_finishedplan_light_use_install_lifecycle_operations_mvp.md deleted file mode 100644 index 253c46f3d0..0000000000 --- a/seaweed-block/internal/docs/finished-plans/phase10_finishedplan_light_use_install_lifecycle_operations_mvp.md +++ /dev/null @@ -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: -``` - -### 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)`. diff --git a/seaweed-block/internal/docs/finished-plans/phase121_finishedplan_data_plane_address_capability.md b/seaweed-block/internal/docs/finished-plans/phase121_finishedplan_data_plane_address_capability.md deleted file mode 100644 index 3525c652ab..0000000000 --- a/seaweed-block/internal/docs/finished-plans/phase121_finishedplan_data_plane_address_capability.md +++ /dev/null @@ -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. diff --git a/seaweed-block/internal/docs/finished-plans/phase18_finishedplan_node_loss_survival_mvp.md b/seaweed-block/internal/docs/finished-plans/phase18_finishedplan_node_loss_survival_mvp.md deleted file mode 100644 index f5ec7b34dd..0000000000 --- a/seaweed-block/internal/docs/finished-plans/phase18_finishedplan_node_loss_survival_mvp.md +++ /dev/null @@ -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:`, - `--status-addr=127.0.0.1:`, 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:` 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=` 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=:` 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:`. -- 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=` and `frontends_non_loopback=` 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= --> 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. diff --git a/seaweed-block/internal/docs/finished-plans/phase19_finishedplan_control_plane_observation_ai_readable_ops_mvp.md b/seaweed-block/internal/docs/finished-plans/phase19_finishedplan_control_plane_observation_ai_readable_ops_mvp.md deleted file mode 100644 index 492ea5d329..0000000000 --- a/seaweed-block/internal/docs/finished-plans/phase19_finishedplan_control_plane_observation_ai_readable_ops_mvp.md +++ /dev/null @@ -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 -sw-block ops timeline volume -sw-block ops timeline volume -o jsonl -sw-block ops explain volume -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 -sw-block ops timeline volume --from-bundle -sw-block ops timeline volume --from-bundle -o jsonl -sw-block ops explain volume --from-bundle -``` - -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 ` - - `sw-block ops timeline volume --from-bundle -o jsonl` - - `sw-block ops explain volume --from-bundle ` -- `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 --namespace default --master 127.0.0.1:9333 -sw-block ops explain volume --namespace default --master 127.0.0.1:9333 -sw-block ops inventory --namespace default --master 127.0.0.1:9333 --out -``` - -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 [--master ] [-o json]` - - `sw-block ops volumes --namespace [--master ] [-o json]` - - live mode for `sw-block ops describe volume --namespace - [--master ] [--out ]` - - live mode for `sw-block ops explain volume --namespace - [--master ] [--out ]` -- `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 -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 -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. diff --git a/seaweed-block/internal/docs/finished-plans/phase1_finishedplan_frontend_protocol_readiness.md b/seaweed-block/internal/docs/finished-plans/phase1_finishedplan_frontend_protocol_readiness.md deleted file mode 100644 index 2f247ad216..0000000000 --- a/seaweed-block/internal/docs/finished-plans/phase1_finishedplan_frontend_protocol_readiness.md +++ /dev/null @@ -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 --env product_root= - --env ssh_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 `. - - 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. diff --git a/seaweed-block/internal/docs/finished-plans/phase20_finishedplan_activation_day1_ops_mvp.md b/seaweed-block/internal/docs/finished-plans/phase20_finishedplan_activation_day1_ops_mvp.md deleted file mode 100644 index b14f15456e..0000000000 --- a/seaweed-block/internal/docs/finished-plans/phase20_finishedplan_activation_day1_ops_mvp.md +++ /dev/null @@ -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-` 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 -sw-block ops volumes -sw-block ops describe volume -sw-block ops timeline volume -sw-block ops inventory --namespace --master --out -``` - -- 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. diff --git a/seaweed-block/internal/docs/finished-plans/phase38_finishedplan_lifecycle_action_model_executable_contract.md b/seaweed-block/internal/docs/finished-plans/phase38_finishedplan_lifecycle_action_model_executable_contract.md deleted file mode 100644 index 0a88834edb..0000000000 --- a/seaweed-block/internal/docs/finished-plans/phase38_finishedplan_lifecycle_action_model_executable_contract.md +++ /dev/null @@ -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. diff --git a/seaweed-block/internal/docs/finished-plans/phase39_finishedplan_delete_safety_status_boundary.md b/seaweed-block/internal/docs/finished-plans/phase39_finishedplan_delete_safety_status_boundary.md deleted file mode 100644 index c84fa42301..0000000000 --- a/seaweed-block/internal/docs/finished-plans/phase39_finishedplan_delete_safety_status_boundary.md +++ /dev/null @@ -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. diff --git a/seaweed-block/internal/docs/finished-plans/phase40_finishedplan_operator_production_hardening.md b/seaweed-block/internal/docs/finished-plans/phase40_finishedplan_operator_production_hardening.md deleted file mode 100644 index ad44444cc2..0000000000 --- a/seaweed-block/internal/docs/finished-plans/phase40_finishedplan_operator_production_hardening.md +++ /dev/null @@ -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. diff --git a/seaweed-block/internal/docs/finished-plans/phase9_finishedplan_light_use_operations_mvp.md b/seaweed-block/internal/docs/finished-plans/phase9_finishedplan_light_use_operations_mvp.md deleted file mode 100644 index 0a599f10fe..0000000000 --- a/seaweed-block/internal/docs/finished-plans/phase9_finishedplan_light_use_operations_mvp.md +++ /dev/null @@ -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 \ - --master \ - --status-addr \ - --out -``` - -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/.json - history/.json - locks/.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. diff --git a/seaweed-block/internal/docs/product-roadmap.md b/seaweed-block/internal/docs/product-roadmap.md index da1fcdd637..e4b25c6b92 100644 --- a/seaweed-block/internal/docs/product-roadmap.md +++ b/seaweed-block/internal/docs/product-roadmap.md @@ -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 @@ -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 diff --git a/seaweed-block/internal/docs/qa-assignments/QA-RUNBOOK-block-current-v1.md b/seaweed-block/internal/docs/qa-assignments/QA-RUNBOOK-block-current-v1.md deleted file mode 100644 index ca262cfa1a..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/QA-RUNBOOK-block-current-v1.md +++ /dev/null @@ -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 --ref --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/-chain.yaml` driven by - `scripts/run-phaseNN--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:` + -`…-csi:`) — **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--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\-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= --meta test_id= -meta branch= -meta commit= -``` - -> 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 `_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//`. - -### 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/ -COMMIT='' # the value passed as -meta commit= -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=` 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=` (and run `swblock` from a clean seaweed_block -> checkout). For a branch, resolve it first: `git -C C:\work\seaweed_block -> rev-parse ` 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 `_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: -chain.yaml -run: block-qa/ -commit: -bundle: /mnt/smb/work/share/testops/results/block-qa/ -dashboard: http://192.168.1.181:9099/?project=block-qa -terminal evidence: - _status=ok - -perf rows (if perf gate): - read_iops / write_iops / p99_ms / MiB/s ... -first failure, if any: ... -residue cleaned: -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= ` - -meta test_id=adhoc-block-debug -meta branch=dirty-local -meta commit=dirty-local -meta dirty=true ` - C:\work\seaweed_block\testops\scenarios\-chain.yaml -``` - -### Report Format - -```text -Verdict: DEBUG ONLY, not QA ACCEPT -reason: dirty local source / uncommitted image -source tested: -run: block-dev/ -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 [EXPECT_VARS]` (so QA does not - paste python)? diff --git a/seaweed-block/internal/docs/qa-assignments/csi-rf1-durable-blockvolume-restart-validation.md b/seaweed-block/internal/docs/qa-assignments/csi-rf1-durable-blockvolume-restart-validation.md deleted file mode 100644 index 13d34e4c3c..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/csi-rf1-durable-blockvolume-restart-validation.md +++ /dev/null @@ -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//`. -- `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//`. -- `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-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. diff --git a/seaweed-block/internal/docs/qa-assignments/iscsi-p2-p3-lab-validation.md b/seaweed-block/internal/docs/qa-assignments/iscsi-p2-p3-lab-validation.md deleted file mode 100644 index bae3e3827a..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/iscsi-p2-p3-lab-validation.md +++ /dev/null @@ -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. diff --git a/seaweed-block/internal/docs/qa-assignments/iscsi-p4-chap-lab-validation.md b/seaweed-block/internal/docs/qa-assignments/iscsi-p4-chap-lab-validation.md deleted file mode 100644 index 0b255d8609..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/iscsi-p4-chap-lab-validation.md +++ /dev/null @@ -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. diff --git a/seaweed-block/internal/docs/qa-assignments/iscsi-p4-k8s-chap-validation.md b/seaweed-block/internal/docs/qa-assignments/iscsi-p4-k8s-chap-validation.md deleted file mode 100644 index 3260a4201f..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/iscsi-p4-k8s-chap-validation.md +++ /dev/null @@ -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. diff --git a/seaweed-block/internal/docs/qa-assignments/iscsi-p5-csi-node-lifecycle-validation.md b/seaweed-block/internal/docs/qa-assignments/iscsi-p5-csi-node-lifecycle-validation.md index ef59f6da34..9838e5aa00 100644 --- a/seaweed-block/internal/docs/qa-assignments/iscsi-p5-csi-node-lifecycle-validation.md +++ b/seaweed-block/internal/docs/qa-assignments/iscsi-p5-csi-node-lifecycle-validation.md @@ -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: diff --git a/seaweed-block/internal/docs/qa-assignments/iscsi-p6-alua-mpio-lab-validation.md b/seaweed-block/internal/docs/qa-assignments/iscsi-p6-alua-mpio-lab-validation.md deleted file mode 100644 index 988999bb7e..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/iscsi-p6-alua-mpio-lab-validation.md +++ /dev/null @@ -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 ` standard INQUIRY output. -- `sg_inq -p 0x00 ` supported VPD pages. -- `sg_inq -p 0x83 ` device identification. -- `sg_rtpg ` 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. diff --git a/seaweed-block/internal/docs/qa-assignments/iscsi-p7-backend-fio-matrix-validation.md b/seaweed-block/internal/docs/qa-assignments/iscsi-p7-backend-fio-matrix-validation.md index 8c7cd450ae..893bb4b21c 100644 --- a/seaweed-block/internal/docs/qa-assignments/iscsi-p7-backend-fio-matrix-validation.md +++ b/seaweed-block/internal/docs/qa-assignments/iscsi-p7-backend-fio-matrix-validation.md @@ -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: diff --git a/seaweed-block/internal/docs/qa-assignments/iscsi-p8-compat-soak-validation.md b/seaweed-block/internal/docs/qa-assignments/iscsi-p8-compat-soak-validation.md index 3cd5dc3df8..6936a7c04e 100644 --- a/seaweed-block/internal/docs/qa-assignments/iscsi-p8-compat-soak-validation.md +++ b/seaweed-block/internal/docs/qa-assignments/iscsi-p8-compat-soak-validation.md @@ -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: diff --git a/seaweed-block/internal/docs/qa-assignments/light-use-mvp-close-hard-gate.md b/seaweed-block/internal/docs/qa-assignments/light-use-mvp-close-hard-gate.md index 05fa91524a..fee03bfc40 100644 --- a/seaweed-block/internal/docs/qa-assignments/light-use-mvp-close-hard-gate.md +++ b/seaweed-block/internal/docs/qa-assignments/light-use-mvp-close-hard-gate.md @@ -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. diff --git a/seaweed-block/internal/docs/qa-assignments/light-use-operations-mvp-close-validation.md b/seaweed-block/internal/docs/qa-assignments/light-use-operations-mvp-close-validation.md deleted file mode 100644 index 114c7a49f3..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/light-use-operations-mvp-close-validation.md +++ /dev/null @@ -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/.json` - - `history/.json` - - `locks/.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 -``` - -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=/testops-control -ART=/artifacts - -sw-testops \ - --repo-root \ - --scenario g15b-manifest \ - --artifact-dir "$ART/run-1" \ - --run-id qa-control-run-1 \ - --commit \ - --control-dir "$CONTROL" - -sw-testops --repo-root --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. diff --git a/seaweed-block/internal/docs/qa-assignments/nvme-p5-csi-protocol-selection-validation.md b/seaweed-block/internal/docs/qa-assignments/nvme-p5-csi-protocol-selection-validation.md index 07ea7938a5..79fd761d46 100644 --- a/seaweed-block/internal/docs/qa-assignments/nvme-p5-csi-protocol-selection-validation.md +++ b/seaweed-block/internal/docs/qa-assignments/nvme-p5-csi-protocol-selection-validation.md @@ -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`, diff --git a/seaweed-block/internal/docs/qa-assignments/phase120-nvme-tcp-performance-baseline-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase120-nvme-tcp-performance-baseline-qa-signoff.md deleted file mode 100644 index c2703f628f..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/phase120-nvme-tcp-performance-baseline-qa-signoff.md +++ /dev/null @@ -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= -seq_read_mibps= -small_write_iops= -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. diff --git a/seaweed-block/internal/docs/qa-assignments/phase151-wal-multiblock-mounted-nvme-profile-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase151-wal-multiblock-mounted-nvme-profile-qa-signoff.md index cdf6cbf490..a1c1de97bc 100644 --- a/seaweed-block/internal/docs/qa-assignments/phase151-wal-multiblock-mounted-nvme-profile-qa-signoff.md +++ b/seaweed-block/internal/docs/qa-assignments/phase151-wal-multiblock-mounted-nvme-profile-qa-signoff.md @@ -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. diff --git a/seaweed-block/internal/docs/qa-assignments/phase166-nvme-rdma-k8s-multipath-status.md b/seaweed-block/internal/docs/qa-assignments/phase166-nvme-rdma-k8s-multipath-status.md deleted file mode 100644 index b8618cdb05..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/phase166-nvme-rdma-k8s-multipath-status.md +++ /dev/null @@ -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= ` - -env app_ssh_addr= ` - 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. diff --git a/seaweed-block/internal/docs/qa-assignments/phase172-d1-wal-materialization-baseline-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase172-d1-wal-materialization-baseline-qa-signoff.md deleted file mode 100644 index 9e79b314f7..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/phase172-d1-wal-materialization-baseline-qa-signoff.md +++ /dev/null @@ -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 ` 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. diff --git a/seaweed-block/internal/docs/qa-assignments/phase172-d2-single-read-materialization-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase172-d2-single-read-materialization-qa-signoff.md deleted file mode 100644 index c787ee220f..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/phase172-d2-single-read-materialization-qa-signoff.md +++ /dev/null @@ -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. diff --git a/seaweed-block/internal/docs/qa-assignments/phase172-d3-shared-record-materialization-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase172-d3-shared-record-materialization-qa-signoff.md deleted file mode 100644 index a1eb11dba4..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/phase172-d3-shared-record-materialization-qa-signoff.md +++ /dev/null @@ -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. diff --git a/seaweed-block/internal/docs/qa-assignments/phase173-d1-fixed-work-baseline-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase173-d1-fixed-work-baseline-qa-signoff.md deleted file mode 100644 index 6dfd292cd6..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/phase173-d1-fixed-work-baseline-qa-signoff.md +++ /dev/null @@ -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. diff --git a/seaweed-block/internal/docs/qa-assignments/phase173-d2-shipped-path-attribution-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase173-d2-shipped-path-attribution-qa-signoff.md deleted file mode 100644 index 39e99311b8..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/phase173-d2-shipped-path-attribution-qa-signoff.md +++ /dev/null @@ -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. diff --git a/seaweed-block/internal/docs/qa-assignments/phase173-d3-architecture-decision-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase173-d3-architecture-decision-qa-signoff.md deleted file mode 100644 index bfd8987186..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/phase173-d3-architecture-decision-qa-signoff.md +++ /dev/null @@ -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. diff --git a/seaweed-block/internal/docs/qa-assignments/phase174-d2-distinct-node-rf3-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase174-d2-distinct-node-rf3-qa-signoff.md deleted file mode 100644 index 1a9f18b69d..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/phase174-d2-distinct-node-rf3-qa-signoff.md +++ /dev/null @@ -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. diff --git a/seaweed-block/internal/docs/qa-assignments/phase174-d2-distinct-node-rf3-qa.md b/seaweed-block/internal/docs/qa-assignments/phase174-d2-distinct-node-rf3-qa.md deleted file mode 100644 index a4b0485542..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/phase174-d2-distinct-node-rf3-qa.md +++ /dev/null @@ -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. diff --git a/seaweed-block/internal/docs/qa-assignments/phase33-f1-live-negative-qa-result.md b/seaweed-block/internal/docs/qa-assignments/phase33-f1-live-negative-qa-result.md deleted file mode 100644 index dfa7358f17..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/phase33-f1-live-negative-qa-result.md +++ /dev/null @@ -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. diff --git a/seaweed-block/internal/docs/qa-assignments/phase34-d4-smartwal-corrupt-verify3-PASS.md b/seaweed-block/internal/docs/qa-assignments/phase34-d4-smartwal-corrupt-verify3-PASS.md deleted file mode 100644 index 74bd95b120..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/phase34-d4-smartwal-corrupt-verify3-PASS.md +++ /dev/null @@ -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. diff --git a/seaweed-block/internal/docs/qa-assignments/phase35-d3-operator-status-writer-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase35-d3-operator-status-writer-qa-signoff.md index cba9793b0e..26c3a2dd9a 100644 --- a/seaweed-block/internal/docs/qa-assignments/phase35-d3-operator-status-writer-qa-signoff.md +++ b/seaweed-block/internal/docs/qa-assignments/phase35-d3-operator-status-writer-qa-signoff.md @@ -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 diff --git a/seaweed-block/internal/docs/qa-assignments/phase35-d5-stale-status-projections-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase35-d5-stale-status-projections-qa-signoff.md index f4032fe25c..37dbe564d7 100644 --- a/seaweed-block/internal/docs/qa-assignments/phase35-d5-stale-status-projections-qa-signoff.md +++ b/seaweed-block/internal/docs/qa-assignments/phase35-d5-stale-status-projections-qa-signoff.md @@ -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 diff --git a/seaweed-block/internal/docs/qa-assignments/phase35-d6-stable-event-identity-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase35-d6-stable-event-identity-qa-signoff.md index bf92e02d7c..333983f481 100644 --- a/seaweed-block/internal/docs/qa-assignments/phase35-d6-stable-event-identity-qa-signoff.md +++ b/seaweed-block/internal/docs/qa-assignments/phase35-d6-stable-event-identity-qa-signoff.md @@ -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 diff --git a/seaweed-block/internal/docs/qa-assignments/phase36-d2-node-readiness-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase36-d2-node-readiness-qa-signoff.md index 124c7c1e9f..111448df7f 100644 --- a/seaweed-block/internal/docs/qa-assignments/phase36-d2-node-readiness-qa-signoff.md +++ b/seaweed-block/internal/docs/qa-assignments/phase36-d2-node-readiness-qa-signoff.md @@ -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 diff --git a/seaweed-block/internal/docs/qa-assignments/phase36-d5-surface-agreement-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase36-d5-surface-agreement-qa-signoff.md index a41e508a65..36e6180404 100644 --- a/seaweed-block/internal/docs/qa-assignments/phase36-d5-surface-agreement-qa-signoff.md +++ b/seaweed-block/internal/docs/qa-assignments/phase36-d5-surface-agreement-qa-signoff.md @@ -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 diff --git a/seaweed-block/internal/docs/qa-assignments/phase37-d2-live-node-csi-evidence-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase37-d2-live-node-csi-evidence-qa-signoff.md index dd95355a3e..2612c907f5 100644 --- a/seaweed-block/internal/docs/qa-assignments/phase37-d2-live-node-csi-evidence-qa-signoff.md +++ b/seaweed-block/internal/docs/qa-assignments/phase37-d2-live-node-csi-evidence-qa-signoff.md @@ -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) diff --git a/seaweed-block/internal/docs/qa-assignments/phase37-d3-csi-image-pull-node-blockers-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase37-d3-csi-image-pull-node-blockers-qa-signoff.md index 0e25d4a600..e6da46fb0d 100644 --- a/seaweed-block/internal/docs/qa-assignments/phase37-d3-csi-image-pull-node-blockers-qa-signoff.md +++ b/seaweed-block/internal/docs/qa-assignments/phase37-d3-csi-image-pull-node-blockers-qa-signoff.md @@ -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 diff --git a/seaweed-block/internal/docs/qa-assignments/phase37-d4-d5-host-prereq-loopback-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase37-d4-d5-host-prereq-loopback-qa-signoff.md index 01145c9fb6..93b7189029 100644 --- a/seaweed-block/internal/docs/qa-assignments/phase37-d4-d5-host-prereq-loopback-qa-signoff.md +++ b/seaweed-block/internal/docs/qa-assignments/phase37-d4-d5-host-prereq-loopback-qa-signoff.md @@ -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 diff --git a/seaweed-block/internal/docs/qa-assignments/phase37-d4-d5-host-prereq-loopback-qa.md b/seaweed-block/internal/docs/qa-assignments/phase37-d4-d5-host-prereq-loopback-qa.md deleted file mode 100644 index 367d103c48..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/phase37-d4-d5-host-prereq-loopback-qa.md +++ /dev/null @@ -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 --out /tmp/sw-block-report -sw-block ops dashboard --from-bundle --listen 127.0.0.1:9334 -sw-block ops explain --from-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 diff --git a/seaweed-block/internal/docs/qa-assignments/phase38-action-model-executable-contract-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase38-action-model-executable-contract-qa-signoff.md index d78587ce3c..9db754836b 100644 --- a/seaweed-block/internal/docs/qa-assignments/phase38-action-model-executable-contract-qa-signoff.md +++ b/seaweed-block/internal/docs/qa-assignments/phase38-action-model-executable-contract-qa-signoff.md @@ -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. diff --git a/seaweed-block/internal/docs/qa-assignments/phase39-d4-d5-finalizer-delete-safety-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase39-d4-d5-finalizer-delete-safety-qa-signoff.md index e760dbf4fb..97db03a465 100644 --- a/seaweed-block/internal/docs/qa-assignments/phase39-d4-d5-finalizer-delete-safety-qa-signoff.md +++ b/seaweed-block/internal/docs/qa-assignments/phase39-d4-d5-finalizer-delete-safety-qa-signoff.md @@ -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. diff --git a/seaweed-block/internal/docs/qa-assignments/phase39-d4-d5-finalizer-delete-safety-qa.md b/seaweed-block/internal/docs/qa-assignments/phase39-d4-d5-finalizer-delete-safety-qa.md deleted file mode 100644 index cf2f9d3ed8..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/phase39-d4-d5-finalizer-delete-safety-qa.md +++ /dev/null @@ -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= -pvc_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= -pvc_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. diff --git a/seaweed-block/internal/docs/qa-assignments/phase39-d6-multi-volume-delete-safety-status-isolation-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase39-d6-multi-volume-delete-safety-status-isolation-qa-signoff.md index 10b1bc615f..b9555a5fef 100644 --- a/seaweed-block/internal/docs/qa-assignments/phase39-d6-multi-volume-delete-safety-status-isolation-qa-signoff.md +++ b/seaweed-block/internal/docs/qa-assignments/phase39-d6-multi-volume-delete-safety-status-isolation-qa-signoff.md @@ -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. diff --git a/seaweed-block/internal/docs/qa-assignments/phase39-d6-multi-volume-delete-safety-status-isolation-qa.md b/seaweed-block/internal/docs/qa-assignments/phase39-d6-multi-volume-delete-safety-status-isolation-qa.md deleted file mode 100644 index 5466d620ab..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/phase39-d6-multi-volume-delete-safety-status-isolation-qa.md +++ /dev/null @@ -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. diff --git a/seaweed-block/internal/docs/qa-assignments/phase40-d6-release-candidate-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase40-d6-release-candidate-qa-signoff.md index 15aa5c5f20..b96ddabe86 100644 --- a/seaweed-block/internal/docs/qa-assignments/phase40-d6-release-candidate-qa-signoff.md +++ b/seaweed-block/internal/docs/qa-assignments/phase40-d6-release-candidate-qa-signoff.md @@ -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. diff --git a/seaweed-block/internal/docs/qa-assignments/phase41-lifecycle-owner-foundation-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase41-lifecycle-owner-foundation-qa-signoff.md deleted file mode 100644 index 1fcdc0cdc1..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/phase41-lifecycle-owner-foundation-qa-signoff.md +++ /dev/null @@ -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. diff --git a/seaweed-block/internal/docs/qa-assignments/phase42-d1-lifecycle-owner-admission-gate-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase42-d1-lifecycle-owner-admission-gate-qa-signoff.md index 75f1abff29..807d787761 100644 --- a/seaweed-block/internal/docs/qa-assignments/phase42-d1-lifecycle-owner-admission-gate-qa-signoff.md +++ b/seaweed-block/internal/docs/qa-assignments/phase42-d1-lifecycle-owner-admission-gate-qa-signoff.md @@ -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. diff --git a/seaweed-block/internal/docs/qa-assignments/phase43-d1-d2-lifecycle-owner-finalizer-add-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase43-d1-d2-lifecycle-owner-finalizer-add-qa-signoff.md index 9c1e62f31b..b58c1808fd 100644 --- a/seaweed-block/internal/docs/qa-assignments/phase43-d1-d2-lifecycle-owner-finalizer-add-qa-signoff.md +++ b/seaweed-block/internal/docs/qa-assignments/phase43-d1-d2-lifecycle-owner-finalizer-add-qa-signoff.md @@ -12,8 +12,8 @@ Source: branch `phase41-lifecycle-owner-foundation` @ `1244285 phase43: add lifecycle owner finalizer path` Image: fresh local build from `1244285` (`sw-block:local` — the `ops lifecycle-owner` subcommand is new in this commit; published images predate it), -imported to m01+m02 k3s. -Environment: m02 k3s **v1.34.4+k3s1** (ValidatingAdmissionPolicy enforced). +imported to node-a+node-b k3s. +Environment: node-b k3s **v1.34.4+k3s1** (ValidatingAdmissionPolicy enforced). Install: `helm install ... -f day1.yaml --set operatorStatus.create=true --set operatorStatus.dryRun=false --set lifecycleOwner.create=true --set lifecycleOwner.dryRun=false --set lifecycleOwner.interval=15s` (all pods — @@ -120,7 +120,7 @@ mutation; the finalizer add changes no other field; repeated reconcile is bounde 2. The `ops lifecycle-owner` subcommand is new in `1244285`, so a fresh image build was required (published `sha-*` images predate it). Publish a candidate image before any release that enables `lifecycleOwner.create=true`. -3. tp01 `NotReady` — unrelated to this single-node gate. +3. node-c `NotReady` — unrelated to this single-node gate. ## Recommendation diff --git a/seaweed-block/internal/docs/qa-assignments/phase43-d3-d4-lifecycle-owner-finalizer-release-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase43-d3-d4-lifecycle-owner-finalizer-release-qa-signoff.md index 592b44e42e..f277315141 100644 --- a/seaweed-block/internal/docs/qa-assignments/phase43-d3-d4-lifecycle-owner-finalizer-release-qa-signoff.md +++ b/seaweed-block/internal/docs/qa-assignments/phase43-d3-d4-lifecycle-owner-finalizer-release-qa-signoff.md @@ -11,8 +11,8 @@ lifecycle (add + release) is complete. Date: 2026-06-15 Source: branch `phase41-lifecycle-owner-foundation` @ `252ec35 phase43: gate finalizer release on delete safety` -Image: fresh local build from `252ec35` (`sw-block:local`), imported to m01+m02. -Environment: m02 k3s **v1.34.4+k3s1** (ValidatingAdmissionPolicy enforced). +Image: fresh local build from `252ec35` (`sw-block:local`), imported to node-a+node-b. +Environment: node-b k3s **v1.34.4+k3s1** (ValidatingAdmissionPolicy enforced). Install: `helm install ... --set operatorStatus.create=true --set operatorStatus.dryRun=false --set lifecycleOwner.create=true --set lifecycleOwner.dryRun=false --set lifecycleOwner.interval=15s` (pods 1/1). @@ -110,7 +110,7 @@ lifecycle-owner gained no workload/storage mutation power. is projected by operator-status from real cleanup evidence. The end-to-end path (real residue → operator-status projects blocked/releasable → lifecycle-owner holds/releases) is the natural Phase 44 close-gate scenario. -3. tp01 `NotReady` — unrelated to this single-node gate. +3. node-c `NotReady` — unrelated to this single-node gate. ## Recommendation diff --git a/seaweed-block/internal/docs/qa-assignments/phase44-d2-integrated-swblockvolume-cr-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase44-d2-integrated-swblockvolume-cr-qa-signoff.md index 8207f5fde2..38fefa69b8 100644 --- a/seaweed-block/internal/docs/qa-assignments/phase44-d2-integrated-swblockvolume-cr-qa-signoff.md +++ b/seaweed-block/internal/docs/qa-assignments/phase44-d2-integrated-swblockvolume-cr-qa-signoff.md @@ -20,8 +20,8 @@ Source: branch `phase41-lifecycle-owner-foundation` @ `e56b844 phase44: register swblockvolume from csi create` Images: fresh `sw-block:local` **and** `sw-block-csi:local` built from `e56b844` (the CSI image now carries `--swblockvolume-cr-namespace`; older CSI images do -not), imported to m01+m02. -Environment: m02 k3s **v1.34.4+k3s1** (ValidatingAdmissionPolicy enforced). +not), imported to node-a+node-b. +Environment: node-b k3s **v1.34.4+k3s1** (ValidatingAdmissionPolicy enforced). Install: `--set operatorStatus.create=true --set operatorStatus.dryRun=false --set lifecycleOwner.create=true --set lifecycleOwner.dryRun=false`. @@ -117,7 +117,7 @@ lifecycle-owner. (the `--swblockvolume-cr-namespace` flag is new in `e56b844`); publish both images together before any release that enables the operator/lifecycle surfaces. -3. tp01 `NotReady` — unrelated to this single-node gate. +3. node-c `NotReady` — unrelated to this single-node gate. ## Recommendation diff --git a/seaweed-block/internal/docs/qa-assignments/phase44-d3-d4-delete-lifecycle-close-gate-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase44-d3-d4-delete-lifecycle-close-gate-qa-signoff.md index 41cb93d683..2b18f217f9 100644 --- a/seaweed-block/internal/docs/qa-assignments/phase44-d3-d4-delete-lifecycle-close-gate-qa-signoff.md +++ b/seaweed-block/internal/docs/qa-assignments/phase44-d3-d4-delete-lifecycle-close-gate-qa-signoff.md @@ -12,8 +12,8 @@ Date: 2026-06-16 Source: branch `phase41-lifecycle-owner-foundation` @ `8669d4a phase44: project live delete safety status` Images: fresh `sw-block:local` **and** `sw-block-csi:local` built from `8669d4a`, -imported to m01+m02. -Environment: m02 k3s **v1.34.4+k3s1** (ValidatingAdmissionPolicy enforced). +imported to node-a+node-b. +Environment: node-b k3s **v1.34.4+k3s1** (ValidatingAdmissionPolicy enforced). Install: `--set operatorStatus.create=true --set operatorStatus.dryRun=false --set lifecycleOwner.create=true --set lifecycleOwner.dryRun=false`. @@ -131,7 +131,7 @@ executed cleanup or mutated PVC/PV/workload/storage. but a deleted-CR-for-still-managed-volume should be skipped rather than abort the reconcile. 3. New CSI CR-registration + delete-safety bridge require publishing both - candidate images together. tp01 `NotReady` — unrelated to this single-node gate. + candidate images together. node-c `NotReady` — unrelated to this single-node gate. ## Recommendation diff --git a/seaweed-block/internal/docs/qa-assignments/phase44-d5-d6-surface-isolation-close-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase44-d5-d6-surface-isolation-close-qa-signoff.md index a04c735681..142111959a 100644 --- a/seaweed-block/internal/docs/qa-assignments/phase44-d5-d6-surface-isolation-close-qa-signoff.md +++ b/seaweed-block/internal/docs/qa-assignments/phase44-d5-d6-surface-isolation-close-qa-signoff.md @@ -10,8 +10,8 @@ contamination; and the lab closes with zero residue. Date: 2026-06-16 Source: branch `phase41-lifecycle-owner-foundation` @ `874d0cf phase44: polish delete lifecycle surfaces` -Images: fresh `sw-block:local` + `sw-block-csi:local` from `874d0cf`, m01+m02. -Environment: m02 k3s **v1.34.4+k3s1** (VAP enforced). Install: operator-status + +Images: fresh `sw-block:local` + `sw-block-csi:local` from `874d0cf`, node-a+node-b. +Environment: node-b k3s **v1.34.4+k3s1** (VAP enforced). Install: operator-status + lifecycle-owner enabled, non-dry-run. ## D5 — Surface Agreement With `--cleanup-summary` @@ -100,7 +100,7 @@ works; the lab is clean. shows the same hold/release reasoning. 2. `ops explain` uses `--master` (not `--master-api`); the slim image has no python3 — minor tooling notes for future QA scripting. -3. tp01 `NotReady` — unrelated to this single-node gate. +3. node-c `NotReady` — unrelated to this single-node gate. ## Recommendation diff --git a/seaweed-block/internal/docs/qa-assignments/testops-control-data-validation.md b/seaweed-block/internal/docs/qa-assignments/testops-control-data-validation.md deleted file mode 100644 index baf4340ad7..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/testops-control-data-validation.md +++ /dev/null @@ -1,92 +0,0 @@ -# QA Assignment: TestOps Control Data Validation - -## Goal - -Validate that product-local `sw-testops` writes useful shared-lab control data -for M01/M02-style runs. - -This is not a product datapath test. It validates operator visibility for -running/stale tests: - -- active run record exists while a run owns resources, -- conflicting resource locks refuse a second run, -- terminal runs move to history, -- locks release on terminal exit, -- `--control-list` shows enough information for dev/QA to know what ran. - -## Build - -From the product repo: - -```text -go build -o sw-testops ./cmd/sw-testops -``` - -## Suggested Local Validation - -Use a temporary control directory and a fast scenario: - -```text -CONTROL=/testops-control -ART=/artifacts - -./sw-testops \ - --repo-root \ - --scenario g15b-manifest \ - --artifact-dir "$ART/run-1" \ - --run-id qa-control-run-1 \ - --commit \ - --control-dir "$CONTROL" - -./sw-testops --repo-root --control-dir "$CONTROL" --control-list -``` - -Expected: - -- command exits `0`, -- `active/qa-control-run-1.json` is absent after terminal exit, -- `history/qa-control-run-1.json` exists, -- `events.jsonl` contains start and complete events, -- `--control-list` prints: - - state, - - run id, - - scenario, - - source commit, - - updated timestamp, - - locks/resources, - - artifact dir. - -## Conflict Validation - -Use a small custom registry entry or an existing resource-declaring scenario. -Start one run that holds a lock, then attempt another run with the same -resource. If using a fast local custom registry, both scenarios can use a shell -script that sleeps. - -Expected: - -- first run creates `active/.json`, -- lock file appears under `locks/`, -- second run exits non-zero before driver execution, -- second run does not create an active record, -- after first run exits, lock files are gone and the first run is in history. - -## Report Back - -Return: - -- runner/product commit, -- control directory path, -- command lines used, -- `--control-list` output, -- active/history/lock tree before and after terminal exit, -- whether conflict refusal happened before driver execution. - -## Non-Claims - -- This does not validate standalone `swblock` yet. -- This does not validate remote agent mode. -- This does not validate stale-lock stealing or queueing. -- This does not validate per-phase heartbeat; the product-local runner records - start and terminal ownership only. -- This does not validate product storage behavior. diff --git a/seaweed-block/internal/docs/qa-assignments/v0.3-pre-release-user-walkthrough-blockers.md b/seaweed-block/internal/docs/qa-assignments/v0.3-pre-release-user-walkthrough-blockers.md deleted file mode 100644 index 9cb3969a0d..0000000000 --- a/seaweed-block/internal/docs/qa-assignments/v0.3-pre-release-user-walkthrough-blockers.md +++ /dev/null @@ -1,256 +0,0 @@ -# QA Pre-Release - v0.3 User Walkthrough Blockers - -Date: 2026-05-22 - -Verdict: PRE-RELEASE BLOCKERS found during walkthrough. Fixes landed after -this report; see "Resolution Update" below. The original v0.3 testops gates PASS -(`20260522-031019-ef25`, `20260522-031124-0a44`) but exercise -`scripts/generate-helm-values-day1.sh`, NOT the user-facing command -`sw-block ops generate-helm-values` advertised in `README.md` and -`docs/quickstart-kubernetes.md`. A fresh end-user following the documented -quickstart literally on a 3-node k3s lab (m01 / m02 / tp01) cannot complete the -first-volume loop. - -## Method - -- Start state: clean k3s cluster, no `sw-block` PATH binary, no prior install, - no iSCSI sessions, no multipath maps. -- Followed `docs/quickstart-kubernetes.md` from Step 1 verbatim. -- Re-ran from clean state with the workaround applied. - -## Blockers - -### B1. `sw-block` is not in PATH and the docs do not say how to build it - -Reproduce: - -```bash -sw-block ops generate-helm-values --out values.day1.yaml -# bash: sw-block: command not found -``` - -`docs/quickstart-kubernetes.md` Prerequisites line 43 mentions the `go run` -fallback, but no doc tells a user to `go build -o sw-block ./cmd/sw-block`. -Every fresh user hits this on the first documented command. - -Fix shape: - -- Add Step 0 to `docs/quickstart-kubernetes.md`: - ```bash - git clone https://github.com/seaweedfs/seaweed-block && cd seaweed-block - go build -o sw-block ./cmd/sw-block && export PATH="$PWD:$PATH" - ``` -- Mirror the same step in `README.md` Quick Start Fast Path. -- Confirm `sw-block --version` prints a real revision when built this way - (current `go run` output is `revision=unknown modified=unknown`). - -### B2. Default `:alpha` GHCR image is incompatible with v0.3 chart - -Reproduce: - -```bash -sw-block ops generate-helm-values --out values.day1.yaml -helm install sw-block charts/seaweed-block \ - --namespace kube-system --create-namespace \ - -f values.day1.yaml --wait -# Error: INSTALLATION FAILED: context deadline exceeded (5 min) -# blockmaster CrashLoopBackOff: flag provided but not defined: -launcher-replication-ack -``` - -`charts/seaweed-block/templates/blockmaster.yaml:48` emits -`--launcher-replication-ack={{ .Values.replication.ackProfile }}` -unconditionally. The published `:alpha` GHCR tag predates this flag. -Compare with `--launcher-reject-loopback-publish-targets`, which IS gated -behind `compat.launcherRejectLoopbackFlag`. - -Fix shape (pick one): - -- Add a `compat.launcherReplicationAckFlag` knob, default `false` for - alpha-tag compatibility, true when running fresh SHAs. -- Republish `:alpha` to a current commit that supports the flag and document - the publish cadence so users know the floor. -- Document the current working immutable SHA in `docs/releases/v0.3-alpha.md` - and have `generate-helm-values` default to that pinned SHA. - -The doc currently says "Mutable `:alpha` is a smoke/demo tag only" but never -names a working SHA; a user has to grep the testops scenario YAML to find -`sha-28a99ce4f644`. - -### B3. `sw-block ops generate-helm-values` produces broken port assignment - -This is the most severe finding. With B2 worked around (`--image sha-...`), -the install succeeds — but the launcher-generated blockvolume pod still -CrashLoopBackOff on the primary node: - -```text -blockvolume: iscsi target: iscsi: listen "192.168.1.181:3260": - bind: address already in use -``` - -Root cause: `cmd/sw-block/main.go:974` assigns - -```go -DataPort: 3260 + i, -``` - -so node[0] = m01 gets `dataPort: 3260`, which is identical to the iSCSI -listener port (also 3260 from the launcher `--iscsi-port-base`). The -blockvolume pod opens two listeners on the same `host:port` and the second -bind fails. - -`scripts/generate-helm-values-day1.sh:221-222` assigns: - -```bash -data_port=$((19101 + (idx * 2))) -ctrl_port=$((data_port + 1)) -``` - -19101+ does not collide. **The QA-passing testops scenarios use this shell -script; the documented user-facing `sw-block ops generate-helm-values` does -not match it.** - -Reproduces both times from clean state on the 3-node lab. Writer pod stuck in -`ContainerCreating`, PVC event: -`AttachVolume.Attach failed ... has no publish target`. - -Fix shape (pick one): - -- Align `cmd/sw-block/main.go:974` with the shell script's port scheme - (`dataPort = 19101 + 2*i`, `controlPort = dataPort + 1`). -- Or flip the docs to call `scripts/generate-helm-values-day1.sh` (matches - what QA actually validates). - -Pick (a) unless the long-term intent is to retire the Go path. - -### B4. Documented `helm install ... --wait` (no `--timeout`) hits 5-min default - -Reproduce: the literal command timed out at exactly 5m0s with -`context deadline exceeded`. The 5 min was actually masking blocker B2 above, -but even on cold image pulls a 5-min default is tight. - -Fix shape: add `--timeout 10m` to every documented `helm install --wait` -invocation: - -- `README.md` Fast path (line ~119) -- `docs/quickstart-kubernetes.md` Step 2 (line ~119) -- `docs/releases/v0.3-alpha.md` Validated User Path (line ~54) - -## Medium / discoverability - -### M1. `sw-block ops` usage banner omits `dashboard` - -```bash -go run ./cmd/sw-block ops -# usage: sw-block ops status|inventory|cluster|volumes|describe|timeline| -# explain|report|generate-helm-values -``` - -But README and quickstart both document `sw-block ops dashboard`. Banner is -out of sync with the binary's actual surface. - -### M2. `--from-bundle "$APP_DIR"` vs `$APP_DIR/status` is ambiguous - -Quickstart Step 4 passes `$APP_DIR` (the basic-app dir) to -`sw-block ops dashboard --from-bundle`, but the report files live under -`$APP_DIR/status/report/`. Worth one sentence in the doc explicitly stating -the bundle root. - -### M3. Magic positional `"$PWD"` to helper scripts - -Three documented invocations: - -- `bash scripts/run-basic-app-example.sh "$PWD"` -- `bash scripts/activate-k8s-alpha.sh "$PWD"` -- (implied repo root elsewhere) - -No doc explains what the positional argument means. New users see undocumented -magic. - -### M4. KUBECONFIG fallback is k3s-specific - -`docs/quickstart-kubernetes.md` Step 1: - -```bash -export KUBECONFIG="${KUBECONFIG:-/etc/rancher/k3s/k3s.yaml}" -``` - -is a no-op for non-k3s users with KUBECONFIG already set and a bad fallback -for non-k3s users without it. Should comment "k3s default path; non-k3s users -keep your existing KUBECONFIG." - -Note: vanilla k3s ships `k3s.yaml` mode 600 (root only). On supported labs -`--write-kubeconfig-mode 644` is used. Doc should warn fresh k3s users. - -### M5. v0.3 release notes mention `sha-` images but name no working SHA - -`docs/releases/v0.3-alpha.md` Image Guidance says to use immutable -`sha-` for QA/PM/release validation but does not name which commit is -current. User has to grep `testops/scenarios/helm-first-volume-chain.yaml` to -find `sha-28a99ce4f644`. - -## Gap in QA Coverage - -The v0.3 close report verdict ("PASS strict") is honest for the scenarios it -ran, but the testops gates cover the **shell script path**, not the -**documented `sw-block ops generate-helm-values` Go path**. B3 is a real -release-blocker that is invisible to the existing QA gates. - -Fix shape: - -- Add a testops scenario (e.g. - `testops/scenarios/helm-first-volume-via-sw-block-cli-chain.yaml`) that - invokes `sw-block ops generate-helm-values` directly with no shell-script - fallback. Treat it as a zero-regression gate for v0.4+. -- Until that scenario exists and passes, the documented user path should not - be claimed to work on a fresh cluster. - -## Recommended Sequence - -1. B3 first (port assignment) — single-file fix in `cmd/sw-block/main.go`, - unblocks the documented user flow. -2. B2 second (chart-vs-image flag gate) — keeps `:alpha` viable for casual - try-it-out users. -3. B1 + B4 (Step 0 + `--timeout 10m`) — pure doc edits. -4. M1-M5 — opportunistic. -5. Add Go-path testops scenario before claiming v0.4 release-ready. - -## Resolution Update - -Resolved on 2026-05-22 after this blocker report: - -- B1: README/quickstart now include a Step 0 / fast-path CLI build: - `go build -o sw-block ./cmd/sw-block && export PATH="$PWD:$PATH"`. -- B2: Helm chart now gates `--launcher-replication-ack` behind - `compat.launcherReplicationAckFlag`, default false, and docs use the - validated immutable image tag for the v0.3 walkthrough. -- B3: `sw-block ops generate-helm-values` now uses the same non-conflicting - per-node data/control port scheme as the shell generator: - `19101/19102`, `19103/19104`, `19105/19106`, ... -- B4: README, quickstart, and v0.3 release note now use - `helm install --wait --timeout 10m`. -- M1: usage output includes `dashboard`. -- M2-M5: docs now clarify bundle root, `"$PWD"` helper argument, k3s - `KUBECONFIG` fallback, and current validated immutable image tag. - -New zero-regression gate: - -- `testops/scenarios/helm-first-volume-via-sw-block-cli-chain.yaml` -- Run `20260522-091642-b9a7` -- Result: PASS, 31/31 actions -- The gate builds `sw-block`, invokes `sw-block ops generate-helm-values` - directly, asserts `dataPort: 19101`, asserts no `dataPort: 3260`, installs - Helm, verifies writer/reader, and checks cleanup. - -## Evidence - -- Walkthrough host: m02 (192.168.1.184). -- 3-node k3s cluster: m01, m02, tp01, all Ready. -- Lab state at start of walkthrough: clean (no helm release, no iSCSI - sessions, no residual ports on 3260/3261/9333/23260 across all three - nodes). -- Repo at `/tmp/seaweed_block`, head `3c09085` (`ops: close v0.3 helm - observable release`). -- Both retry attempts (with `:alpha` and with `sha-28a99ce4f644`) reproduced - the same writer-pod ContainerCreating timeout caused by blockvolume - CrashLoopBackOff with the iSCSI bind error. -- Lab restored to clean state after the walkthrough. diff --git a/seaweed-block/internal/docs/ref/control-plane-observation-api-mvp.md b/seaweed-block/internal/docs/ref/control-plane-observation-api-mvp.md deleted file mode 100644 index eb9693b353..0000000000 --- a/seaweed-block/internal/docs/ref/control-plane-observation-api-mvp.md +++ /dev/null @@ -1,607 +0,0 @@ -# Control-Plane Observation API MVP - -Status: reference spec for the next operations/usability slice. - -This document defines the product shape for a dashboard-grade read-only -observation surface. It is not an admin-action API. It exists so operators can -answer "what is happening to my PVC?" without knowing Seaweed Block internals. - -The shape should follow the SeaweedFS operations pattern: - -```text -shared observation core --> CLI for humans, support, QA, and AI --> JSON/JSONL output for automation and bundles --> master read-only API for dashboard/UI -``` - -Do not build separate truth sources for CLI, dashboard, TestOps, and AI. - -## Product Question - -Can a Kubernetes user open one dashboard or run one command and understand: - -```text -which volumes exist -where each replica runs -which replica is primary -whether failover/recovery is progressing -which frontend CSI should attach to -why a volume is blocked or degraded -what evidence to send support -``` - -Current `sw-block ops inventory` already proves these facts in support bundles, -but it assembles them by polling Kubernetes, master `QueryVolumeStatus`, and -per-replica status endpoints. That is good for support bundles, but it is not a -clean long-term operations plane. The next product step is to factor the same -facts into one observation core and expose it through CLI, JSON/JSONL, and a -master read-only API. - -## User Experience Target - -The user-facing flow should be: - -```bash -sw-block ops cluster -sw-block ops volumes -sw-block ops describe volume pvc-... -sw-block ops timeline volume pvc-... -sw-block ops timeline volume pvc-... -o jsonl -sw-block ops explain volume pvc-... -sw-block ops bundle volume pvc-... --out /tmp/sw-block-support -sw-block ops events --since 1h -``` - -Default output should be concise human-readable text. Every command that emits -state should also support `-o json`; timeline/events should support -`-o jsonl`. JSON/JSONL is the stable contract for AI, CI, future dashboard, and -support automation. - -Dashboard shape: - -```text -Cluster - Volumes: 3 total, 2 ready, 1 degraded - Nodes: m01 ready, m02 ready, tp01 ready - Alerts: volume pvc-a recovering; stale primary fenced - -Volume pvc-a - PVC: default/mysql-data - RF: 3 sync-quorum - Primary: r2 on m02 - Frontend: 192.168.1.184:3260 - Status: Recovering - Reason: primary_node_lost_reattached - Data check: reader_checksum_passed - Next action: none; continue watching - -Replicas - r1 m01 unavailable, stale-primary fenced - r2 m02 primary, epoch=2, endpoint_version=1 - r3 tp01 replica_ready, durable_frontier_lsn=44 -``` - -The dashboard must not require users to understand `AssignmentFact`, -`EndpointVersion`, or TestOps scenario internals. Those fields can still appear -in an advanced evidence panel. - -## Current Surfaces - -Master gRPC APIs today: - -- `ObservationService.ReportHeartbeat`: blockvolume -> master local facts. -- `AssignmentService.SubscribeAssignments`: master -> blockvolume authority - assignment stream. -- `EvidenceService.QueryVolumeStatus`: read-only per-volume status, used by - CSI and `sw-block ops status`. -- `LifecycleService.CreateVolume/DeleteVolume`: desired lifecycle intent from - CSI/operator. - -CLI/support surfaces today: - -- `sw-block ops status`: one replica/volume status bundle. -- `sw-block ops inventory`: cluster inventory assembled from Kubernetes, - master status, and per-replica status bundles. -- TestOps control-plane timeline files in recovery scenarios. - -Gap: - -- no master API to list volumes, -- no master API to list nodes, -- no cluster-wide status rollup, -- no product-owned event stream, -- no stable timeline API for failover/recovery, -- no dashboard-ready condition model. - -## Three-Layer Operations Surface - -### Layer 1: CLI - -CLI is the fastest product entry and should land first. It should look like the -rest of the SeaweedFS family: one binary, readable subcommands, explicit JSON -mode when automation needs it. - -Commands: - -```text -sw-block ops cluster -sw-block ops volumes -sw-block ops describe volume -sw-block ops timeline volume -sw-block ops timeline volume -o jsonl -sw-block ops events --since 1h -sw-block ops events --watch -sw-block ops explain volume -sw-block ops bundle volume -``` - -CLI principles: - -- default output is readable by humans and AI, -- reason codes are stable, -- JSON/JSONL output is schema-versioned, -- no command mutates state, -- bundle output includes the same JSON evidence the CLI used. - -### Layer 2: Master Read-Only API - -The API is the long-term product boundary. The dashboard must not shell out to -`kubectl`, SSH, or CLI commands across nodes. It should read the master API. - -The API should call the same observation core as the CLI. - -### Layer 3: Dashboard - -Dashboard is a consumer, not a new source of truth. It should show the same -volume status, replica status, reason codes, events, and support-bundle hints -that the CLI returns. - -First dashboard scope: - -- cluster health, -- volume table, -- selected volume detail, -- selected volume timeline, -- support-bundle capture instructions. - -No promote/repair/rebuild buttons in the first dashboard. - -## API Contract - -Add a read-only service. Name is provisional but semantics are not: - -```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); -} -``` - -No method may mutate authority, placement, lifecycle, or replica state. - -### ClusterStatusResponse - -Minimum fields: - -```text -schema_version -captured_at -cluster_id -product_revision -nodes[] -volumes[] -conditions[] -non_claims[] -``` - -Cluster rollup status: - -```text -ok | degraded | recovering | blocked | unavailable -``` - -This rollup must be conservative. If a status source is missing, the response -should say `degraded` or `blocked` with a reason, not `ok`. - -### NodeEvidence - -Minimum fields: - -```text -node_name -kubernetes_node -physical_host -internal_ip -schedulable -ready -last_heartbeat_at -replica_count -required_images[] -missing_images[] -conditions[] -``` - -Important condition reasons: - -```text -node_not_ready -node_cordoned -heartbeat_stale -external_frontend_unreachable -image_missing_on_node -``` - -For Kubernetes install/attach failures, node evidence must include image -inventory for the product images the scenario or install selected. A dashboard -or CLI should be able to say: - -```text -node=m02 condition=image_missing_on_node image=sw-block-csi:local -impact=CSI node pod ImagePullBackOff; PVC attach cannot proceed on this node -next_action=import image to node or use a registry reachable by all nodes -``` - -### VolumeEvidence - -Minimum fields: - -```text -volume_id -namespace -pvc_name -pv_name -replication_factor -ack_profile -claim_profile -desired_replicas -observed_replicas -status -primary_replica -primary_node -publish_target -epoch -endpoint_version -replicas[] -conditions[] -next_actions[] -support_bundle_hint -``` - -Volume status values: - -```text -ok -degraded -recovering -blocked -invalid -``` - -The UI should show `status` and `reason` first, then show advanced fields only -when expanded. - -### ReplicaEvidence - -Minimum fields: - -```text -replica_id -server_id -kubernetes_node -physical_host -observed -role -replication_role -durable_latched -durable_frontier_known -durable_frontier_lsn -candidate_ready -candidate_ready_reason -frontend_protocol -frontend_addr -status_addr -stale_primary_fenced -conditions[] -support_bundle_path -``` - -Important replica condition reasons: - -```text -primary -replica_ready -replica_degraded -status_endpoint_unreachable -authority_not_assigned -replication_role_not_ready -durable_frontier_missing -candidate_frontier_behind -stale_primary_fenced -generated_deployment_missing -observed_replicas_below_desired -loopback_frontend_rejected -``` - -### ClusterEvent - -Events are append-only evidence. They are not commands. - -Minimum fields: - -```text -event_id -event_time -volume_id -replica_id -node_name -type -severity -message -reason -old_value -new_value -epoch -endpoint_version -correlation_id -evidence_ref -``` - -Required event types for the first dashboard release: - -```text -volume_created -placement_verified -replica_heartbeat_seen -replica_stale -promotion_candidate_evaluated -authority_published -publish_target_changed -stale_primary_fenced -csi_reattach_observed -volume_recovered -volume_blocked -support_bundle_collected -pod_image_pull_failed -csi_node_unavailable -``` - -TestOps-only events such as `data_check_result` may be included when a recovery -gate runs, but normal production must not pretend it ran an application-level -checksum unless it actually did. - -## Tutorial: What A User Should See - -### Healthy Volume - -Command: - -```bash -sw-block ops describe volume pvc-123 -``` - -Output shape: - -```text -volume pvc-123 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 ready durable_lsn=44 candidate_ready=true -r3 tp01 replica_ready ready durable_lsn=44 candidate_ready=true - -next action: none -support bundle: sw-block support bundle --volume pvc-123 --out /tmp/sw-block-pvc-123 -``` - -### Recovering After Primary Node Loss - -Output shape: - -```text -volume pvc-123 status=recovering reason=primary_node_lost -old primary r1 on m01 is unavailable -candidate r2 on m02 is promotion_ready -authority moved r1 -> r2 epoch=2 endpoint_version=1 -CSI publish target changed 192.168.1.181:3260 -> 192.168.1.184:3260 -reattach method: pod_recreate - -next action: wait for reader/app pod to become Ready -non-claim: transparent in-place I/O continuation is not claimed for this path -``` - -### Blocked Recovery - -Output shape: - -```text -volume pvc-123 status=blocked reason=no_promotion_ready_candidate -primary r1 on m01 is unavailable -r2 on m02 candidate_ready=false reason=durable_frontier_missing -r3 on tp01 candidate_ready=false reason=candidate_frontier_behind - -next action: - collect support bundle - do not force promote unless support confirms data frontier safety -``` - -## Dashboard Panels - -First dashboard should have only four panels: - -1. Volumes - - Shows PVC, status, RF, primary, frontend, and reason. - -2. Replicas - - Shows replica placement, role, durable frontier, candidate readiness, and - stale/fenced state. - -3. Timeline - - Shows the last N events for selected volume: placement, heartbeat loss, - candidate evaluation, authority publish, publish-target change, CSI - reattach, and recovery. - -4. Support Bundle - - One button or command copy block that captures exactly the evidence support - needs. - -5. Kubernetes Runtime Evidence - - Shows pod phase, container waiting reason, recent Kubernetes events, selected - pod logs, and image presence by node for Seaweed Block components. This panel - is mandatory for "PVC stuck attaching" cases because many failures are - Kubernetes runtime issues before storage recovery begins. - -Avoid advanced controls in the first dashboard. No promote, repair, rebuild, -or cleanup buttons until the read-only model is stable and gated. - -## Implementation Slices - -### D1: Observation Core And CLI From Bundle - -- Define `ClusterEvidence`, `VolumeEvidence`, `ReplicaEvidence`, and - `ClusterEvent` structs in ops/control code. -- Add renderers for text, JSON, and JSONL. -- Add golden examples for healthy, recovering, and blocked volumes. -- Add CLI commands that can read an existing inventory/support bundle first: - `sw-block ops describe volume --from-bundle `, - `sw-block ops timeline volume --from-bundle `, and - `sw-block ops explain volume --from-bundle `. - -Pass condition: - -```text -three golden examples render user-readable output with stable reason codes -``` - -### D2: Live CLI Over Current Inventory Sources - -- Wire `sw-block ops cluster`, `volumes`, `describe volume`, `timeline`, and - `explain` to the current live inventory collector. -- Keep text output short; write detailed evidence to JSON. - -Pass condition: - -```text -node-loss D4 artifacts can be explained by CLI without reading raw TestOps files -``` - -### D3: Master Snapshot API - -- Add `ClusterEvidenceService.GetClusterStatus`. -- Source data from lifecycle stores, placement stores, observation store, - authority publisher current lines, and known frontend facts. -- Keep it read-only. - -Pass condition: - -```text -one live RF3 volume appears with primary, replicas, frontend, epoch, and reason -``` - -### D4: Timeline API - -- Add an in-memory bounded event ring with optional persisted JSONL tail. -- Append events from product-loop transitions: - placement verified, candidate evaluated, authority published, publish target - changed, stale primary fenced. -- Add `GetVolumeTimeline`. - -Pass condition: - -```text -node-loss D4 produces the same six-event story from master API, not only from TestOps files -``` - -### D5: Watch API - -- Add `WatchClusterEvents` server stream. -- Dashboard can subscribe without polling. -- Events include monotonic IDs and reconnect cursor. - -Pass condition: - -```text -client disconnect/reconnect does not miss authority_published or volume_blocked events -``` - -### D6: User Tutorial And Support Bundle - -- Add `sw-block ops bundle volume`. -- Add docs showing how to diagnose healthy, recovering, and blocked. -- Keep all mutation commands explicitly non-existent. -- Include Kubernetes runtime evidence: - `kubectl get pods -A -o wide`, `kubectl describe pod` for Seaweed Block and - app pods, namespace events, CSI node/controller logs, blockmaster logs, and - per-node product image inventory. - -Pass condition: - -```text -a user can collect one bundle and identify the next action without reading TestOps artifacts -``` - -### D7: Attach/Install Failure Explanation - -- Detect `ImagePullBackOff`, `ErrImagePull`, CSI node unavailable, missing - DaemonSet pod on the selected app node, and missing product image on a k3s - node. -- Render the failure as an explanation, not just raw events. - -Pass condition: - -```text -if sw-block-csi:local is missing on one selected node, `sw-block ops explain` -names that node, image, pod, event reason, and next action -``` - -## Non-Claims - -- No mutating admin controls. -- No repair/promote/rebuild button. -- No performance metrics dashboard. -- No hosted UI. -- No external alert-manager integration. -- No claim that application-level data checks ran unless the user/TestOps ran - them. -- No replacement for Kubernetes events; this API explains Seaweed Block state. - -## Hard Gate - -The close gate for this MVP should fail if: - -- any read API can mutate state, -- a recovering/blocked state lacks a stable reason code, -- node-loss recovery evidence is available only in TestOps files and not via - master API, -- dashboard output requires users to know internal epoch semantics, -- support bundle misses the timeline or per-replica evidence, -- support bundle misses Kubernetes pod events/logs for attach/install failures, -- image missing on a selected node is not reported as a first-class reason, -- stale primary and promoted primary cannot be distinguished, -- event stream can lose `authority_published` across reconnect. - -## Product Rule - -This API is a trust feature. For block storage, a stuck PVC is a product -failure until the operator can quickly answer: - -```text -what failed, what the system did, whether data is safe, and what to do next -``` - -The observation API should make that answer obvious. diff --git a/seaweed-block/internal/docs/ref/iscsi-os-initiator-compat-plan.md b/seaweed-block/internal/docs/ref/iscsi-os-initiator-compat-plan.md index 71197ff35f..6592bc41be 100644 --- a/seaweed-block/internal/docs/ref/iscsi-os-initiator-compat-plan.md +++ b/seaweed-block/internal/docs/ref/iscsi-os-initiator-compat-plan.md @@ -265,8 +265,8 @@ Implementation status: ```text Run ID: 20260504T052809Z Tree: fix/iscsi-os-initiator-compat@1f13f8f -Host: M02 Linux 6.17 / open-iscsi -Artifacts: V:\share\iscsi-p1\runs\20260504T052809Z\ +Host: node-b Linux 6.17 / open-iscsi +Artifacts: the run directory 20260504T052809Z on the lab share Result: iscsiadm discovery/login: PASS @@ -287,7 +287,7 @@ Server-side evidence: Harness note: ```text -V:\share\iscsi-p1\run-p1-iscsi-os.sh +the lab copy of run-p1-iscsi-os.sh scripts/run-iscsi-os-smoke.sh ``` diff --git a/seaweed-block/internal/docs/ref/iscsi-p6-alua-mpio-design.md b/seaweed-block/internal/docs/ref/iscsi-p6-alua-mpio-design.md index 9fa8310e7f..eae4f6ec8b 100644 --- a/seaweed-block/internal/docs/ref/iscsi-p6-alua-mpio-design.md +++ b/seaweed-block/internal/docs/ref/iscsi-p6-alua-mpio-design.md @@ -169,7 +169,7 @@ authority, placement, and replica readiness. ### P6-E: Mounted Failover - Status: - - QA green on M02 at `d1025f1`. + - QA green on node-b at `d1025f1`. - Start a mounted workload through the multipath device. - Kill or close the active primary path. - Drive authority movement to the replica path. diff --git a/seaweed-block/internal/docs/ref/iscsi-v2-coverage-gap-audit.md b/seaweed-block/internal/docs/ref/iscsi-v2-coverage-gap-audit.md deleted file mode 100644 index 3887f83a32..0000000000 --- a/seaweed-block/internal/docs/ref/iscsi-v2-coverage-gap-audit.md +++ /dev/null @@ -1,278 +0,0 @@ -# iSCSI / Frontend V2 Coverage Gap Audit - -Date: 2026-05-04 -Branch: `iscsi-p2/os-initiator-stability` -Scope: compare V2 `weed/storage/blockvol` frontend coverage against V3 `seaweed-block` before adding more iSCSI-P2 product code. - -## Goal - -Do not port V2 code blindly. Use V2's test suite as a coverage inventory and decide which missing V3 tests would have prevented recent debug loops, especially the iSCSI OS-initiator large I/O issues. - -## Source Inventory - -V2 paths reviewed: - -- `weed/storage/blockvol/iscsi/*_test.go` -- `weed/storage/blockvol/nvme/*_test.go` -- `weed/storage/blockvol/csi/*_test.go` -- `weed/storage/blockvol/test/component/*` -- `weed/storage/blockvol/testrunner/scenarios/*` - -V3 paths compared: - -- `core/frontend/iscsi/*_test.go` -- `core/frontend/nvme/*_test.go` -- `core/csi/*_test.go` -- `cmd/blockcsi/*_test.go` -- `cmd/blockvolume/*_test.go` -- `internal/docs/ref/iscsi-os-initiator-compat-plan.md` - -## What V3 Already Covers Well - -### iSCSI protocol basics - -V3 has good coverage for: - -- PDU framing, AHS, data segment size, truncation. -- Login direct-to-FFP and staged negotiation. -- Discovery session basics and SendTargets. -- Basic SCSI READ/WRITE, stale backend, closed backend, unknown opcode. -- INQUIRY, VPD 0x80/0x83, READ CAPACITY 10/16, MODE SENSE, SYNC CACHE. -- Endpoint version / stale lineage fail-closed. - -Representative V3 tests: - -- `core/frontend/iscsi/pdu_test.go` -- `core/frontend/iscsi/login_test.go` -- `core/frontend/iscsi/discovery_test.go` -- `core/frontend/iscsi/scsi_test.go` -- `core/frontend/iscsi/scsi_batch10_5_test.go` -- `core/frontend/iscsi/t2_route_iscsi_test.go` - -### Recent OS-initiator compatibility fixes - -V3 now has focused P1 coverage for the bug class that blocked the demo: - -- Large WRITE R2T path. -- Data-Out collector checks DataSN, BufferOffset, TTT, overflow, premature final. -- Bounded pending queue while collecting Data-Out. -- Data-Out timeout. -- Large READ split into bounded Data-In PDUs. -- Residual count plus underflow/overflow direction flags. - -Representative V3 tests: - -- `core/frontend/iscsi/t2_large_write_test.go` -- `core/frontend/iscsi/dataout_test.go` -- `core/frontend/iscsi/p1_os_initiator_test.go` -- `core/frontend/iscsi/p1_large_read_test.go` -- `core/frontend/iscsi/datain_test.go` - -## 2026-05-09 Refresh: Current Classification - -The protocol-readiness phase closed several gaps that were open when this audit -was written: - -| Gap | Current classification | Evidence / next action | -|---|---|---| -| RX/TX session stress | Mostly covered by component tests and P8 soak. | Keep adding focused component tests for specific regressions. | -| Large-write memory / slow backend | Partially covered at protocol level; backend pressure remains active. | Move next work to storage-engine pressure contracts. | -| Product-backed iSCSI stability | Release-gated. | `iscsi-p8-compat-soak-chain` is the runner gate. | -| CHAP | Closed. | Target-side CHAP and CSI node CHAP are implemented and lab-validated. | -| ALUA / MPIO foundation | Release-gated. | `iscsi-p6-alua-failover-chain` covers ALUA + mounted failover. | -| CSI node lifecycle hardening | Still active. | Component-first beta hardening work. | -| NVMe QA breadth | Release-gated for ANA/multipath/CSI path; perf breadth remains active. | Keep P4/P5 gates; defer perf matrix. | - -The next iSCSI/V2-parity work should not re-open protocol bring-up. It should -focus on CSI lifecycle, backend pressure, returned-replica behavior, and host -compatibility breadth. - -## Historical High-Value Gaps From V2 - -### Gap 1: iSCSI RX/TX session stress - -V2 has a dedicated `qa_rxtx_test.go` suite covering: - -- Response-channel backpressure. -- Double session close. -- Tx-loop goroutine leak. -- 50 concurrent sessions. -- SCSI command during Data-Out. -- NOP-Out during Data-Out and response ordering. -- StatSN monotonicity and error-response StatSN. -- Target close while I/O is active. -- New session after target close. - -V3 has partial coverage: - -- SCSI command during Data-Out is covered in `TestP1_ISCSI_R2TDataOut_AllowsPipelinedCommand`. -- Pending queue bounded is covered. -- Data-Out timeout is covered. - -V3 still lacks a compact RX/TX stress pack: - -- 50 concurrent sessions. -- target close during active I/O. -- double close no panic. -- StatSN after error response. -- NOP-Out pending ordering. -- goroutine leak budget across many connect/login/logout cycles. - -Priority: **P2 high**. These are low-cost in-process tests and can catch correctness regressions before hardware. - -### Gap 2: large-write memory pressure and slow backend - -V2 has `large_write_mem_test.go`: - -- `TestLargeWriteMemory_4MB`: 10 x 4 MiB writes through a real iSCSI session and heap growth check. -- `TestLargeWriteMemory_SlowDevice`: slow `WriteAt` simulates WAL/admission pressure and checks buffers do not accumulate. - -V3 has large WRITE protocol tests but not an equivalent memory/slow-backend guard. - -Priority: **P2 high**. This directly matches the demo failure class. Add a V3 test with a fake backend that sleeps and tracks heap/goroutines. - -### Gap 3: product-backed iSCSI stability - -V2 `qa_stability_test.go` covers iSCSI over a real block volume: - -- sustained 1000 writes. -- write/read under WAL pressure. -- SYNC CACHE under pressure. -- multiple sessions sharing one volume. -- crash recovery via iSCSI. -- session reconnect. -- rapid open/close target. -- extreme valid config values. - -V3 has product-level K8s/CSI smoke and blockvolume L2 tests, but not this exact "frontend over durable backend under pressure" pack. - -Priority: **P2/P3 medium-high**. This should be adapted to V3 durable backend semantics, not copied mechanically from V2. - -### Gap 4: CHAP - -V2 has `auth_test.go` and `qa_chap_test.go`: - -- CHAP config validation. -- challenge/response state machine. -- wrong username/password. -- replayed challenge rejected. -- login integration with missing CHAP_N / CHAP_R. - -V3 does not implement CHAP. - -Priority: **iSCSI-P4**, not P2. Security is product-important but should not block basic single-path protocol correctness. - -### Gap 5: ALUA / MPIO foundation - -V2 has `alua.go` and `qa_alua_test.go`: - -- standby metadata commands allowed. -- unavailable/transitioning reject writes. -- active allows all ops. -- state change mid-stream fences the next write. -- VPD 0x83 / REPORT TARGET PORT GROUPS. -- concurrent state reads and standby reject. - -V3 does not implement ALUA. - -Priority: **iSCSI-P6**. This belongs after the HA/frontend fact model is stable. Do not mix it into P2. - -### Gap 6: CSI node lifecycle hardening - -V2 CSI tests are much broader than V3: - -- NodeStage/NodeUnstage idempotency. -- login failure cleanup. -- mkfs failure cleanup. -- unstage retry preserves staged entry. -- restart fallback using transport files. -- expand behavior. -- wrong volume at staging path. -- concurrent stage/unstage. -- NVMe vs iSCSI transport stickiness. - -V3 has the alpha K8s dynamic PVC path and some controller/node basics, but not the full adversarial node lifecycle matrix. - -Priority: **K8s/CSI-P2**, separate from iSCSI-P2. These tests matter before public alpha hardening. - -### Gap 7: NVMe QA breadth - -V2 NVMe has extensive coverage: - -- wire truncation and malformed PDUs. -- connect sequencing. -- admin / IO queue separation. -- large read chunking. -- ANA behavior. -- concurrent IO. -- reconnect/disconnect loops. -- buffer pool safety. -- WAL pressure classification. - -V3 NVMe has a solid initial port but less breadth. - -Priority: **NVMe-P2+**. Do not block iSCSI-P2, but use the same audit method before claiming NVMe product readiness. - -## First V3 Tests To Add Before More Product Code - -### Test Slice A: iSCSI RX/TX session stability pack - -Add a V3 test file, likely: - -- `core/frontend/iscsi/p2_rxtx_stability_test.go` - -Initial tests: - -- `TestP2_ISCSI_RapidLoginLogout_NoGoroutineLeak` -- `TestP2_ISCSI_ConcurrentSessions50_WriteRead` -- `TestP2_ISCSI_TargetCloseDuringActiveIO_ExitsCleanly` -- `TestP2_ISCSI_NopDuringDataOut_DrainsAfterWrite` -- `TestP2_ISCSI_ErrorResponseAdvancesStatSN` - -Rationale: this is cheap, local, and directly protects the new pending-queue/Data-Out/Data-In state machine. - -### Test Slice B: large write memory / slow backend - -Add: - -- `TestP2_ISCSI_LargeWrite4MiB_DoesNotGrowHeapUnbounded` -- `TestP2_ISCSI_LargeWrite_SlowBackend_DoesNotAccumulateBuffers` - -Keep thresholds loose enough for CI, but strict enough to catch unbounded buffering. - -Rationale: this would likely have exposed the original large WRITE issue before the Windows/Linux demo attempt. - -### Test Slice C: real OS initiator harness - -Add a harness, not necessarily a normal Go unit test: - -```text -Linux iscsiadm -> 256MiB/1GiB target -> mkfs.ext4 -> mount -> fio/dd read/write -> sha256 verify -> logout -> no sessions -``` - -Rationale: in-process clients do not perfectly model Linux kernel iSCSI behavior. P1 already proved this. - -## What Not To Do Now - -- Do not port V2 CHAP/ALUA into P2. -- Do not claim MPIO or mounted failover. -- Do not copy V2 blockvol internals into V3 storage/authority layers. -- Do not expand K8s operator cleanup while iSCSI single-path filesystem stability is still under verification. - -## Recommended Order - -1. Add Test Slice A: RX/TX session stability pack. -2. Add Test Slice B: large-write memory / slow backend. -3. Add Test Slice C: real OS initiator harness and run on M02. Keep the - default single-iteration path cheap, but support repeated - `SW_BLOCK_ISCSI_ITERATIONS=N` login/mkfs/mount/logout loops for session - reconnect stability. Use `SW_BLOCK_ISCSI_STRESS=fio` or `dd` for sustained - filesystem write/read pressure once the basic loop is green. -4. Only then raise K8s alpha PVC size from toy/smoke scale to 256MiB/1GiB. -5. Track CHAP as iSCSI-P4, ALUA/MPIO as iSCSI-P6. - -## Decision - -Proceed with **tests first** on `iscsi-p2/os-initiator-stability`. - -The next implementation PR should not be a protocol refactor unless one of the P2 tests turns red and points to a concrete state-machine gap. diff --git a/seaweed-block/internal/docs/ref/node-loss-lab-setup.md b/seaweed-block/internal/docs/ref/node-loss-lab-setup.md deleted file mode 100644 index 874dd05b51..0000000000 --- a/seaweed-block/internal/docs/ref/node-loss-lab-setup.md +++ /dev/null @@ -1,130 +0,0 @@ -# Node-Loss Lab Setup - -Status: support note for the active `Node-Loss Survival MVP` plan. - -The D3/D4 gates need three Kubernetes nodes. They do not strictly need three -physical machines for the MVP, but the bundle must disclose the physical-host -shape and must not claim full physical-host loss when Kubernetes nodes share a -machine. - -## Minimum MVP Lab - -Acceptable: - -```text -m02 control-plane -m01 worker -one additional worker VM or containerized worker on m01 or m02 -``` - -Required from `kubectl get nodes -o wide`: - -```text -3 Ready schedulable Kubernetes nodes -each with a non-loopback InternalIP -``` - -Current lab boundary: - -```text -m02 192.168.1.184 RoCE-capable host, used here through LAN TCP/iSCSI -m01 192.168.1.181 RoCE-capable host, used here through LAN TCP/iSCSI -tp01 192.168.1.188 non-RoCE host, used only through LAN TCP/iSCSI -``` - -Do not use `10.0.0.x` RDMA/RoCE addresses in this node-loss gate. The D3/D4 -claim is Kubernetes node-loss recovery over TCP/iSCSI on `192.168.1.x`, not -RoCE, NVMe/RDMA, or performance validation. - -Recommended node labels: - -```bash -kubectl label node sw-block.seaweedfs.com/physical-host=m02 --overwrite -kubectl label node sw-block.seaweedfs.com/physical-host=m01 --overwrite -kubectl label node sw-block.seaweedfs.com/physical-host= --overwrite -``` - -The D3 preflight uses this label first. If it is absent, it falls back to -`topology.kubernetes.io/zone`, then `kubernetes.io/hostname`, then node name. - -## Fast Readiness Check - -Run on the machine with kubeconfig access: - -```bash -cd /tmp/seaweed_block -bash scripts/preflight-node-loss-lab.sh \ - --min-k8s-nodes 3 \ - --env-out /tmp/node-loss.env \ - --placement-out /tmp/node-placement.before.txt \ - --topology-out /tmp/node-loss-nodes.txt -``` - -Pass means: - -```text -node_loss_lab_eligible=true -selected_node_count=3 -physical_domain_count= -physical_domain_shape=full-physical-host|shared-physical-host -kubernetes_node_loss_claimed=true -physical_host_loss_claimed=false -``` - -If this fails, do not ask QA to rerun D3. The full D3 scenario will fail closed -for the same reason. - -Failure is intentionally machine-readable. An ineligible but reachable lab exits -with code `3`, writes a negative placement artifact when `--placement-out` is -supplied, and does not write the env file: - -```text -node_loss_topology_eligible=false -node_loss_lab_eligible=false -reason=requires_3_ready_schedulable_nodes_with_non_loopback_internal_ip -found= -kubernetes_node_loss_claimed=false -physical_host_loss_claimed=false -``` - -Treat any non-zero exit from this preflight as a lab blocker, not a product -validation result. - -## Claim Boundary - -Three Kubernetes nodes on two physical machines proves only: - -```text -Kubernetes-node placement and recovery mechanics -``` - -It does not prove: - -```text -full physical-machine loss -``` - -Full physical-host-loss requires distinct physical fault domains for the failed -primary and surviving promotion candidates, and should be a later stricter gate. - -## Practical k3s Notes - -Typical shape: - -```text -m02: k3s server / control-plane -m01: k3s agent -extra worker: k3s agent in a VM or container with a routable InternalIP -``` - -The workers must be able to reach: - -```text -blockvolume iSCSI ports: 3260+ -blockvolume status ports: 23260+ -replication data/control ports: 19101+ -k3s API/control-plane ports required by the cluster -``` - -Avoid `127.0.0.1`, `localhost`, `0.0.0.0`, or unspecified addresses in the node -InternalIP used by the gate. diff --git a/seaweed-block/internal/docs/ref/node-loss-survival-mvp-spec.md b/seaweed-block/internal/docs/ref/node-loss-survival-mvp-spec.md deleted file mode 100644 index 2aa233dbed..0000000000 --- a/seaweed-block/internal/docs/ref/node-loss-survival-mvp-spec.md +++ /dev/null @@ -1,264 +0,0 @@ -# Node-Loss Survival MVP Spec - -Status: D1 cold product spec for `current-plan.md` Node-Loss Survival MVP. - -## 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? - -This is the next product step after Stage 2. Stage 2 proved transparent -failover when multiple logical replicas run on one Kubernetes node and the -primary blockvolume pod is stopped. Node-loss survival must prove the failure -mode users actually care about: - -```text -one Kubernetes node becomes unavailable --> the old primary is unavailable --> a surviving replica on another Kubernetes node becomes primary --> the workload recovers through the declared mechanism --> data verifies from the same PVC -``` - -## Product Contract Under Test - -First close targets the conservative recovery path: - -```text -protocol=iscsi -replication=RF3 -ack_profile=sync-quorum -topology=3 logical replicas on 3 Kubernetes nodes; physical-host/fault-domain -sharing must be disclosed -frontends=non-loopback, reachable from CSI nodes -failure=controlled primary Kubernetes node loss or equivalent node isolation -recovery=CSI/pod recreate reattach to surviving promoted frontend -data_check=reader verifies pre-failure bytes from the same PVC -``` - -The current lab proof uses LAN TCP/iSCSI addresses on `192.168.1.x`. It does -not use the `10.0.0.x` RoCE fabric; `tp01` is not RoCE-capable and must not be -used to support RDMA, NVMe/RDMA, or performance claims for this plan. - -Transparent multipath node-loss is a follow-up gate, not the first close gate, -unless the conservative path proves too little product value. The first close -may use pod recreate / CSI reattach, but it must be honest: - -```text -pod_recreate_used=true -transparent_failover_claimed=false -node_loss_recovery_claimed=true -``` - -## Non-Negotiable Semantics - -- Replicas must land on distinct Kubernetes nodes for the node-loss proof. -- Frontends must be reachable from the consuming CSI node; loopback frontends - are not valid for cross-node attach. -- The failed primary must be derived from live inventory, not hard-coded. -- Master controls authority. CSI consumes the published target after recovery; - CSI does not choose or promote a primary. -- Promotion must require sync-quorum frontier coverage, using the Stage 1 RF3 - promotion gate semantics. -- The old primary must not be treated as a valid writer after node loss. -- If candidate readiness cannot be proven, the product must fail closed with a - support bundle and must not create a false reader-checksum success. -- Every attach, promotion, reattach, and cleanup wait must be bounded with a - stable blocker reason. - -## Explicit Non-Claims - -- No transparent mounted I/O continuation in the first node-loss close. -- No NVMe ANA node-loss claim. -- No Windows MPIO claim. -- No broad multi-distro compatibility claim. -- No RTO/RPO/SLO claim beyond the 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 is an intermediate Kubernetes-node-loss lab only. - -## Required Evidence - -Minimum artifacts: - -```text -cluster-topology.txt -node-placement.before.txt -writer.log -inventory.before/ -primary-failure-recovery.txt -inventory.after-failure/ -csi-publish-before.txt -csi-publish-after.txt -reader.log -node-loss-recovery-boundary.txt -node-loss-recovery-summary.txt -bounded-waits.txt -cleanup-audit.txt -``` - -Required stable lines: - -```text -replicas_on_distinct_nodes=true -frontends_non_loopback=true -before_primary_replica= -before_primary_node= -failed_node= -failed_replica= -promoted_replica= -promoted_replica_node= -post_failure_primary_count=1 -pod_recreate_used=true -transparent_failover_claimed=false -node_loss_recovery_claimed=true -data_check_after_node_loss=reader_checksum_passed -old_primary_stale_io_success_count=0 -bounded_waits=pass -physical_host_loss_claimed=false -``` - -## D-Slice Plan - -### D1: Topology And Placement Audit - -Audit current code and lab reality: - -- whether TestOps has at least two Kubernetes nodes available, -- how `blockmaster` cluster-spec names physical nodes and server IDs, -- whether launcher can place replicas on distinct Kubernetes nodes, -- whether generated frontends can use non-loopback addresses, -- whether CSI publish lookup can select a target reachable from the consuming - node, -- whether inventory can prove node placement and non-loopback frontends. - -Exit: written audit section in `current-plan.md` and any required spec updates. - -D1 audit result: - -- The current local Kubernetes context is single-node and is not eligible for - the node-loss live gate. -- The alpha installer currently renders all logical servers onto one - Kubernetes node and uses loopback data/control addresses. -- The lifecycle planner has a base for multi-physical-node placement, but the - Kubernetes renderer still emits loopback iSCSI/NVMe/status frontends. -- `blockvolume` intentionally rejects external iSCSI/NVMe binds today. -- CSI receives a Kubernetes node ID but publish lookup does not yet use it to - validate target reachability. -- Master promotion evidence also needs routable status/probe access to - surviving replicas; loopback status endpoints are not enough for true - node-loss recovery. - -Therefore D3 must first make cross-node placement and target eligibility real. -Recovery code is out of scope until that gate passes. - -### D2: Strict QA Hard Gate - -Create `qa-assignments/node-loss-survival-mvp-close-hard-gate.md`. - -The gate must fail if: - -- all replicas are on one physical node, -- frontends are loopback, -- the proof uses only a pod stop instead of node failure/isolation, -- reader succeeds only because it still used the old primary, -- recovery happens without visible authority movement, -- cleanup leaves sessions/processes/k8s resources/run-scoped host paths. - -### D3: Placement / Non-Loopback Slice - -Make the product produce and inventory: - -```text -RF3 placements across distinct nodes -non-loopback replication data/control addresses -non-loopback iSCSI frontends -promotion/status probe access to surviving nodes -node-aware publish target evidence -``` - -This slice does not need to inject node loss yet. It proves the topology is -eligible. - -Three Kubernetes nodes may run on two physical machines for the MVP lab if the -bundle records the physical/fault-domain shape. The wording must remain -Kubernetes-node-loss, not full physical-host-loss, unless the artifacts prove -three distinct physical fault domains. - -The first implementation should preserve the existing safe default: - -```text -external iSCSI bind = explicit opt-in -external iSCSI bind without CHAP = rejected for node-loss gate -loopback/unspecified node-spec host in external mode = rejected before render -CSI NodeStage secret delivery = required when target CHAP is enabled -CSI loopback publish targets = rejected under node-loss profile -external status bind = explicit opt-in and concrete node address only -master promotion probes = use surviving replica node-address status endpoints -master status frontends = current primary first, with all assigned replica -frontends preserved for multipath evidence -NVMe external bind = not claimed -loopback frontend in node-loss profile = hard fail -``` - -### D4: Conservative Node-Loss Recovery Gate - -Runner-native scenario: - -```text -writer writes /data/demo.bin -inventory identifies primary replica and primary node -controlled failure isolates or drains/stops that 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 -``` - -Implemented scenario name: - -```text -testops/scenarios/node-loss-survival-rf3-reattach-chain.yaml -``` - -The scenario derives the primary node from inventory, cordons that Kubernetes -node, scales the primary blockvolume Deployment to zero, and schedules the -replacement reader on the survivor node selected by -`scripts/preflight-node-loss-lab.sh`. This is intentionally not a -physical-host-loss proof unless the placement artifacts show distinct physical -fault domains. - -### D5: Transparent Multipath Node-Loss Gate - -Only after D4 passes, decide whether to extend the plan or open the next plan -for: - -```text -same mounted pod -primary node loss -host multipath path switch to another node -no pod recreate -post-failure data check -``` - -This requires real multi-node pathing and should not be mixed into D4 unless the -lab/product path is already stable. - -## Success Statement - -After this plan, Seaweed Block can make a narrow beta-facing availability -statement: - -```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. -``` diff --git a/seaweed-block/internal/docs/ref/nvme-ana-parity-plan.md b/seaweed-block/internal/docs/ref/nvme-ana-parity-plan.md deleted file mode 100644 index b3dd772d72..0000000000 --- a/seaweed-block/internal/docs/ref/nvme-ana-parity-plan.md +++ /dev/null @@ -1,262 +0,0 @@ -# NVMe-oF / ANA Parity Plan - -Status: active reference. - -Goal: make NVMe-oF a second credible block frontend beside iSCSI. V2 visible -behavior is the minimum height. V3 keeps its own authority, recovery, and -frontend boundaries. - -## Product Position - -- iSCSI remains the alpha Kubernetes default until NVMe has the same OS, - multipath, failover, and CSI evidence. -- NVMe-oF is the performance-oriented frontend: - - lower protocol overhead than iSCSI for some workloads, - - standard Linux `nvme` tooling, - - better fit for multi-queue and high-throughput network paths, - - future RoCE path once TCP correctness is pinned. -- Do not use NVMe to bypass storage truth: - - protocol code must not decide authority, - - ANA state must be derived from frontend facts produced by the V3 authority - and replica lifecycle, - - stale primary writes must fail closed. - -## V2 Reference Points - -- V2 advertises NVMe/TCP in-capsule write support: - - Identify Controller sets `IOCCSZ = (64 + maxDataLen) / 16`, - - `ICDOFF = 0`, - - small writes can carry data directly in the command capsule, - - this avoids an R2T round trip for common 4 KiB writes. -- V2 has ANA support: - - Identify Controller advertises ANA, - - Identify Namespace carries an ANA group, - - Get Log Page ANA returns group state, - - tests cover optimized / standby / inaccessible behavior. -- V2 has write pressure behavior: - - `writeWithRetry` retries transient WAL-full errors, - - WAL pressure can throttle writers before hard failure. -- V2 has benchmark-oriented scenarios: - - NVMe max-concurrent-write sweeps, - - NVMe IO queue count sweeps, - - 10.0.0.x / high-speed network paths, - - fio-based comparison scenarios. - -## Current V3 State - -- Present: - - NVMe/TCP target code under `core/frontend/nvme`, - - IC handshake and Fabric Connect, - - Admin and IO queue separation, - - Identify Controller / Namespace / Namespace Descriptor List, - - deterministic NGUID / EUI-64, - - inline payload and R2T / H2C data path, - - pending capsule buffering during R2T data collection, - - one outstanding R2T per session, - - READ / WRITE / FLUSH dispatch to `frontend.Backend`, - - stale lineage maps to NVMe path-related status, - - KATO / KeepAlive support, - - unit and component tests for queue routing, large writes, pipelining, and - cleanup. -- Deliberately constrained: - - ANA Identify fields and OAES ANA Change Notice are advertised only when an - ANA provider is wired, - - ANA Change Notice has source/component evidence in Phase 127 and live - Linux host AER evidence in Phase 128, - - Dataset Management / Write Zeroes are not advertised. -- Product gaps: - - Kubernetes dynamic reconnect/restage after a mounted PVC's published NVMe - path set changes is not yet proven, - - no RoCE or 25 GbE claim. - -See `nvme-v2-coverage-gap-audit.md` for the P0 classification table. The -important correction from that audit: V2's target-side `writeWithRetry` is not -automatically a V3 goal. V3 currently rejects target-side retry by design; any -change there needs a separate product decision. - -## Design Rules - -- Standard first: - - prefer standard NVMe/TCP in-capsule data and R2T/H2C behavior, - - do not add a custom admin/vendor data path until the standard path is - measured and found insufficient. -- Advertised means implemented: - - do not flip ANA Identify bits until Get Log Page ANA and Linux host - behavior both pass, - - do not advertise Dataset Management or Write Zeroes before command support - exists. -- Performance claims require network labels: - - loopback numbers are correctness evidence only, - - 1 GbE, 10.0.0.x, 25 GbE, TCP, and RoCE must be reported separately. -- Keep iSCSI and NVMe common where possible: - - same `frontend.Backend`, - - same authority facts, - - same stale-write fence, - - same CSI volume lifecycle model, - - protocol-specific transport only at the edge. - -## Milestones - -### NVMe-P0 Audit And Red Plan - -- Goal: - - pin the V2-to-V3 gap before code changes. -- Tasks: - - map V2 NVMe files and scenarios to V3 files and tests, - - confirm what the old "control API carries data" path actually meant: - standard in-capsule data vs custom admin/vendor shortcut, - - document which pieces are protocol behavior, which are benchmark knobs, - and which are V2-specific architecture, - - create red tests for any missing protocol behavior before implementation. -- Close bar: - - plan table lists every V2 visible NVMe feature, - - each item is marked present, missing, intentionally deferred, or rejected - with product reason. - -### NVMe-P1 OS Kernel Baseline - -- Goal: - - prove one real Linux host can use V3 NVMe-oF as a block device. -- Tasks: - - script: `nvme connect`, - - discover device, - - `mkfs.ext4`, - - mount, - - write/read checksum, - - fio 60s, - - unmount, - - `nvme disconnect`, - - no stale sessions or target processes, - - dynamic ports only. -- #QA: - - run on M02 first, - - capture `nvme list`, `nvme id-ctrl`, `nvme id-ns`, fio summary, target - logs, and cleanup state. -- Close bar: - - 256 MiB target passes mkfs + fio, - - no protocol session errors during fio, - - cleanup leaves no NVMe connection or process residue. - -### NVMe-P2 In-Capsule / R2T Performance Path - -- Goal: - - verify the fast small-write path before claiming NVMe performance upside. -- Tasks: - - assert Identify `IOCCSZ` and `ICDOFF` match the implementation, - - measure whether Linux sends 4 KiB writes inline or via R2T, - - add counters/logs for inline writes vs R2T writes, - - run fio profiles: - - 4 KiB randwrite, iodepth 1 and 32, - - 128 KiB randrw, - - sequential write/read, - - compare iSCSI vs NVMe on the same backend and same host. -- #design: - - if V2 used a non-standard admin/vendor command as a data shortcut, decide - separately whether V3 should port it. Default answer: no for public - product path; maybe yes for internal benchmark only. -- Close bar: - - data path classification is visible in artifacts, - - no performance number is published without network/backend labels. - -### NVMe-P3 ANA Identity And Log Page - -- Goal: - - make ANA a real host-visible feature, not only path-related error codes. -- Tasks: - - add ANA provider based on V3 frontend facts, - - Identify Controller: - - set CMIC / ANACAP only after log support lands, - - set ANAGRPMAX and NANAGRPID, - - Identify Namespace: - - set ANAGRPID, - - Get Log Page ANA: - - return group count, - - return group state, - - return namespace list, - - increment change count when path state changes, - - keep stale primary errors mapped to path-related status. -- #QA: - - run `nvme id-ctrl`, `nvme id-ns`, `nvme get-log -i 0x0c` or equivalent - host tooling, - - verify optimized / standby / inaccessible states. -- Close bar: - - Linux host observes ANA consistently, - - no Identify field advertises a missing log behavior. - -### NVMe-P4 Multipath And Mounted Failover - -- Goal: - - reach iSCSI P6-level behavior for NVMe multipath. -- Tasks: - - two NVMe/TCP paths to one namespace, - - common namespace identity, - - distinct path state, - - Linux NVMe multipath groups one logical device, - - mounted ext4 workload survives active path kill, - - old primary refuses stale writes. -- #QA: - - mounted workload failover on M02 first, - - later rerun across m01/M02 if lab wiring is stable. -- Close bar: - - pre-failover checksum survives, - - post-failover write succeeds, - - old primary logs stale-lineage rejection, - - cleanup leaves no NVMe connections or processes. - -### NVMe-P5 CSI Integration - -- Goal: - - allow Kubernetes users to opt into NVMe without changing the app. -- Tasks: - - StorageClass protocol parameter: - - default remains iSCSI, - - `protocol: nvme` selects NVMe path, - - CSI ControllerPublish / NodeStage carries NVMe address and NQN, - - CSI node runs `nvme connect` idempotently, - - NodeUnstage disconnects only the matching NQN/device, - - transport file records enough state for restart cleanup, - - no residue after PVC delete. -- #QA: - - app writer/reader PVC demo with NVMe protocol, - - K8s fio 60s, - - attach/detach loop. -- Close bar: - - same user story as alpha iSCSI demo, protocol switched to NVMe by - StorageClass only. - -### NVMe-P6 RoCE / Network Performance Matrix - -- Goal: - - turn performance from intuition into repeatable data. -- Tasks: - - run 1 GbE TCP baseline, - - run 10.0.0.x / 25 GbE TCP path, - - run RoCE path if supported by lab and host drivers, - - compare iSCSI vs NVMe, - - compare walstore vs smartwal, - - record CPU, latency, bandwidth, IOPS, queue depth, and block size. -- #QA: - - only run after P1-P5 correctness gates are green. -- Close bar: - - repeatable matrix with artifact bundle, - - no "smartwal is faster" claim until the matrix proves it under labelled - conditions. - -## Open Questions - -- Did V2 ever use a custom NVMe admin/vendor command for data, or was the - remembered fast path standard in-capsule data? - - P0 initial answer: no custom vendor/admin data command was found in the V2 - NVMe package; the visible fast path is standard in-capsule data. -- Should V3 expose NVMe alpha before CSI integration, or keep it internal until - K8s has a user-facing switch? -- Do we want ANA before K8s NVMe, or K8s single-path NVMe before ANA? -- Which lab path is authoritative for performance: loopback, 1 GbE LAN, 10.0.0.x, - 25 GbE, or RoCE? - -## Immediate Next Step - -- Start NVMe-P0. -- No product code change until the audit table is done. -- First code milestone after P0 should be NVMe-P1 OS kernel baseline, because a - real Linux host catches wire behavior that in-process tests miss. diff --git a/seaweed-block/internal/docs/ref/nvme-p4-multipath-failover-design.md b/seaweed-block/internal/docs/ref/nvme-p4-multipath-failover-design.md deleted file mode 100644 index 33c8ee20e3..0000000000 --- a/seaweed-block/internal/docs/ref/nvme-p4-multipath-failover-design.md +++ /dev/null @@ -1,156 +0,0 @@ -# NVMe P4 Multipath / Mounted Failover Design - -Status: fully validated on M02. -Branch: `frontend/nvme-ana-parity-plan`. - -## Goal - -- Bring NVMe-oF to the same frontend correctness bar that iSCSI reached in - P6: real Linux multipath visibility first, mounted failover second. -- Keep this as correctness work. No performance, RoCE, or Kubernetes claim is - made by P4. - -## Starting State - -- P1: Linux `nvme connect -> mkfs -> mount -> checksum -> disconnect` is QA - green on M02. -- P3: ANA Identify fields and ANA log page are QA green on M02: - - Identify advertises ANA only when `ANAProvider` is wired, - - ANA log group id is dense `1`, matching `ANAGRPMAX=1` and `NANAGRPID=1`, - - Linux accepts the controller into ANA-aware init. -- P4: native multipath discovery and mounted failover are QA green on M02. - -## Linux Multipath Model - -- NVMe multipath is not `multipathd` for SCSI. -- Linux NVMe uses native multipath in the kernel when enabled, usually via: - - `nvme_core.multipath=Y` kernel parameter, or - - module parameter if supported by the distro. -- Evidence must record whether native NVMe multipath is enabled. A two-path - test without native multipath only proves two independent controllers, not a - usable multipath device. - -## Identity Requirements - -- Both paths for one volume must expose the same namespace identity: - - same NGUID, - - same EUI-64, - - same NSID, - - same SubNQN unless the host path model requires otherwise. -- The host must be able to tell path state apart through ANA: - - active path reports optimized, - - non-active but valid path reports non-optimized or inaccessible according - to the chosen policy, - - stale/degraded path must not report optimized. -- Current P3 uses one ANA group id (`1`) because there is one advertised group. - P4 may need a dense group allocation policy if Linux requires different path - states to live in distinct groups. - -## Policy Question For First P4 Slice - -- Option A: one ANA group per namespace. - - simple, - - works for single-path P3, - - cannot represent two paths with different states in one log response. -- Option B: one dense ANA group per path state/path. - - required if Linux native multipath expects active and standby paths to - report different groups, - - `ANAGRPMAX` and `NANAGRPID` must be the dense group count, - - every group id in the ANA log must be `<= ANAGRPMAX`. - -P4 should start with discovery evidence before deciding. If Linux groups two -paths with the current single group and both are optimized, that is not -failover-ready; it is only identity proof. - -Decision after QA on M02: - -- Single ANA group id `1` is sufficient for the current two-path native - multipath identity model. -- Linux accepted: - - one SubNQN, - - distinct controller IDs, - - CMIC multi-controller + ANA bits, - - NMIC shared namespace, - - common NGUID/EUI64, - - ANA log group id `1`. -- Evidence: - - branch `frontend/nvme-ana-parity-plan`, - - commit `a5ef1a5`, - - run `20260507T161800Z-test`, - - final line: - `[nvme-mpath] PASS: two NVMe/TCP paths expose one ANA-aware namespace`. - -## Milestones - -### P4-A: Two-Path Discovery / Identity - -Status: PASS on M02 at `a5ef1a5`. - -- Start one blockmaster and two blockvolume frontends for one volume. -- Expose two NVMe/TCP portals to the same Linux host. -- Connect both paths. -- Capture: - - `nvme list`, - - `nvme list-subsys -o json`, - - `nvme id-ctrl`, - - `nvme id-ns`, - - `nvme get-log -i 0x0c`. -- Expected: - - both paths connect, - - no `nvme_parse_ana_log` warning, - - same namespace identity across both paths, - - cleanup disconnects both paths. - -### P4-B: Native Multipath Grouping - -Status: PASS on M02 at `a5ef1a5`. - -- Preconditions: - - Linux native NVMe multipath enabled. -- Expected: - - host exposes one logical namespace with multiple paths, or reports a - clearly documented reason it cannot. - - Identify/log fields remain internally consistent. -- Non-claim: - - no failover yet. - -### P4-C: Mounted Failover - -Status: PASS on M02 at `e1e0e0c`. - -- Mount through the native multipath namespace. -- Write and checksum pre-failover data. -- Kill or close the active target path. -- Wait for authority/ANA state to move. -- Verify: - - pre-failover data reads back, - - post-failover write succeeds, - - old primary cannot acknowledge stale writes, - - cleanup leaves no NVMe connections or processes. -- Evidence: - - run ID `20260507T170000Z-nvme-p4-mounted-failover`, - - final line: - `[nvme-failover] PASS: mounted NVMe multipath workload read/wrote through r1->r2 failover`, - - Linux native multipath merged two TCP paths to `/dev/nvme1n1`, - - r2 promoted to `Epoch=2` with `FrontendPrimaryReady=true`, - - pre-failover checksum read after failover, - - post-failover write/read/verify succeeded, - - final cleanup removed the test NQN and target processes. - -## Non-Goals - -- No Kubernetes CSI protocol switch. -- No RoCE. -- No Windows NVMe claim. -- No performance claim. -- No long soak. -- No OAES ANA Change Notice was claimed by the original P4 gate. Phase 127 - added source/component evidence for an ANA-change AER producer, and Phase - 128 added the live Linux host AER rerun. - -## Follow-Up Risks - -- Longer soak is still required before any HA durability claim. -- Kubernetes CSI protocol switching is not covered by P4. -- RoCE and real network path behavior remain outside this milestone. -- Kubernetes dynamic reconnect/restage remains outside this milestone. diff --git a/seaweed-block/internal/docs/ref/phase166-nvme-rdma-kubernetes-multipath-reconnect-hold.md b/seaweed-block/internal/docs/ref/phase166-nvme-rdma-kubernetes-multipath-reconnect-hold.md deleted file mode 100644 index 7957c5b5df..0000000000 --- a/seaweed-block/internal/docs/ref/phase166-nvme-rdma-kubernetes-multipath-reconnect-hold.md +++ /dev/null @@ -1,104 +0,0 @@ -# Phase 166 NVMe/RDMA Kubernetes Multipath Reconnect - -Status: implementation complete; live close gate blocked by lab topology. - -Phase 165 proved the first opt-in Kubernetes NVMe/RDMA publish and attach path: -StorageClass intent, target publication, CSI attach, mounted I/O, status, and -cleanup all used RDMA without TCP fallback. Initial Phase 166 live runs also -proved an important boundary: tearing down the only target behind a mounted -single-path filesystem causes I/O errors even when the target returns with the -same controller identity and durable hostPath. Transparent outage recovery -therefore requires a surviving path; it cannot be claimed from reconnect logic -alone. - -## Validation Status - -- The transport-aware CSI reconnect contract and the Phase 166 TestOps close - gate are implemented. Local CSI, launcher, ops, script, and scenario checks - pass. -- Phase 165's published Kubernetes NVMe/RDMA path remains green: one live RDMA - controller, mounted writer/reader I/O, no TCP fallback, and zero residue. -- The shared reconnect implementation passes the Phase 133 NVMe/TCP RF2 - endpoint-replacement gate: two initial paths, connect the new endpoint, - preserve the surviving controller and mounted Pod, prune the old endpoint, - cross-surface agreement, and zero residue. -- The Phase 166 RF2 RDMA close gate is not yet runnable honestly on the current - lab. m01 and m02 are the only RoCE-capable nodes and also host the two RF2 - targets. Placing the initiator on either node makes one path a local RDMA - self-connect, which the kernel rejects with `Invalid argument`. tp01 is - offline and was not configured as a RoCE initiator. -- Unblock by adding a third Ready RoCE-capable Kubernetes initiator, or another - validated topology where both target endpoints are remote to the initiator. - Until that exists, Phase 166 remains open and must not be described as live - RDMA multipath support. - -## Goal - -Close the mounted NVMe/RDMA reconnect loop with RF2 multipath. Keep a workload -mounted while one RDMA path is unavailable or replaced, reconnect the exact -desired RDMA endpoint, and prune only the stale controller after the new path is -live. - -## Deliverables - -### D1. Exact Live-Path Contract - -- Reconcile each desired path by exact `(transport, NQN, address)`. -- Count a path as connected only when its controller state is `live`. -- Preserve explicit `rdma` publish evidence through reconnect calls. -- Reject transport changes on an existing staging mount; require restage rather - than silently mixing TCP and RDMA. - -### D2. RF2 RDMA Multipath Baseline - -- Publish one RF2 volume from m01 and m02 over their RoCE frontend addresses. -- Attach two live RDMA controllers for one NQN to the Kubernetes workload node. -- Use hostPath persistence so a restarted target reopens the same durable data. -- Require Stage 2 multipath, mounted writer/reader I/O, and no TCP controller. - -### D3. Surviving-Path Outage And Recovery - -- Stop or restart one non-primary RDMA target while the other path remains live. -- Preserve the mounted Pod UID and complete I/O during the one-path interval. -- Restore the target and require CSI-node to reconnect the missing exact RDMA - path without restaging the workload. -- Require two live RDMA paths and readable pre-outage data after recovery. - -### D4. Desired Endpoint Replacement - -- Change one replica's desired RDMA listen endpoint while the other path remains - live. -- Connect the new endpoint before pruning the old controller. -- Assert the old endpoint disappears, the new endpoint is live, the second path - is untouched, and mounted I/O continues with the same Pod UID. - -### D5. Control, User, And Safety Surfaces - -- Require publish context, host sysfs, `SwBlockVolume.status`, report, dashboard, - and explain to agree on RDMA and the current two-path set. -- Never satisfy a desired RDMA path with a TCP controller at the same address. -- Do not report a reconnecting controller as live. -- Scope disconnect/prune/cleanup to the gate-owned NQN and endpoint; do not use - `disconnect-all` in the product path or touch unrelated controllers. - -### D6. TestOps Close Gate - -- Reuse the proven Phase 111/132/133 RF2 multipath harness through a thin - Phase 166 RDMA wrapper rather than duplicating a single-node gate. -- Run with fresh matching product and CSI images on the m01/m02 RoCE lab. -- Require source tests, two-path baseline, outage I/O, exact reconnect, - connect-before-prune ordering, surface agreement, no TCP fallback, and - independent zero-residue verification in one bundle. - -## Exit Criteria - -Phase 166 closes only when an already-mounted Kubernetes RF2 NVMe/RDMA PVC -retains I/O through loss of one target path, reconnects that path after target -recovery, replaces one desired RDMA endpoint without remounting the Pod, and -finishes with exactly two live desired RDMA paths and zero residue. - -This phase does not claim transparent recovery after loss of the only NVMe path, -authority promotion or target-node failover, performance, broad hardware -compatibility, or an RTO/SLO. Those require separate evidence. The failed -single-path live runs are retained as evidence for this boundary rather than -being weakened into a passing test. diff --git a/seaweed-block/internal/docs/ref/product-positioning-v1.md b/seaweed-block/internal/docs/ref/product-positioning-v1.md deleted file mode 100644 index f3490eff08..0000000000 --- a/seaweed-block/internal/docs/ref/product-positioning-v1.md +++ /dev/null @@ -1,541 +0,0 @@ -# Seaweed Block Product Positioning v1 - -Status: draft, proposed for internal alignment. This document is the source of -truth a product agent should read before talking about Seaweed Block, and the -first place a new user should land before running it. - -It has three layers: - -1. Positioning — the product story. -2. What's delivered — the validated claim surface as of the latest closed plan. -3. How a new user runs it — including specifics for the M01/M02 lab. - ---- - -## 1) Positioning First, Matrix Second - -Primary rule: - -- Positioning is the product story. -- Claim matrix is the fact layer behind the story. - -Do not lead with a giant capability table in user-facing surfaces. -Lead with the product promise, then back it with evidence links. - ---- - -## 2) One-Line Positioning - -English: - -`Seaweed Block is a lightweight Kubernetes block storage product with enterprise protocol discipline and fail-closed recovery semantics.` - -Chinese: - -`Seaweed Block 是一个面向 Kubernetes 的轻量块存储产品,强调企业级协议纪律与可解释的 fail-closed 故障语义。` - ---- - -## 3) Core Value Propositions (Public) - -### A. Lightweight Kubernetes Experience - -- Fast first-volume path: one preflight, one install, one PVC, writer + reader pods verify checksum. -- Product-owned lifecycle: no manual side-quest scripts on the happy path. -- Read-only cluster inventory with line-level cleanup attribution. - -### B. Protocol Discipline - -- Product behavior is constrained by CSI / iSCSI / NVMe contracts. -- Linux OS-initiator and Windows-initiator compatibility validated against the same target binary (Linux green; Windows substantively PASS). -- ALUA / multipath / CHAP / online resize / Prometheus metrics covered by closed plans. - -### C. Fail-Closed Recovery Semantics - -- On controlled failure, the product either: - - recovers through the documented path with evidence, or - - refuses unsafe promotion and explains why. -- The safe-refusal contract carries `failover_status: refused`, `data_check_after_failover=not_claimed`, and an `after_issue_evidence` line tied to live inventory — no hidden "green" based on weak semantics. -- For Kubernetes HA, the minimum product line is not "master changed primary." - The minimum is app-path recovery: automatic promotion plus documented - CSI/node reattach on pod recreate with post-failure checksum evidence. A - later transparent-failover line must prove protocol multipath: iSCSI - ALUA/dm-multipath or NVMe ANA/native multipath. - ---- - -## 4) Target Users (ICP v1) - -1. Platform teams running stateful workloads on Kubernetes, who want less - operational weight than large storage stacks. -2. Edge/private-cluster operators needing explainable failure behavior rather - than opaque automation. -3. Engineering teams that care about protocol-correct host behavior and - supportable incident evidence. - ---- - -## 5) What We Are Not Positioning As (For Now) - -- Not a broad production HA platform claim. -- Not a full replacement pitch against large enterprise storage suites. -- Not a UI-first story. - -Current direction is: - -`small footprint + strict semantics + evidence-first operations` - ---- - -## 6) What's Delivered (Validated Claim Surface) - -Each row below is backed by a closed plan in -`internal/docs/finished-plans/` and a QA close report in -`internal/docs/qa-assignments/`. Run IDs on the M02 lab are recorded -in the corresponding close reports. - -### 6.1 Light-Use Operations Loop (phases 9–11) - -| Capability | Status | -|---|---| -| Install alpha stack with one command | claimed | -| Create one PVC, write/read through a pod, replace pod, read back | claimed | -| `sw-block ops status` produces a self-describing per-volume bundle | claimed | -| `sw-block ops inventory` discovers volumes/PVCs/endpoints from the cluster | claimed | -| Inventory: PVC ↔ volume ↔ replica mapping, line-level cleanup attribution | claimed | -| TestOps coordinates shared-lab runs with active/history/lock records | claimed | - -Closed plans: `phase9_finishedplan_light_use_operations_mvp.md`, -`phase10_finishedplan_light_use_install_lifecycle_operations_mvp.md`, -`phase11_finishedplan_cluster_ops_inventory_lifecycle_visibility_mvp.md`. - -### 6.2 Product-Owned Lifecycle (phase 12) - -| Capability | Status | -|---|---| -| Generated `blockvolume` Deployment created by the product when a PVC is added | claimed | -| Scoped delete: deleting one PVC leaves the other PVC's workload intact | claimed | -| `lifecycle_owner=pvc-owner-ref` + `owner_ref=PersistentVolumeClaim//` in inventory | claimed | -| `scripts/apply-k8s-alpha-blockvolumes.sh` side-quest removed from the default path | claimed | - -Closed plan: `phase12_finishedplan_product_owned_blockvolume_lifecycle_mvp.md`. - -### 6.3 Durable Volume Restart And Reattach (phase 13) - -| Capability | Status | -|---|---| -| Generated RF=1 `blockvolume` survives its own workload restart with data still readable through the PVC | claimed (when `SW_BLOCK_LAUNCHER_STATE_HOSTPATH` is configured) | -| Restart durability proof: writer checksum before restart, reader checksum on a replacement pod after restart | claimed | -| Durable status `Latched=true Operational=true` exposed in `sw-block ops status` bundle | claimed | -| Failure-bundle path: bad hostPath emits `inventory_status: unhealthy` with actionable issues | claimed | - -Closed plan: `phase13_finishedplan_durable_volume_restart_reattach_mvp.md`. - -### 6.4 Multi-Node Attach And Placement (phase 14) - -| Capability | Status | -|---|---| -| Same-node RF=1 attach on a multi-node-capable cluster: app pods + generated `blockvolume` pinned to the same selected Kubernetes node | claimed | -| Negative fixture: cross-node loopback attach refused with explicit exit 45 + `unsupported-cross-node-loopback-attach.txt` | claimed | -| Inventory exposes `node=` per replica so operators see the alignment | claimed | - -Closed plan: `phase14_finishedplan_multi_node_attach_and_placement_mvp.md`. - -### 6.5 Basic Mounted Failover And Reattach (phase 15) - -| Capability | Status | -|---|---| -| Two-logical-server dev/TestOps topology: one Kubernetes node can host two distinct Seaweed Block server identities | claimed | -| RF=2 PVC binds, two generated `blockvolume` Deployments become Ready, distinct frontend/status ports | claimed | -| RF=2 mounted app path: writer + reader checksums pass through the same PVC | claimed | -| Default single-logical-server RF=2 is safely refused (not partially placed) | claimed | -| Controlled primary failure produces a safe-refusal bundle when the peer is not promotion-ready | claimed | -| Inventory dual-primary safety: `conflicting_primary_replicas=...` issue surfaces when authority is contradictory | claimed | - -Closed plan: `phase15_finishedplan_basic_mounted_failover_and_reattach_mvp.md`. - -Delivered Phase 15 safe-refusal contract (the exact strings): - -```text -failover_status: refused -ack_profile: best-effort -failure_class=primary-blockvolume-controlled-stop -before_primary_replica= -failed_replica= ← derived from live inventory, equals before_primary_replica -candidate_ready=false -candidate_evidence= -data_check_after_failover=not_claimed -reason=candidate_not_ready_for_primary -target_ready_replicas=0 -after_issue_evidence= -``` - -### 6.6 Stage 1 Mounted Recovery ACK Profile (phase 16) - -| Capability | Status | -|---|---| -| RF=2 `best-effort` controlled recovery demo through CSI/pod recreate | claimed as demo only | -| RF=3 `sync-quorum` mounted recovery through CSI/pod recreate | claimed as Stage 1 beta recovery target | -| Master promotion gated by promotion evidence and durable frontier coverage | claimed | -| CSI/node re-stage on pod recreate moves the mounted app to the promoted frontend | claimed | -| Post-failure reader checksum proves recovered app-path data | claimed | -| Transparent in-place I/O continuation without pod recreate | not claimed | - -Closed plan: -`phase16_finishedplan_stage1_mounted_recovery_ack_profile_mvp.md`. - -Delivered Stage 1 RF=3 recovery marker: - -```text -ack_profile: sync-quorum -claim_profile=beta-recovery -failover_status: promotion_pending -> promoted -before_primary_replica=r1 -failed_replica=r1 -promoted_replica=r2 -frontier_covered=true -post_failure_primary_count=1 -data_check_after_failover: pending_reader -> reader_checksum_passed -reader_verified=true -``` - -Interpretation: this is Kubernetes mounted recovery through CSI/pod recreate. -It is not transparent protocol multipath failover. - -### 6.7 Protocol Substrate (carried forward from earlier phases) - -| Capability | Status | -|---|---| -| iSCSI target + ALUA implicit + multipath compatibility | closed at phases 1–6 | -| iSCSI OS-initiator compatibility (Linux green, Windows substantively PASS) | closed at phase 6 | -| Snapshots (CoW), CHAP auth, online resize | closed at phase 5 | -| Prometheus metrics | closed at phase 5 | -| Fault/consistency tests on m01/M02 lab | closed at phases 2–5 | - ---- - -## 7) Non-Claims (Authoritative List) - -The product does NOT claim, as of phase 16 close: - -- transparent production HA without pod recreate, -- node loss or host-disk failure survival, -- remote-node attach to a loopback-published `blockvolume`, -- automatic multi-node scheduling, rescheduling, or rebalancing, -- RF=2 quorum HA after primary failure, -- transparent in-place I/O continuation, -- Kubernetes CSI multipath host-path failover, -- sync-all durability, -- backup, restore, rebuild, promote, repair, or other mutating admin commands, -- broad uninstall safety / upgrade safety, -- performance SLOs, -- UI or operator-grade reconciliation. - -If a new claim is added in a future plan, both `docs/operations-v1.md` -"Scope And Non-Claims" and this document MUST be updated in the same change. - ---- - -## 8) How A New User Runs It - -This section gives the canonical install + first-volume path. It mirrors -`docs/quickstart-kubernetes.md` ("First Volume In 10 Minutes" section). Run -each step in order on a single-node Kubernetes cluster. - -### 8.1 Prerequisites - -- A Linux Kubernetes node where privileged CSI pods are allowed and - `iscsi_tcp` is loadable. k3s works. -- `open-iscsi` (`iscsiadm`) installed on the node. -- Docker + the ability to `k3s ctr images import` (or a registry your cluster can pull). -- `kubectl` configured against the cluster. - -### 8.2 Default Install / First Volume - -```bash -export KUBECONFIG="${KUBECONFIG:-/etc/rancher/k3s/k3s.yaml}" - -# Preflight (emits structured PASS/FAIL per check): -bash scripts/preflight-k8s-alpha.sh --local-k3s - -# Build alpha images locally and import them into k3s containerd: -SW_BLOCK_IMPORT_K3S=1 \ -SW_BLOCK_ARTIFACT_DIR=/tmp/sw-block-alpha-build \ - bash scripts/build-alpha-images.sh "$PWD" - -# Run the first-volume demo end to end: -bash scripts/run-k8s-demo.sh "$PWD" -``` - -Expected final line: - -```text -[app-demo] PASS: app pod wrote data, replacement app pod read it back through the same PVC, cleanup complete -``` - -### 8.3 Inspect The Cluster - -Operate the cluster after install: - -```bash -# Port-forward blockmaster for the inventory command: -kubectl -n kube-system port-forward svc/blockmaster 9333:9333 -``` - -In another terminal: - -```bash -sw-block ops inventory \ - --namespace default \ - --master 127.0.0.1:9333 \ - --out /tmp/sw-block-inventory - -cat /tmp/sw-block-inventory/volume-inventory-summary.txt -``` - -A healthy one-volume shape looks like: - -```text -inventory_status: ok -volumes: total=1 ok=1 unhealthy=0 invalid=0 -volume: id=pvc-... pvc=sw-block-demo-pvc rf=1 desired=1 observed=1 primary=r1 status=ok protocols=iscsi -replica: ... server= node= frontend=127.0.0.1:3260 status_addr=127.0.0.1:23260 support_bundle=volumes/pvc-.../r1 -``` - -For an RF=2 development/TestOps topology, set -`SW_BLOCK_ALPHA_LOGICAL_SERVERS=2 SW_BLOCK_ALPHA_EXPECTED_SLOTS_PER_VOLUME=2` on -the installer. See `docs/operations-v1.md` §"RF=2 Mounted Failover Status". - -### 8.4 Durable Restart Path - -```bash -RUN_ID="$(date -u +%Y%m%dT%H%M%SZ)" -export SW_BLOCK_LAUNCHER_STATE_HOSTPATH="/var/lib/sw-block/testops-${RUN_ID}-restart" -bash scripts/run-k8s-blockvolume-restart.sh "$PWD" -``` - -This proves a generated RF=1 `blockvolume` can be restarted while the same PVC -remains usable. See `docs/operations-v1.md` §5. - -### 8.5 If Something Fails - -```bash -ARTIFACT_DIR="$(ls -td /tmp/sw-block-app-demo-* | head -1)" -cat "$ARTIFACT_DIR/run.log" - -VOLUME_ID="$(sed -n 's/.*--volume-id=\([^"[:space:]]*\).*/\1/p' "$ARTIFACT_DIR/generated-blockvolume.yaml" | head -1)" -STATUS_ADDR="$(sed -n 's/.*--status-addr=\([^"[:space:]]*\).*/\1/p' "$ARTIFACT_DIR/generated-blockvolume.yaml" | head -1)" - -if [ -n "$VOLUME_ID" ] && [ -n "$STATUS_ADDR" ]; then - sw-block ops status \ - --volume "$VOLUME_ID" \ - --master "127.0.0.1:9333" \ - --status-addr "$STATUS_ADDR" \ - --out "$ARTIFACT_DIR/ops-status" -else - echo "ops-status-unavailable: no volume id/status address reached" -fi -``` - -Attach the whole artifact directory to any issue report. - -### 8.6 Cleanup - -The demo cleans up automatically. For a full alpha stack uninstall: - -```bash -bash scripts/uninstall-k8s-alpha.sh "$PWD" -``` - -For user-facing scoped cleanup of just the demo PVC, see -`docs/quickstart-kubernetes.md` "Cleanup" section. Do NOT use global -`kubectl delete deploy -A -l app=sw-blockvolume` — that's a TestOps -guardrail, not user-facing cleanup. - ---- - -## 9) Running On The M01 / M02 Lab - -The internal M01/M02 lab is the canonical hardware substrate for QA and demos. -Seaweed Block's alpha all runs on M02 (single-node k3s). M01 is currently used -by the SRA/RDMA project, not as a Kubernetes node for seaweed_block. - -### 9.1 Lab Coordinates - -| Item | Value | -|---|---| -| M02 (k3s alpha lab) | `192.168.1.184`, user `testdev` | -| SSH key (controller-side) | `C:/work/dev_server/testdev_key` | -| Shared SMB share (``) | the internal evidence store; `/mnt/smb/work/share` on Linux | -| TestOps artifact root on M02 | `/mnt/smb/work/share/g15d-k8s/-/` | -| Default `KUBECONFIG` on M02 | `/etc/rancher/k3s/k3s.yaml` | -| TestOps control directory (when used) | `--control-dir` flag to `sw-testops` | - -### 9.2 Connecting To M02 - -From a Windows controller (Git Bash / PowerShell): - -```bash -ssh -i C:/work/dev_server/testdev_key testdev@192.168.1.184 -``` - -If you need to forward an interactive `iscsiadm` session or expose -blockmaster's gRPC to a Windows tool, use SSH local forwarding: - -```bash -ssh -i C:/work/dev_server/testdev_key -N -L 9333:127.0.0.1:9333 testdev@192.168.1.184 -``` - -(For Windows iSCSI Initiator validation specifically, see -`internal/docs/qa-assignments/iscsi-os-windows-initiator-validation.md`.) - -### 9.3 Staging The Source Tree On M02 - -The product working tree is shared with the dev agent at -`C:/work/seaweed_block`. To run on M02, ship the working tree to -`/tmp/seaweed_block` and proceed: - -```bash -# From Windows controller (Git Bash): -ssh -i C:/work/dev_server/testdev_key testdev@192.168.1.184 \ - 'rm -rf /tmp/seaweed_block && mkdir -p /tmp/seaweed_block' - -cd C:/work/seaweed_block -tar --exclude=.git --exclude='*.exe' --exclude=node_modules \ - --exclude=results --exclude=.cache --exclude=tmp -cf - . \ - | ssh -i C:/work/dev_server/testdev_key testdev@192.168.1.184 \ - 'cd /tmp/seaweed_block && tar -xf -' -``` - -On M02, the same `scripts/preflight-k8s-alpha.sh --local-k3s` + the canonical -quickstart commands apply (§8.2 above), with `KUBECONFIG=/etc/rancher/k3s/k3s.yaml`. - -### 9.4 Running A QA Scenario Against M02 From The Controller - -The `swblock` runner can drive scenarios on M02 over SSH: - -```powershell -swblock run ` - --results-dir /g15d-k8s/testops-runs/ ` - --env product_root=/tmp/seaweed_block ` - --env ssh_key=C:/work/dev_server/testdev_key ` - C:/work/seaweed_block/testops/scenarios/.yaml -``` - -Scenario artifacts land under both: - -- The Windows result bundle at `/g15d-k8s/testops-runs/...`, -- The M02-side artifact dir at `/mnt/smb/work/share/g15d-k8s/-*/`. - -### 9.5 Lab Hygiene After A Run - -The chains' `collect_and_cleanup` phases handle scoped cleanup. To audit -manually after a run: - -```bash -ssh -i C:/work/dev_server/testdev_key testdev@192.168.1.184 ' - sudo -n iscsiadm -m session 2>&1 | head -1 - pgrep -af "blockmaster|blockvolume|blockcsi|iscsi-target" 2>/dev/null | head - pgrep -af "kubectl.*port-forward.*svc/blockmaster" 2>/dev/null | head - KUBECONFIG=/etc/rancher/k3s/k3s.yaml kubectl get deploy -A -l app=sw-blockvolume - sudo -n ls -d /var/lib/sw-block/testops-* 2>/dev/null' -``` - -Expected after a clean run: no active iSCSI sessions, no sw-block processes, -no port-forwards, no `app=sw-blockvolume` Deployments, no run-scoped -`testops-*` paths. - -Older `/var/lib/sw-block/pvc-*` directories from prior demos exist and are -out of scope for the testops cleanup guarantee — they are documented as a -non-claim (see `docs/operations-v1.md` "Upgrade and broad uninstall safety -are not claimed"). - ---- - -## 10) Where To Find Evidence - -For each delivered claim: - -| Source | What it gives you | -|---|---| -| `internal/docs/finished-plans/phase_finishedplan_*.md` | The plan that closed the claim | -| `internal/docs/qa-assignments/*-close-report.md` | QA close report with HG-clause table, residue audit, run IDs | -| `internal/docs/qa-assignments/*-validation.md` | QA assignments (input to a close report) | -| `testops/scenarios/*.yaml` | Runner-native scenarios that validate the claim live | -| `docs/operations-v1.md` | User-facing operations manual; tracks the same claim/non-claim discipline | -| `docs/quickstart-kubernetes.md` | First-volume runbook for a new user | - -Recent close reports a product agent should be ready to cite: - -- `light-use-mvp-close-report.md` (phase 10) -- `cluster-ops-inventory-mvp-close-report.md` (phase 11) -- `product-owned-blockvolume-lifecycle-mvp-close-report.md` (phase 12) -- `durable-volume-restart-reattach-mvp-close-report.md` (phase 13) -- `multi-node-attach-placement-mvp-close-report.md` (phase 14) -- `mounted-failover-reattach-mvp-close-report.md` (phase 15) -- `stage1-mounted-recovery-ack-profile-mvp-close-report.md` (phase 16) - ---- - -## 11) Public Messaging Template - -### Short Paragraph (README / Site) - -Seaweed Block is a lightweight Kubernetes block storage product for early lab -and small-cluster usage. It focuses on a clear first-volume workflow, protocol- -disciplined behavior across CSI/iSCSI/NVMe paths, and fail-closed recovery -semantics. When recovery is not yet safe to claim, Seaweed Block reports an -explicit refusal with actionable evidence instead of hiding risk behind partial -success. - -### Non-Claim Footer (Mandatory) - -This release does not claim production HA, broad distro compatibility, or -upgrade-safe operations. See `docs/operations-v1.md` "Scope And Non-Claims" -and the QA close reports under `internal/docs/qa-assignments/` for exact -scope. - ---- - -## 12) Execution Rules (Internal) - -1. Any new public claim must map to: - - a gate/scenario, - - QA evidence (close report with run IDs), - - explicit non-claim boundary. -2. If semantics are weaker than the product promise, publish safe refusal - rather than softening the promise silently. -3. Do not let tests become marketing language; tests validate claims, they do - not define positioning. -4. When a plan closes, update both `docs/operations-v1.md` "Scope And - Non-Claims" and §6/§7 of this document in the same change. - ---- - -## 13) Role Of The Claim Matrix - -The claim matrix (§6 and §7 above) should remain a fact document: - -- capability, -- claim status (claimed / partial / non-claim), -- proof links (close report + scenario + plan), -- known gaps (the next plan in `internal/docs/current-plan.md`). - -Use it as: - -- release sign-off artifact, -- support alignment artifact, -- internal truth source for external messaging. - -Do not use it as the primary homepage narrative. - ---- - -## 14) Next Steps - -1. Align README top section to this positioning. -2. Add a concise public-facing claim summary in `docs/` that mirrors §6/§7. -3. Keep this document as the authoritative claim/non-claim source under - `internal/docs/ref/`. -4. When the next plan closes, append its row to §6, reconcile §7 if any - non-claim was promoted, and update §10's recent close report list. diff --git a/seaweed-block/internal/docs/ref/production-readiness-plan.md b/seaweed-block/internal/docs/ref/production-readiness-plan.md deleted file mode 100644 index 961e26da76..0000000000 --- a/seaweed-block/internal/docs/ref/production-readiness-plan.md +++ /dev/null @@ -1,484 +0,0 @@ -# Production Readiness Plan - -This document is the internal post-alpha plan for moving `seaweed-block` from -the current Kubernetes alpha MVP toward a small production-usable block service. - -It keeps the global product view, current protocol tracks, and readiness bars in -one place. Public docs should expose the stable user-facing subset, not this -full internal execution ledger. - -## Product Phases - -### Phase 0: Alpha Preview - -Status: current. - -User-facing bar: - -- README quick start passes on a fresh single-node k3s lab. -- Dynamic PVC create/delete works through CSI. -- A normal app pod writes and reads data through the mounted PVC. -- Cleanup leaves no active iSCSI sessions and no visible Kubernetes resources. -- Limitations are visible: single-node evidence, iSCSI only, `walstore` only, - no production HA claim. - -Current strongest evidence: - -```text -tree: seaweed-block@59277f9 -lab: M02 k3s single-node -mode: literal README Quick Start, KUBECONFIG unset, no manual workaround -result: [alpha] PASS: dynamic PVC create/delete completed checksum write/read and cleanup -artifacts: V:\share\sw-block-final-close\20260504T000127Z\ -``` - -### Phase 1: Alpha Stabilization - -Goal: make the alpha useful for early Kubernetes users without the test harness -acting as the operator. - -Bar: - -- generated `blockvolume` workloads are created and cleaned by product logic, - not by smoke-test script sweeps, -- PVC owner-reference cleanup is the default alpha path, -- repeated create/write/read/delete is stable, -- larger-volume iSCSI filesystem operations work with real OS initiators, -- artifact collection is standard enough for QA and external bug reports. - -### Phase 2: Beta Candidate - -Goal: make the service credible for small lab clusters and early contributor -testing beyond a single-node demo. - -Bar: - -- multi-node Kubernetes attach works, -- data survives `blockvolume` pod restart, -- basic failover is tested under an attached workload, -- returned replica lifecycle is explicit, -- ACK profile behavior is named and test-pinned, -- TestOps can run the smoke suite by scenario name. - -### Phase 3: Production Candidate - -Goal: make operational limits, failure behavior, and upgrade/cleanup semantics -clear enough for real deployments. - -Bar: - -- soak and fault testing, -- security/resource hardening, -- upgrade/uninstall story, -- documented operational limits, -- reproducible release artifacts/images, -- observability sufficient for diagnosis without source-level debugging. - -## Product Rule - -Production readiness is not a single protocol milestone. It requires the whole -runtime loop to be understandable: - -```text -user intent -> placement -> authority -> runtime execution -> progress facts - -> recovery / failover / cleanup -> operator-visible status -``` - -The control plane must keep these facts distinct: - -- placement intent is not authority, -- authority movement is not data continuity, -- frontend readiness is not replica readiness, -- heartbeat observation is not recovery completion, -- best-effort acknowledgement is not full-replica durability. - -These boundaries protect the project from over-claiming availability before the -data path and operator story are actually proven. - -## Current iSCSI Steps - -The iSCSI track should stay aligned with V2 coverage at the behavior/test level, -not by copying V2 control-plane code. - -### iSCSI-P1: OS Initiator Correctness - -Status: implemented and evidenced. - -Scope: - -- Linux `iscsiadm` login, -- 256 MiB target, -- `mkfs.ext4`, -- mount, -- write/read checksum, -- logout, -- no dangling session, -- large WRITE R2T/Data-Out handling, -- large READ Data-In splitting. - -Key implemented slices: - -- pending SCSI command during Data-Out is queued, not fatal, -- V3-local DataOutCollector validates DataSN, BufferOffset, F-bit, overflow, -- bounded pending queue, -- Data-Out timeout, -- real Linux OS initiator smoke, -- DataInWriter large-read split. - -Next validation before considering P1 fully stable: - -- repeat OS smoke several times, -- run 256 MiB K8s PVC path, -- run 60s `fio` randrw, -- run Windows iSCSI Initiator format if we want a Windows demo claim. - -### iSCSI-P2: Session Stability And Memory Pressure - -Goal: close the high-value V2 RX/TX coverage gap. - -Test coverage to add or port by behavior: - -- many concurrent sessions, -- close while active I/O is in flight, -- repeated open/close, -- non-Data-Out PDUs during Data-Out, -- NOP-Out during Data-Out, -- StatSN monotonicity and error-response StatSN, -- response backpressure, -- target close while active sessions exist, -- new session after target close, -- 10 x 4 MiB writes without unbounded heap growth, -- slow backend does not accumulate unbounded buffers. - -Close bar: - -- local protocol tests green, -- real OS harness supports loop count, -- no session goroutine leak, -- no unbounded memory growth under large writes. - -### iSCSI-P3: Product-Backed Stability - -Goal: verify iSCSI through real `blockvolume`, WAL, CSI, and Kubernetes paths. - -Scenarios: - -- sustained filesystem write/read on `walstore`, -- `SYNCHRONIZE_CACHE` pressure, -- K8s 256 MiB PVC write/read, -- 60s `fio` randrw, -- app writer pod replaced by reader pod on same PVC, -- repeated attach/detach loop, -- reconnect after initiator logout/login. - -Close bar: - -- no iSCSI session errors, -- no dangling sessions after cleanup, -- no Kubernetes residue, -- data checksum passes through pod path. - -### iSCSI-P4: Security And Access Control - -Goal: match the useful V2 CHAP behavior without pulling V2 control-plane -semantics into V3. - -Scope: - -- CHAP config validation, -- auth success/failure tests, -- wrong-secret and missing-secret negative tests, -- Kubernetes Secret integration later, -- clear docs that CHAP is disabled by default in alpha. - -Close bar: - -- unauthenticated access fails when CHAP is required, -- authenticated access passes, -- auth failure does not leak sessions or partially open devices. - -### iSCSI-P5: CSI Node Lifecycle Hardening - -Goal: make iSCSI reliable under normal Kubernetes node-plugin behavior. - -Scope: - -- NodeStage idempotency, -- NodeUnstage cleanup, -- plugin restart cleanup, -- stale device/session detection, -- failed attach cleanup, -- repeated attach/detach, -- clear host requirements for `iscsi_tcp`, privileged mode, and mount tools. - -Close bar: - -- kubelet retries do not wedge the node plugin, -- failed attach leaves no device/session leak, -- repeated PVC create/delete works without manual host cleanup. - -### iSCSI-P6: Multipath / Failover Frontend - -Goal: support mounted-volume failover semantics instead of only reconnect-based -single-path behavior. - -Scope: - -- ALUA/MPIO for iSCSI, -- standby/active target state, -- REPORT TARGET PORT GROUPS behavior, -- path failure and recovery, -- failover while mounted, -- old primary cannot serve stale successful I/O. - -Close bar: - -- authority/failover facts are stable enough to drive frontend path state, -- failover while mounted has byte-equal proof, -- no stale-primary success, -- no claim before ALUA/MPIO behavior is tested with real initiators. - -## Production Tracks - -### 1. Install And Cleanup Surface - -Goal: users can install and remove the alpha stack without the harness acting as -an operator. - -Required work: - -- package a stable Kubernetes install surface, preferably Helm or a single - generated manifest bundle, -- replace `emptyDir` state for generated `blockvolume` workloads with a durable - node-local path, -- add a small controller/operator to create and delete generated `blockvolume` - workloads, -- make `DeleteVolume` cleanup fully controller-owned, -- keep the README quick start as a smoke test for every release candidate. - -Pass bar: - -- repeated create/write/read/delete leaves no Kubernetes resources and no iSCSI - sessions, -- pod restart and CSI pod restart do not leak blockvolume workloads, -- users do not need to know internal generated manifest paths. - -### 2. Multi-Node Kubernetes - -Goal: prove the service works across real Kubernetes node boundaries. - -Required work: - -- run at least two Kubernetes nodes, -- place blockvolume and workload pod on distinct nodes, -- attach through a non-loopback frontend target, -- verify dynamic PVC write/read checksum, -- preserve complete artifacts for master, CSI, blockvolume, kubelet-facing - events, and iSCSI state. - -Pass bar: - -- same user-facing quick-start shape works on multi-node lab, -- no hard-coded `127.0.0.1` assumptions leak into publish context, -- cleanup is still complete. - -### 3. Durable State - -Goal: data survives blockvolume pod restart and node-local process restart. - -Required work: - -- define the default durable root layout, -- make generated workloads mount the durable root explicitly, -- prove blockvolume restart recovers the volume, -- prove CSI reattach reads previously written bytes, -- document which failure cases are still unsupported. - -Pass bar: - -- write data, restart generated blockvolume pod, reattach, read same data, -- no manual state repair required. - -### 4. Failover While Mounted - -Goal: the availability claim becomes real, not just component-level. - -Required work: - -- run a pod that writes through a mounted PVC, -- kill or isolate the current primary, -- move authority through the publisher path, -- force the frontend reconnect path, -- verify acknowledged data is still readable, -- verify old primary cannot serve stale successful reads or writes. - -Pass bar: - -- byte-equal proof through the mounted workload path, -- no stale-primary success, -- old-primary return becomes candidate/syncing/rebuilding, not ready. - -### 5. Replica Lifecycle And Recovery Policy - -Goal: lagging or returning replicas become a normal managed state. - -Required work: - -- model returned replica states explicitly: - - ```text - observed -> candidate -> syncing/rebuilding -> replica_ready - ``` - -- keep frontend primary readiness separate from replica readiness, -- define catch-up vs rebuild policy based on durable progress and WAL - retention, -- expose recovery progress to operators, -- prevent placement or ACK eligibility from using a replica before it is ready. - -Pass bar: - -- returned replica cannot become ready from heartbeat alone, -- recovery progress facts are visible, -- full rebuild and smaller catch-up paths are both tested. - -### 6. ACK Profiles And Write Availability - -Goal: users know what a successful write means. - -MVP may support `best_effort`, but it must be named. In that mode, frontend -success does not wait for every replica to durably ACK. A lagging replica still -must be recovered; best-effort is not permission to ignore it. - -Future production profiles: - -- `best_effort`: primary success, recovery catches replicas up later, -- `quorum`: configured quorum must durably ACK, -- `full_ack`: every configured replica must durably ACK. - -Required work: - -- expose the configured ACK profile, -- make sync/full-ack unavailable states explicit, -- define whether writes block, fail, degrade, or become read-only when the only - secondary is recovering, -- test RF=2 and RF=3 behavior separately. - -Pass bar: - -- system never returns "full sync" success while the required replica durability - condition is unavailable. - -### 7. Observability And Diagnostics - -Goal: users diagnose state without reading internal debug logs. - -Required work: - -- add a status endpoint or CLI for frontend readiness, authority role, - replication role, durable ack frontier, recovery phase, placement reason, and - degraded reason, -- add concise structured logs for assignment, attach, recovery, and cleanup, -- keep TestOps artifact bundles stable. - -Pass bar: - -- a failed attach/recovery can be diagnosed from status output and artifact - bundle, not only source-code knowledge. - -### 8. Security And Resource Hardening - -Goal: alpha does not expose obvious denial-of-service or privilege hazards. - -Required work: - -- keep iSCSI transfer sizes bounded by negotiated limits, -- keep SCSI/NVMe bounds checks overflow-safe, -- make privileged CSI node permissions explicit and minimal, -- document required host modules and capabilities, -- add resource requests/limits for Kubernetes workloads, -- gate noisy debug logs behind an explicit flag. - -Pass bar: - -- protocol fuzz/negative tests cover oversized transfer, stale session, and - invalid LBA paths, -- manifests explain privileged requirements. - -### 9. Protocol And Backend Expansion - -Goal: expand only after the iSCSI/walstore path is stable. - -Order: - -1. Keep iSCSI as the default Kubernetes path. -2. Add protocol-neutral CSI target dispatch. -3. Add NVMe-oF connect path behind an explicit feature gate. -4. Introduce `smartwal` as a tested backend option, not a silent default - switch. - -Pass bar: - -- each new protocol/backend runs the same create/write/read/delete and restart - scenarios as the default path. - -## Suggested Milestones - -### Alpha Preview - -Status: current. - -Bar: - -- README quick start passes, -- single-node k3s dynamic PVC smoke passes, -- limitations are visible. - -### Alpha Stabilization - -Bar: - -- controller owns generated blockvolume workload cleanup, -- durable node-local state replaces default `emptyDir`, -- repeated create/delete smoke is stable, -- artifact collection is standard. - -### Beta Candidate - -Bar: - -- multi-node K8s smoke passes, -- blockvolume restart preserves data, -- failover while mounted is tested, -- recovery progress is operator-visible, -- RF/ACK profile behavior is explicitly named. - -### Production Candidate - -Bar: - -- soak and fault testing, -- security/resource hardening, -- upgrade/uninstall story, -- documented operational limits, -- release artifacts/images are reproducible. - -## What Not To Merge Into Public Docs - -Internal mini-plans remain useful for archaeology, but should not be copied into -public docs one by one. - -Keep as internal reference: - -- gate-by-gate implementation ledgers, -- old target-LSN recovery debates, -- hardware run transcripts, -- agent task ledgers, -- V2 port audit tables. - -Merge into public docs only when the content becomes one of: - -- a user-visible behavior, -- a contributor-facing architecture rule, -- a production-readiness checklist, -- a reproducible test instruction. diff --git a/seaweed-block/internal/docs/ref/stage2-transparent-multipath-host-failover-spec.md b/seaweed-block/internal/docs/ref/stage2-transparent-multipath-host-failover-spec.md index e3e12971fd..8ff2fde3e0 100644 --- a/seaweed-block/internal/docs/ref/stage2-transparent-multipath-host-failover-spec.md +++ b/seaweed-block/internal/docs/ref/stage2-transparent-multipath-host-failover-spec.md @@ -242,7 +242,7 @@ the dm-multipath device path returned by `GetMultipathDeviceByIQN`. The real Linux utility now refreshes multipath maps with bounded subprocess calls, resolves the IQN to raw `/dev/disk/by-path` devices, and matches those devices to a `/dev/mapper/` entry in `multipath -ll`. It still needs lab -validation against M02 artifact output. +validation against node-b artifact output. ### ALUA Must Be Wired To Product Facts diff --git a/seaweed-block/internal/docs/ref/testops-control-data-contract.md b/seaweed-block/internal/docs/ref/testops-control-data-contract.md index 71c54af58e..18c4cd29cb 100644 --- a/seaweed-block/internal/docs/ref/testops-control-data-contract.md +++ b/seaweed-block/internal/docs/ref/testops-control-data-contract.md @@ -5,7 +5,7 @@ not a scheduler, queue, or remote agent. ## Purpose -M01/M02 are shared test resources. Before this contract, a developer or QA +node-a/node-b are shared test resources. Before this contract, a developer or QA operator could see result bundles after a run, but could not reliably answer: - what is running now, @@ -60,8 +60,8 @@ Scenario registrations may declare: ```json { "resources": { - "group": "m02-block-lab", - "exclusive": ["node:m02", "iscsi:m02", "k3s:m02"], + "group": "node-b-block-lab", + "exclusive": ["node:node-b", "iscsi:node-b", "k3s:node-b"], "ports": [3260, 4420] } } @@ -97,7 +97,7 @@ state run_id scenario source_commit updated_at locks artifact_dir - No periodic heartbeat inside a long phase. - No per-phase progress in the product-local runner; active records show start/terminal ownership only. -- No remote agent on M01/M02. +- No remote agent on node-a/node-b. - No product cleanup or repair action. - No guarantee that external `swblock` has this exact implementation yet; this is the product-local contract to port into the standalone runner. diff --git a/seaweed-block/scripts/iterate-m01-replicated-write.sh b/seaweed-block/scripts/iterate-m01-replicated-write.sh index c437ca4f8c..25290a6098 100755 --- a/seaweed-block/scripts/iterate-m01-replicated-write.sh +++ b/seaweed-block/scripts/iterate-m01-replicated-write.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# iterate-m01-replicated-write.sh — G5-5 m01 hardware first-light orchestration +# iterate-m01-replicated-write.sh — G5-5 lab hardware first-light orchestration # # Per v3-phase-15-g5-5-mini-plan.md v0.3 §2 acceptance criteria: # #1 verify_cluster_ready — blockmaster + 2x blockvolume, role-appropriate ready @@ -10,8 +10,8 @@ # #6 verify_full_suite — go test ./... clean # # Two-node cluster: -# m01 (192.168.1.181) — primary blockvolume + iSCSI target + blockmaster -# M02 (192.168.1.184) — replica blockvolume +# node-a (its address) — primary blockvolume + iSCSI target + blockmaster +# node-b (its address) — replica blockvolume # # Run from local workstation (Windows / Git Bash); SSH drives both nodes. # Exit 0 on all-green; non-zero + diagnostic artifacts on any failure. @@ -39,14 +39,14 @@ DURABLE_BLOCKS="${DURABLE_BLOCKS:-256}" # 1 MiB at 4 KiB blocks (smal DURABLE_BLOCKSIZE="${DURABLE_BLOCKSIZE:-4096}" ARTIFACT_DIR="${ARTIFACT_DIR:-${SRC_DIR%/*}/seaweedfs/sw-block/design/g5-artifacts}" -# Network ports (m01 primary side) +# Network ports (node-a primary side) M01_MASTER_PORT=9180 M01_PRIMARY_CTRL_PORT=9210 M01_PRIMARY_DATA_PORT=9220 M01_PRIMARY_STATUS_PORT=9290 M01_ISCSI_PORT=3260 -# Network ports (M02 replica side) +# Network ports (node-b replica side) M02_REPLICA_CTRL_PORT=9211 M02_REPLICA_DATA_PORT=9221 M02_REPLICA_STATUS_PORT=9291 @@ -69,7 +69,7 @@ CATCHUP_DEADLINE=30 # MUST NOT include `-n` because `-n` redirects ssh stdin from # /dev/null, which means `bash -s` reads EOF immediately and # exits before running the heredoc body — the daemon never -# starts. QA round 53 isolated this: dbg.sh on m01 confirmed +# starts. QA round 53 isolated this: dbg.sh on node-a confirmed # `bash -s` works without `-n` and silently does nothing with # `-n`. The PTY-hang protection comes from `-T` alone, which # both option sets keep. @@ -140,11 +140,11 @@ mkdir -p "${ARTIFACT_DIR}" # Two-tier test mode (set BEFORE first SSH-or-bash command): # Tier 1 (LOCAL_MODE=1): single Linux host (e.g. WSL Ubuntu) -# - both "m01" + "M02" processes on localhost +# - both "node-a" + "node-b" processes on localhost # - no SSH overhead, no cross-node sync # - iSCSI tests skip if iscsiadm not installed # - use for fast iteration during dev -# Tier 2 (default, LOCAL_MODE=0): m01 (192.168.1.181) + M02 (192.168.1.184) +# Tier 2 (default, LOCAL_MODE=0): node-a (its address) + node-b (its address) # - real network + real iSCSI/NVMe kernel + real cross-host wire # - use for deployment-realism close evidence LOCAL_MODE="${LOCAL_MODE:-0}" @@ -171,7 +171,7 @@ HAS_ISCSI=0 if [ "${LOCAL_MODE}" = "1" ]; then if command -v iscsiadm >/dev/null 2>&1; then HAS_ISCSI=1; fi else - HAS_ISCSI=1 # assume m01/M02 have iscsiadm; verified at first iSCSI test + HAS_ISCSI=1 # assume node-a/node-b have iscsiadm; verified at first iSCSI test fi [ "${HAS_ISCSI}" = "0" ] && log " (iscsiadm not present locally → criteria #2/#3/#4 will skip with explicit message)" @@ -287,7 +287,7 @@ sync_and_build() { # If the operator has pre-built the 3 binaries (e.g. on a Windows # workstation cross-compiled GOOS=linux, or fetched from a CI # artifact), skip the source-tar + remote-build cycle entirely. - # Just scp the binaries to m01:/tmp/ and onward to M02. + # Just scp the binaries to node-a:/tmp/ and onward to node-b. if [ -n "${PREBUILT_BIN_DIR:-}" ]; then log "phase 1: use pre-built binaries from PREBUILT_BIN_DIR=${PREBUILT_BIN_DIR}" for bin in g5-blockmaster g5-blockvolume g5-m01verify; do @@ -391,7 +391,7 @@ EOF start_cluster() { log "phase 2: start cluster" # Pre-flight: drop any stale iptables rules from prior aborted runs. - # Both possible patterns (old INPUT-on-M02 and new OUTPUT-on-m01) are + # Both possible patterns (old INPUT-on-node-b and new OUTPUT-on-node-a) are # cleared so repeated test runs don't poison each other. Use `|| true` # so missing rules don't fail set -e. $SSH_M01 "sudo iptables -D OUTPUT -d ${M02_IP} -p tcp --dport ${M02_REPLICA_DATA_PORT} -j DROP 2>/dev/null || true" @@ -493,8 +493,8 @@ echo "WROTE-LBA-0-PATTERN-AB" # # 1. baseline write LBA[0]=0xab; byte-equal verify (already done in # verify_byte_equal — primary now contains LBA0=0xab) -# 2. iptables OUTPUT DROP on m01 toward M02:M02_REPLICA_DATA_PORT -# (architect ruling: m01 OUTPUT drop preferred over M02 INPUT +# 2. iptables OUTPUT DROP on node-a toward node-b:M02_REPLICA_DATA_PORT +# (architect ruling: node-a OUTPUT drop preferred over node-b INPUT # drop; least-broad rule that proves the scenario) # 3. primary write LBA[1]=0xcd (new pattern, BestEffort: primary # WAL accepts; ship to r2 fails until heal) @@ -521,7 +521,7 @@ verify_network_catchup() { } trap _verify_network_catchup_cleanup RETURN - # Step 2: iptables OUTPUT drop on m01. + # Step 2: iptables OUTPUT drop on node-a. $SSH_M01 "sudo iptables -A OUTPUT -d ${M02_IP} -p tcp --dport ${M02_REPLICA_DATA_PORT} -j DROP" \ || die "iptables -A failed" log " network partitioned (m01 OUTPUT → ${M02_IP}:${M02_REPLICA_DATA_PORT} DROP)" @@ -554,7 +554,7 @@ verify_network_catchup() { # # Pattern (architect round 13 ratification): # 1. baseline: replica running, byte-equal at LBA[0]=0xab from #2 -# 2. kill replica: pkill -TERM g5-blockvolume on M02 +# 2. kill replica: pkill -TERM g5-blockvolume on node-b # 3. primary write LBA[2]=0xef while replica is down (BestEffort: # primary's WAL accepts the write; ship attempts to r2 fail # since r2 is offline) @@ -629,7 +629,7 @@ verify_race_stress() { log " ✓ race ×10" } -# §2 #6 — full V3 suite green from m01 +# §2 #6 — full V3 suite green from node-a verify_full_suite() { if [ "${LOCAL_MODE}" = "1" ]; then local go_minor; go_minor=$(go version 2>/dev/null | grep -oP 'go1\.\K[0-9]+' || echo 0) diff --git a/seaweed-block/scripts/run-phase106-nvme-tcp-cross-node-publish-gate.sh b/seaweed-block/scripts/run-phase106-nvme-tcp-cross-node-publish-gate.sh index a18b55f666..82a6790c6b 100644 --- a/seaweed-block/scripts/run-phase106-nvme-tcp-cross-node-publish-gate.sh +++ b/seaweed-block/scripts/run-phase106-nvme-tcp-cross-node-publish-gate.sh @@ -54,9 +54,9 @@ cat >"${FAKE_BIN_DIR}/kubectl" <<'EOF' set -euo pipefail if [[ "$*" == "get nodes -o wide --no-headers" ]]; then cat <<'NODES' -m01 Ready 1d v1.34.4 192.168.1.181 Ubuntu 24.04 kernel containerd -m02 Ready 1d v1.34.4 192.168.1.184 Ubuntu 24.04 kernel containerd -tp01 Ready 1d v1.34.4 192.168.1.188 Ubuntu 24.04 kernel containerd +node-a Ready 1d v1.34.4 192.168.1.181 Ubuntu 24.04 kernel containerd +node-b Ready 1d v1.34.4 192.168.1.184 Ubuntu 24.04 kernel containerd +node-c Ready 1d v1.34.4 192.168.1.188 Ubuntu 24.04 kernel containerd NODES exit 0 fi diff --git a/seaweed-block/scripts/run-phase121-data-plane-address-capability-gate.sh b/seaweed-block/scripts/run-phase121-data-plane-address-capability-gate.sh index 2d64af9f65..2c131188ed 100644 --- a/seaweed-block/scripts/run-phase121-data-plane-address-capability-gate.sh +++ b/seaweed-block/scripts/run-phase121-data-plane-address-capability-gate.sh @@ -42,9 +42,9 @@ cat >"${ARTIFACT_DIR}/bin/kubectl" <<'SH' set -euo pipefail if [[ "$*" == "get nodes -o wide --no-headers" ]]; then cat <<'EOF' -m01 Ready worker 10d v1.34.4+k3s1 192.168.1.181 Ubuntu 6.8.0 containerd://2.0.0 -m02 Ready worker 10d v1.34.4+k3s1 192.168.1.184 Ubuntu 6.8.0 containerd://2.0.0 -tp01 Ready worker 10d v1.34.4+k3s1 192.168.1.188 Ubuntu 6.8.0 containerd://2.0.0 +node-a Ready worker 10d v1.34.4+k3s1 192.168.1.181 Ubuntu 6.8.0 containerd://2.0.0 +node-b Ready worker 10d v1.34.4+k3s1 192.168.1.184 Ubuntu 6.8.0 containerd://2.0.0 +node-c Ready worker 10d v1.34.4+k3s1 192.168.1.188 Ubuntu 6.8.0 containerd://2.0.0 EOF exit 0 fi @@ -57,13 +57,13 @@ PATH="${ARTIFACT_DIR}/bin:${PATH}" "${ARTIFACT_DIR}/bin/sw-block" ops generate-h --out "${ARTIFACT_DIR}/values/values.phase121.yaml" \ --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 \ >"${ARTIFACT_DIR}/values/generate.stdout.txt" \ 2>"${ARTIFACT_DIR}/values/generate.stderr.txt" grep -q '^network_mode=external-nvme$' "${ARTIFACT_DIR}/values/generate.stdout.txt" -grep -q '^frontend_ip_map=m01=10.0.0.181,m02=10.0.0.184,tp01=10.0.0.188$' "${ARTIFACT_DIR}/values/generate.stdout.txt" +grep -q '^frontend_ip_map=node-a=10.0.0.181,node-b=10.0.0.184,node-c=10.0.0.188$' "${ARTIFACT_DIR}/values/generate.stdout.txt" grep -q '^frontend_network_class=100gbe_tcp$' "${ARTIFACT_DIR}/values/generate.stdout.txt" grep -q 'internalIP: 192.168.1.181' "${ARTIFACT_DIR}/values/values.phase121.yaml" diff --git a/seaweed-block/testops/scenarios/helm-multi-volume-rf3-app-spread-failover-chain.yaml b/seaweed-block/testops/scenarios/helm-multi-volume-rf3-app-spread-failover-chain.yaml index 155421efe9..607461c51f 100644 --- a/seaweed-block/testops/scenarios/helm-multi-volume-rf3-app-spread-failover-chain.yaml +++ b/seaweed-block/testops/scenarios/helm-multi-volume-rf3-app-spread-failover-chain.yaml @@ -1,7 +1,7 @@ # Phase 27 D8: multi-volume RF=3 mounted failover with app pods spread across nodes. # # Pass = three RF=3 PVCs are mounted by long-running writer pods distributed -# across m01/m02/tp01, each target volume's current primary is stopped in turn, +# across node-a/node-b/node-c, each target volume's current primary is stopped in turn, # the same writer pod UID verifies old data and writes new data through # dm-multipath, and cleanup is clean.