mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-11 14:00:29 +00:00
d7d6753d05
The Unraid install path killed the running agent but never the wrapper supervising it, then appended a second wrapper at the end of the install. The survivor and the newcomer both loop trying to own the same agent id, and because the old wrapper is a watchdog it respawns the agent mid-install with the previous binary and arguments. Observed on a live Unraid host: a supervisor from a July install was still running beside the one the reinstall had just started. Nothing reports this as a failure. It presents later as an agent that restarts on its own or reverts to superseded arguments. Stop the wrapper first, then the agent: killing a supervised agent while its wrapper still loops only races the respawn. The pattern matches the trailing path segment so a wrapper left at an older storage location is caught too, with the dot escaped and the far end bounded so a co-installed agent's supervisor (start-pulse-agent-prod.sh) is not. The QNAP branch already stopped its wrapper, which is what made the Unraid omission visible; the contracts now require every wrapper-writing branch to own the same teardown. Guarded by two tests: one pins that the Unraid branch stops the wrapper and does so before the agent, the other pins that the wrapper pattern spares a sibling supervisor, with a premise check that the loose pattern really does match so neither assertion can pass vacuously.