hyperhive/hive-c0re
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas f56b5c5a7b fix(#991): start nginx when unit is in failed state, not just reload
nginx -s reload signals a running master process. When nginx enters
failed state (start-limit-hit from repeated nginx -t failures on a
bad agents.conf), there is no master and the reload is a silent no-op.
c0re kept re-firing the same no-op reload forever via RELOAD_PENDING.

Fix: probe the nginx unit's ActiveState before sending the reload:
- active    → nginx -s reload (existing zero-downtime path)
- failed    → systemctl reset-failed nginx + systemctl start nginx
- other     → systemctl start nginx

This makes c0re self-healing: once a corrected agents.conf is published,
the next reload_gateway_nginx call clears the start-limit and restarts
nginx automatically without operator intervention.

New helpers: nginx_active_state() (systemctl show --property=ActiveState
--value) and gateway_systemctl() (host-side systemctl --machine=hive-gateway).
2026-06-01 19:31:30 +02:00
..
src fix(#991): start nginx when unit is in failed state, not just reload 2026-06-01 19:31:30 +02:00
Cargo.toml feat: socket-activate the hive-c0re admin socket 2026-06-01 16:29:41 +02:00