The updater recreates the app in a scope of its own, so it starts once #222
No reviewers
Labels
No labels
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Grandiras/Ponente!222
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-updater-conmon-scope"
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?
Every image refresh started the app twice and left it unmonitored. The same happens on dev after each merge, and on production after each release.
What happens (dev, the 22:54 UTC refresh on 2026-09-22)
ponente-update@ponente-dev(a oneshot unit) recreates the app. Podman forks the new container's conmon from the caller, so conmon lands in the updater unit's cgroup.diedwith nostoporkill, and the restart policy starts it again (restart count 1).Failed with result 'timeout'). The app keeps running unmonitored, with no restart on a crash and no exit code. The next recreate then reportsconmon exited prematurely… conmon process killed.Production follows the same updater. Its last update came through
deploy.sh, so the next release would be the first timer-driven one, and would do all of the above.Fix
update.shrunspodman-composeundersystemd-run --user --scope, so conmon lives in a transient scope of its own, outside the updater unit, and a finished run has nothing left to kill.--collecttidies the scope away when its container goes. (podman.serviceavoids the same trap withKillMode=process. That would keep conmon inside the unit and log a leftover-process warning every minute.)Probed on the server first: from a user service, a process detached inside such a scope outlives the service, in its own
run-*.scope.bash -npasses.deploy/README.mddocuments the symptom next to the updater's troubleshooting commands.Deploying it
update.shreaches the server only throughdeploy.sh, which re-syncs it. So after merging:./deploy/deploy.sh --env devand./deploy/deploy.sh, before tagging v2.7.0, so the release is the first one deployed by the fixed updater.🤖 Generated with Claude Code
⏳ Held on the OpenCode Go window — the 5-hour window is at 100% (the bot holds at 95%).
This continues automatically after the window resets (2026-09-23T01:12:57.059Z) — nothing to re-trigger.
@claude-reviewer
🤖 Reviewing this PR — follow along in the action run; the reply will link the full session transcript.
📜 Live transcript — updating every ~5 minutes while the task runs.
✅ Verdict: approve — no blocking issues found.
Correct, well-scoped fix. Wrapping the
podman-compose upcall insystemd-run --user --scope --quiet --collect --moves conmon (and the container it monitors) into a transient scope outside the oneshot updater unit's cgroup, so systemd's cleanup of the finished unit no longer tears down the freshly recreated, healthy container. This matches a known and documented podman/systemd interaction (conmon inheriting the caller's cgroup unless explicitly isolated — see containers/podman issue tracking this exact class of bug), and--collectcorrectly lets the scope go away once conmon (and thus the container) exits, so nothing leaks across future recreates.systemd-run --scope(without--no-block) blocks and forwards the wrapped command's exit status, so the script'sset -euo pipefailand later health-check logic are unaffected by the change. The README addition accurately describes the failure signature (graceful shutdown ~10s in, restart count 1, timeout+SIGABRT,conmon exited prematurelyon the next recreate) for anyone diagnosing this later. No correctness or security issues found.⏱ 1m 1s · 10 turns · tokens: 21.1k in / 4.3k out (+386.2k cache-read)
📜 Full session transcript