mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-15 17:11:30 +00:00
c6bc2b4d29
The watchdog's is-active guard cannot fire against spinifex-nats.service (Type=simple reports active the instant the process forks, long before JetStream replays its state), so it restarted a NATS that was still recovering. Separately, any non-zero exit from spx js-probe was read as a JetStream write failure, so a broken spx binary read as a cluster-wide outage instead of an unrunnable tool. Replaces the is-active guard with an age gate on ExecMainStartTimestampMonotonic, adds a post-restart cooldown and a restart-count escalation that gives up rather than looping, and teaches the watchdog to treat js-probe exit 2 (and any exit code that isn't 0 or 1) as inconclusive rather than as proof of failure. Bounds the unit's own start with TimeoutStartSec=120, matching the existing TimeoutStopSec derivation.