boot: keep the boot unit active so a dockerd restart re-runs just up #408

Merged
mysticalsoap merged 1 commit from boot/restart-propagation into trunk 2026-10-08 14:11:05 -04:00
Owner

Problem

After #407, systemctl restart docker ran just stop and then nothing: the stacks stayed down until a manual just up. PartOf=docker.service propagates a restart as a try-restart, which skips an inactive unit, and the boot unit is a oneshot that had finished at 11:48. The stop unit, active through RemainAfterExit, did restart.

Fix

RemainAfterExit=yes on the boot unit so it stays active and restartable. systemd refuses that together with Restart=, so the three-attempt retry moves into _helper/boot/up.sh (600s per attempt, 60s between). Doc line on the Home-Server page updated.

Verification

Live, 2026-10-08:

  • Journal of the 13:33 restart: just stop ran in reverse stack order, dockerd replayed nothing at start, the boot unit's last start stayed 11:48, the stop unit restarted. That is the gap this fixes.
  • systemd-analyze verify on the unit: clean.
  • _helper/boot/up.sh against the running stack: all stacks reported Running/Healthy in 16s, exit 0.
  • Pending on the host after merge: sudo systemctl daemon-reload, then a systemctl restart docker should end with every stack up without a manual just up.

🤖 Generated with Claude Code

## Problem After #407, `systemctl restart docker` ran `just stop` and then nothing: the stacks stayed down until a manual `just up`. `PartOf=docker.service` propagates a restart as a try-restart, which skips an inactive unit, and the boot unit is a oneshot that had finished at 11:48. The stop unit, active through `RemainAfterExit`, did restart. ## Fix `RemainAfterExit=yes` on the boot unit so it stays active and restartable. systemd refuses that together with `Restart=`, so the three-attempt retry moves into `_helper/boot/up.sh` (600s per attempt, 60s between). Doc line on the Home-Server page updated. ## Verification Live, 2026-10-08: - Journal of the 13:33 restart: `just stop` ran in reverse stack order, dockerd replayed nothing at start, the boot unit's last start stayed 11:48, the stop unit restarted. That is the gap this fixes. - `systemd-analyze verify` on the unit: clean. - `_helper/boot/up.sh` against the running stack: all stacks reported Running/Healthy in 16s, exit 0. - Pending on the host after merge: `sudo systemctl daemon-reload`, then a `systemctl restart docker` should end with every stack up without a manual `just up`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
boot: keep the boot unit active so a dockerd restart re-runs just up
All checks were successful
validate / validate (pull_request) Successful in 18s
f92fd6f941
PartOf=docker.service propagates a restart as a try-restart, which
skips an inactive unit. The boot unit is a oneshot that finishes, so
the first systemctl restart docker after #407 ran just stop and then
nothing: the stacks stayed down until a manual just up.

RemainAfterExit keeps the unit active and restartable, and systemd
refuses it together with Restart=, so the three-attempt retry moves
into _helper/boot/up.sh.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
mysticalsoap deleted branch boot/restart-propagation 2026-10-08 14:11:05 -04:00
Sign in to join this conversation.
No description provided.