deckle-hosted editor instances live and die with the control plane (unit comments, ADR-0032 consequence) #470
Labels
No labels
bug
enhancement
in-progress
needs-info
needs-triage
p0
ready-for-agent
ready-for-human
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/nixos#470
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Cloonar/deckle-hosted#123 changes the editor-instance lifecycle: the control
plane stops every editor instance on SIGTERM and removes leftovers at startup.
Restart survival of instances is dropped. The unit in
hosts/deckle-01/modules/deckle-hosted/default.nixneeds no functionalchange, but its comments describe a different world, and ADR-0032 should
record the decision.
What was observed on deckle-01 on 2026-10-14
libpod-<id>.scopeunder
user@1500.service; only conmon and the control plane'spodman waitwatchers sit in/system.slice/deckle-hosted.service.No
libpod-conmon-*.scopeexists. The module comment "podman ... drives itscontainers through the user's systemd instance" is half true: the
container, yes; conmon, no.
systemctl stop deckle-hostedthe unit's SIGTERM reaches conmon, whichforwards it to the container. The harness exits within ~30 ms and conmon
then runs the
--rmcleanup. When the control plane's main process exits,systemd's final-SIGTERM phase signals the remaining cgroup again; if that
hits the cleanup child first, the container stays in storage as exited.
Happened at 18:33:34 (site suneko), did not happen at 13:12:25. Every later
cold start of the site failed on the container name until
podman rm deckle-instance-sunekowas run asdeckle.Delegate = truecomment says the limits need a cgroup subtree theuser may write. The instance limits are in fact applied on scopes of the
user manager; whether
podman buildneeds Delegate is unverified. Leavethe setting, fix the comment or mark it unverified.
Desired changes
SIGTERM within a bound well under
TimeoutStopSec(default 90 s; themanager's bound is a code constant in deckle-hosted, see #123), that
KillMode=control-groupis the backstop for anything left, and that adeploy therefore interrupts open editors for a few seconds (they restart
on the next request).
TimeoutStopSecexplicitly with that comment, orrely on the default.
deckle-hosted editor instances live and die with the control plane and
why: survival never held under the system unit, every deploy so far
changed the harness hash, which makes the control plane stop old
instances anyway, and keeping conmon out of the unit's cgroup
(
systemd-run --user --scope) would add a second lifecycle authority fora benefit only a control-plane-only restart shows.
libpod-conmon-<id>.scopehere; not needed for the decision above.Verification
After deckle-hosted#123 is deployed: restart the unit while an editor is
open; the journal shows the control plane stopping the instance before
"shutdown complete", and
podman ps -a --filter label=deckle-hosted.role=instanceasdeckleis empty.Out of scope
Any change to the deckle-hosted code (#123, #124 there).