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