Root-caused from a production outage: a manual default-mode torque:reload
against a supervised master spawned a detached takeover master that escaped
supervision. The supervisor's respawns then collided with it (already
running) until startretries exhausted and the program went FATAL, so when
the stray master was later drained by a deploy, nothing respawned and the
queue was dead.
Three changes close that loop:
- torque:start --replace: absorb a live master via the existing takeover
handshake WITHOUT the setsid detach, staying the supervisor's child, so a
supervisor respawn converges on exactly one supervised master instead of
fail-fasting to FATAL. Stale PID files fall through to a normal start.
torque:supervisor now generates the program command with --replace and
startretries=10.
- torque:reload default mode now refuses a supervised master (parent PID
!= 1) instead of only warning, pointing at --drain; --force keeps the
deliberate escape hatch.
- torque:reload --if-running: exit 0 when no live master is found (missing
or stale PID file), so deploy scripts can drop their own PID-file guards
without a stale file failing the deploy.