pingqiu 715ed15abf G5-5 script: bind+advertise routable IP, not 0.0.0.0 (cross-host fix)
QA round 54: cluster came up, iSCSI session established, but
fsync (SYNCHRONIZE CACHE) returned I/O error. Root cause: replica
bound --data-addr 0.0.0.0:9221 AND advertised that string to master
heartbeat. Master minted AssignmentFact.peers[*].DataAddr=0.0.0.0:9221.
Primary's BlockExecutor tried to dial 0.0.0.0:9221 — unroutable
destination — connection failed. Replication fan-out + Sync barriers
silently failed (best-effort log line; the fsync gets I/O error).

The daemon advertises the literal --data-addr string verbatim:
  cmd/blockvolume/main.go:230 → cfg.DataAddr = f.dataAddr
  → host heartbeats DataAddr to master
  → master.collectPeers copies it into AssignmentFact.peers
  → primary dials peers[*].DataAddr

So for cross-host the bind addr MUST be a routable IP, not 0.0.0.0.
On Linux, binding to a specific local-interface IP works fine and
ensures the literal advertised string is routable.

Fix: extract M01_IP / M02_IP from M01_HOST / M02_HOST and use as
both bind and advertise:
  Tier 2: M01_PRIMARY_BIND_IP=${M01_IP}, M02_REPLICA_BIND_IP=${M02_IP}
  Tier 1: M01_PRIMARY_BIND_IP=127.0.0.1, M02_REPLICA_BIND_IP=127.0.0.1

start_primary / start_replica now use the IP variables for both
--ctrl-addr and --data-addr. Master's --listen stays 0.0.0.0 (it's
the destination of heartbeats, not advertised).

This is a script-side fix only; daemon code unchanged. Refs QA
round 54.
2026-04-26 23:56:14 -07:00
Languages
Go 84.8%
Rust 7.6%
Shell 2.7%
templ 1.5%
Java 0.9%
Other 2.3%