CB-185: fix two blockers to switching on memberHerdrSocket #196
Reference in New Issue
Block a user
Delete Branch "worker/cb-185-blockers-027756-4"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #185.
Two blockers that must land before memberHerdrSocket can ever be switched on safely:
CompositePeerLauncher.stop() un-stoppable after a restart — spawnedBy is in-memory only, so a daemon restart empties it, and every member on a second daemon that survives the restart could never be stopped (fleet_stop refused it forever). Fixed with a probe-on-cache-miss: ask each distinct configured herdr daemon's agent.list() who owns the pane. Exactly one owner routes and caches; zero owners is treated as already-stopped (a no-op success, matching the tolerance HerdrPeerLauncher already gives an already-gone pane); more than one owner is the genuine per-daemon pane-id ambiguity and still refuses with the existing message.
/healthz reported only the lead daemon's protocol — with memberHerdrSocket configured, a member-daemon protocol mismatch was invisible behind a green /healthz while every spawn silently failed. Added a separate "member" key (version/protocol) alongside the unchanged "herdr" key, plus a "protocolMismatch": true flag when they differ. Verified scripts/redeploy-fleetd.sh and scripts/rename-checkout.sh only check the HTTP status code and print the body verbatim — neither parses a specific field — so adding a key alongside herdr is safe.
Testing: every new test was written to fail without its fix (verified by stashing each fix, watching the new tests fail with the expected error, then restoring). Full
mvn clean install: 1018 tests, 0 failures, 0 errors, BUILD SUCCESS.Did not set memberHerdrSocket, touch fleetd.yaml, or redeploy the daemon, per the ticket.