Skip to content

docs(adr): ADR-0030 — shipped systemd units never use RequiredBy= enablement - #67

Merged
bketelsen merged 1 commit into
mainfrom
adr/0030-no-requiredby-enablement
Aug 13, 2026
Merged

docs(adr): ADR-0030 — shipped systemd units never use RequiredBy= enablement#67
bketelsen merged 1 commit into
mainfrom
adr/0030-no-requiredby-enablement

Conversation

@bketelsen

@bketelsen bketelsen commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Records the org-wide policy arising from the 2026-08-12 snosi boot-brick incident: first-boot presets persist [Install] enablement into each machine's /etc, where it outlives the image that created it. A persisted .wants link dangles harmlessly when its unit is later retired; a persisted .requires link (from RequiredBy=) becomes a Requires= on a unit that fails to load and invalidates PID 1's very first transaction — "Failed to isolate default target" before any service runs, so no runtime migration can ever fire. snosi image 20260812205454 failed all counted boots on every install first-booted before the retirement of snow-linux-live-setup.service, while fresh installs (and therefore all CI) passed.

Decision: WantedBy= is the only [Install] enablement in Frostyard-shipped units. Hard dependencies are declared from the dependent unit's [Unit] section or via static wants in /usr — mechanisms that update atomically with the image. Shipping repos enforce this in CI, and image boot paths that can do so prune stale .requires links defensively, since distro packages may still ship RequiredBy=.

Implementation + repo-local ADR: frostyard/snosi#710 (ADR-0013, check-required-by-guard.sh, initrd etc-overlay-prune.sh).

🤖 Generated with Claude Code

…blement

First-boot presets persist [Install] enablement into each machine's /etc,
where it outlives the image that created it. A persisted .wants link
dangles harmlessly when its unit is later retired; a persisted .requires
link (from RequiredBy=) becomes a Requires= on a unit that fails to load
and invalidates PID 1's very first transaction — the machine dies at
"Failed to isolate default target" before any service runs, so no runtime
migration can ever fire. This bricked updates on real hardware 2026-08-12
(snosi e08311f retired snow-linux-live-setup.service; image
20260812205454 failed all counted boots on every install first-booted
before the retirement, while fresh installs and therefore all CI passed).

Decision: WantedBy= is the only [Install] enablement in Frostyard-shipped
units; hard dependencies are declared from the dependent unit's [Unit]
section or via static wants in /usr. Repos shipping unit payloads enforce
this in CI (snosi ADR-0013: check-required-by-guard.sh), and image boot
paths that can do so prune stale .requires links defensively (snosi's
native A/B initrd), since distro packages may still ship RequiredBy=.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@bketelsen
bketelsen merged commit 1008edb into main Aug 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant