broker: installer health probe speaks PROXY v2; rollback uses install, not cp (GOTCHAS #419) #2197

Merged
ben merged 1 commit from fix/broker-install-proxy-probe into main 2026-11-17 19:50:24 +00:00
Owner

Every broker deploy since #2010 has gone red while the broker was healthy.

Cause. The droplet runs BROKER_PROXY_PROTOCOL=1, so 127.0.0.1:8090 drops any connection without a PROXY v2 header. The installer's health probe was a plain curl, which got "reset by peer" for the old binary and the new one. The rollback then failed: cp can't overwrite a running binary ("Text file busy"). Today's run (actions/runs/66486, cd47d343) shows all of this.

Change (scripts/broker/idss-broker-install.sh)

  • broker_live tries a plain request first, then probe_proxy_v2, which writes the 16-byte v2 LOCAL header (proxyproto.HeaderV2Local) by hand before a GET. curl --haproxy-protocol sends only v1, which the broker refuses.
  • The rollback uses install instead of cp, the same way the forward swap already works.

Tests

  • broker-install-test.sh has a new case 14: a real listener that answers only a v2 LOCAL header. It failed before the change, and all 14 cases pass now.
  • Checked by hand against the real broker/internal/proxyproto listener: plain curl gets nothing back (000), and the v2 probe reads it as live.

Still owed after merge. Someone with a shell on the droplet must put this commit's installer at /usr/local/sbin/idss-broker-install (GOTCHAS #99). Until then, the drift check refuses every deploy newer than cd47d343. While there, journalctl -u ourcloud-broker | grep 'broker booted' should name cd47d343; if it does, #2066 can close.

GOTCHAS #419 · STATUS entry.

🤖 Generated with Claude Code

Every broker deploy since #2010 has gone red while the broker was healthy. **Cause.** The droplet runs `BROKER_PROXY_PROTOCOL=1`, so 127.0.0.1:8090 drops any connection without a PROXY v2 header. The installer's health probe was a plain `curl`, which got "reset by peer" for the old binary and the new one. The rollback then failed: `cp` can't overwrite a running binary ("Text file busy"). Today's run (actions/runs/66486, cd47d343) shows all of this. **Change** (`scripts/broker/idss-broker-install.sh`) - `broker_live` tries a plain request first, then `probe_proxy_v2`, which writes the 16-byte v2 LOCAL header (`proxyproto.HeaderV2Local`) by hand before a GET. `curl --haproxy-protocol` sends only v1, which the broker refuses. - The rollback uses `install` instead of `cp`, the same way the forward swap already works. **Tests** - `broker-install-test.sh` has a new case 14: a real listener that answers only a v2 LOCAL header. It failed before the change, and all 14 cases pass now. - Checked by hand against the real `broker/internal/proxyproto` listener: plain curl gets nothing back (000), and the v2 probe reads it as live. **Still owed after merge.** Someone with a shell on the droplet must put this commit's installer at `/usr/local/sbin/idss-broker-install` (GOTCHAS #99). Until then, the drift check refuses every deploy newer than cd47d343. While there, `journalctl -u ourcloud-broker | grep 'broker booted'` should name cd47d343; if it does, #2066 can close. GOTCHAS #419 · STATUS entry. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
broker: the installer probes a PROXY-protocol broker with a v2 LOCAL header and rolls back with install, not cp (GOTCHAS #419)
All checks were successful
ci / seam (pull_request) Successful in 18m2s
ci / publish-broker (pull_request) Has been skipped
ci / publish (pull_request) Has been skipped
ci / deploy-broker (pull_request) Has been skipped
831eafcc3d
Every deploy since #2010 read the healthy, proxied broker as dead: the plain
curl to 127.0.0.1:8090 is reset by the BROKER_PROXY_PROTOCOL=1 listener. The
rollback then died on cp 'Text file busy', leaving the new binary running.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ben merged commit f0741e82ea into main 2026-11-17 19:50:24 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss!2197
No description provided.