Reconcile Pi providers on first boot, where no login session exists #50
Labels
No labels
blocked
bug
decision
duplicate
enhancement
help wanted
invalid
landed?
question
ready-to-merge
stale
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/archetypes#50
Loading…
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?
A freshly provisioned dev VM configures Pi on its first boot, with nobody logged in.
Primary goals:
Current state and specifics
modules/pi-provider-reconcile.sh:45resolves its staging directory as${XDG_RUNTIME_DIR:-/run/user/$(id -u)}and exits 1 when that path is not a directory:The generated
home-manager-<user>.serviceisWantedBy=multi-user.target, runs as the account withUser=, and is orderedBefore=systemd-user-sessions.service. It therefore has no PAM session, and/run/user/<uid>— which systemd-logind creates for a session — does not exist yet. Every first boot logs the refusal above followed by the module's ownPi provider configuration was not reconciled; see ERROR above, then rebuild.and leavesauth.jsonandmodels.jsonuntouched.Nothing else on the path is at fault. The Age credential is already deployed and owned by the account when activation runs, and the joined provider catalog and credential map are correct in the generated store paths. Running the same reconciler by hand against the same inputs, differing only in that a login session exists, configures both providers.
The condition is invisible to the existing check because
checks/pi-provider-lifecycle.nix:151exportsXDG_RUNTIME_DIRbefore every fixture, so no fixture ever runs without one.Scope
In: the staging-directory selection in
modules/pi-provider-reconcile.sh, a boot-path fixture inchecks/pi-provider-lifecycle.nix, and the README paragraph stating when reconciliation runs.Out: credential delivery, the ownership manifest format, and the locking protocol — all measured correct here. The refusal when no tmpfs exists at all stays a loud failure with no fixture: pinning it would need an override that lets a caller aim staging elsewhere, which is exactly the bypass this script should not ship.