Repository navigation
feat: opt-in RESTART_POLICY for boot persistence - #2
sethforprivacy wants to merge 1 commit into
Conversation
The serving containers currently run with docker's default restart policy (no), so a host reboot silently takes the deployment down until someone reruns ./start.sh. RESTART_POLICY=unless-stopped brings both containers back after a clean reboot of the pair, and the TP rendezvous re-forms. Default stays 'no' (exact current behavior). The docs are explicit about the single-side-crash caveat: a restarted rank re-enters rendezvous against a peer that never died, which may not recover -- ./start.sh (idempotent) remains the coherent-relaunch path for that case.
80c9e4f to
95bd625
Compare
|
Walking this back somewhat — we've since run into evidence that cuts against my own proposal here, and it would be wrong to let it merge without saying so. The short version: on a 2-node TP pair, a Docker restart policy on the ranks doesn't restore the service, it creates a wedged pair. What happened to us: a head node needed a power cycle. Its container carried The reason it can't work is structural: dockerd cannot order two nodes. Worker-first is only expressible from the head, in Two related things I'd flag:
Where that leaves this PR, your call:
We went with the second shape locally: a host unit that owns lifecycle and explicitly clears the policy off both ranks, so ordering is always enforced from the head. That's site-specific enough that I'm not proposing it upstream — but it's why I no longer think an opt-in Happy to convert this into a docs-only note if that's more useful than the flag. |
|
Closing this — I argued myself out of it above. On a 2-node TP pair a per-container restart policy doesn't restore the service, it creates a wedged pair: dockerd cannot order two nodes, so rank 0 and rank 1 come back independently with no barrier, and rank 0 then sits in rendezvous against a stale peer. We hit exactly that after a power cycle. And The half-assembled-pair detection that made our recovery confusing is the part worth having, and that's #17. We solved boot persistence locally with a host unit that owns lifecycle and explicitly clears the policy off both ranks, so worker-first ordering is always enforced from the head. That's site-specific enough that I'm not proposing it here. |
…M tok, eval 85/100 (TASK-73.02)
Companion QoL to the API_KEY PR, from the same production deploy:
The serving containers run with docker's default restart policy, so a host reboot silently takes the deployment down until someone reruns
./start.sh. For a recipe that positions itself as production ("a single-file, production recipe"), surviving reboots seems worth offering.RESTART_POLICY=env (defaultno= exact current behavior)unless-stoppedbrings both containers back after a clean reboot of the pair, and the TP rendezvous re-forms./start.sh(idempotent) remains the coherent-relaunch path for that case, which is also why this stays opt-in rather than defaultHappy to fold both PRs into one if you prefer fewer merges.