Commit Graph
2 Commits
Author SHA1 Message Date
shadowdaoandClaude Opus 5.5 4ced47941d review fixes: relaunch test without pgrep, clear stale marker at start, VERSION 2026.11.10
- test-haproxy-supervisor-relaunch.py used `pgrep -P`, which the image does not
  ship (no procps): the image build failed with FileNotFoundError in 3 of the 4
  real-haproxy tests. Children are now read from /proc.
- haproxy-supervisor.sh: clear /tmp/haproxy-restarting at start-up. A
  supervisor SIGKILLed mid-recovery (docker restart) runs no EXIT trap and
  /tmp survives a restart, so the marker would otherwise go stale.
- VERSION 2026.11.10: merging to main publishes :<VERSION>; 2026.11.9 is
  already published and must not be overwritten with different content.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
2026-11-25 18:10:03 -08:00
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