Commit Graph
2 Commits
Author SHA1 Message Date
shadowdaoandClaude Sonnet 5.5 6df8d4b332 fix(supervisor): relaunch haproxy directly from bash in ~1 s; restart marker for the host watchdog
whp02 2026-11-26: after a worker abort the supervisor took 16 s just to log
'haproxy process not found' (ensure_haproxy.py imports the whole manager,
slow on a swapping host), and the WHP watchdog docker-restarted on top.

- When haproxy is gone, validate the on-disk config (haproxy -c) and start
  haproxy -W -db -S ... exactly like spawn_haproxy_master(), detached to PID 1,
  waiting for 'Loading success.'; fall back to ensure_haproxy.py only if the
  config is missing/invalid or the launch fails. pidof re-checked right before
  launch (never a second master).
- Poll interval default 1 s (was 2 s). Each step logged with a UTC ms timestamp.
- /tmp/haproxy-restarting ('<epoch> <pid>') exists while a recovery runs
  (HAPROXY_SUPERVISOR_MARKER) so the host watchdog can back off.
- Tests: stubbed fast/fallback/idempotency cases in test-haproxy-supervisor.py;
  new test-haproxy-supervisor-relaunch.py with a real haproxy (SIGABRT the
  worker, relaunch < 3 s, measured 0.77 s idle). Both run in the image build.
No VERSION bump.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
2026-11-25 17:56:28 -08:00
claudeandClaude Sonnet 5.5 ea2d4994f1 fix(image): exact haproxy pin + relay tenant-alert class + supervisor backoff + rc publishing
I1: ARG HAPROXY_EXACT=3.2.26-1~bpo13+1 is the apt pin; build fails unless dpkg-query equals it exactly (fail closed when the repo is unreachable); comment corrected.
I2: relay no longer exempts every [ALERT]; tenant-driven 'has no server available' / 'Server ... is DOWN|UP' are their own rate-limited stdout class; dump blocks have their own budget.
Minor: keyring must hold exactly one pub key (gnupg purged), stderr log + rotated copies 0640, supervisor extracted to scripts/haproxy-supervisor.sh (integer-validated knobs, crash-loop backoff 2/5/10/30, reset after 60s).
C1: release/* branches and rc-* tags publish only :<VERSION>-rc and :<sha>, never :latest; main unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
2026-11-16 17:33:27 -08:00