Skip to main content

Module upgrade

Module upgrade 

Source
Expand description

quiesce_srv: the launcher’s one way of stopping srv, used on every quit by both supervisors and on “Upgrade & restart”. It returns only once the OS has genuinely reaped the process (Child::wait()’s own contract), never after a fixed sleep: data must never change while a srv may still hold it (341faa981’s data-loss incident).

This module began as phase 1 of docs/specs/SPEC_FAST_STARTUP_UPGRADE_OWNS_MIGRATIONS_AND_UPDATES_2026_09_15.md, with a “quiesce srv, migrate, come back” path for an upgrade action. That path became the launcher’s prepare step instead (§10): srv refuses data that needs preparing and exits, and srv_spawner::spawn_srv runs agentmux-srv migrate --prepare before starting it again.

Enums§

QuiesceOutcome
How quiesce_srv actually stopped the process — logged, and useful in tests, but callers don’t need to branch on it: either variant means the same thing (the process is genuinely gone).

Constants§

GRACEFUL_QUIESCE_TIMEOUT
How long quiesce_srv waits for srv to exit on its own before escalating to a hard kill: long enough for srv to close every agent (agent_teardown::app_exit, capped at SRV_APP_EXIT_CAP).

Functions§

quiesce_srv
Stop srv and return only once it has genuinely exited — never a fixed sleep. The launcher’s one way of stopping srv: on every quit (both supervisors) and on “Upgrade & restart”.