From 6f24d3bfbeb84f29ff0921f50d12afdf1615166c Mon Sep 17 00:00:00 2001 From: pingqiu Date: Tue, 24 Nov 2026 13:24:47 -0800 Subject: [PATCH] test: pass --insecure-external-bind when the harness listens off loopback blockmaster refuses a non-loopback --listen without it; a two-host run (SWBLOCK_TEST_LISTEN_HOST set) now passes it. Loopback runs are unchanged. Co-Authored-By: Claude Fable 5.1 --- .../cmd/blockvolume/head_size_integration_test.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/seaweed-block/cmd/blockvolume/head_size_integration_test.go b/seaweed-block/cmd/blockvolume/head_size_integration_test.go index 653e16e0c3..a79cb99845 100644 --- a/seaweed-block/cmd/blockvolume/head_size_integration_test.go +++ b/seaweed-block/cmd/blockvolume/head_size_integration_test.go @@ -232,9 +232,14 @@ func headSzStartCluster(t *testing.T, prefix string, vols []headSzVol) (*handoff t.Fatal(err) } mstate := filepath.Join(h.dir, "master") - master := h.start(t, "blockmaster", h.master, "--authority-store", filepath.Join(mstate, "authority"), "--lifecycle-store", filepath.Join(mstate, "lifecycle"), + margs := []string{"--authority-store", filepath.Join(mstate, "authority"), "--lifecycle-store", filepath.Join(mstate, "lifecycle"), "--cluster-spec", specPath, "--expected-slots-per-volume", "1", "--listen", h.masterAddr, - "--workspace-rpc", "--workspace-head-base-url", "http://"+env.cluster.filerHTTP+env.chunkPath) + "--workspace-rpc", "--workspace-head-base-url", "http://" + env.cluster.filerHTTP + env.chunkPath} + if testListenHost() != "127.0.0.1" { + // a lab run spanning two hosts: blockmaster refuses a non-loopback listen without this + margs = append(margs, "--insecure-external-bind") + } + master := h.start(t, "blockmaster", h.master, margs...) master.waitLog(t, 30*time.Second, "blockmaster: lock acquired, reloaded=") return env, clusterDir }