web-arm: onecli-db-password oneshot cannot read its sops secret #340
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#340
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?
First activation of the merged #339 on web-arm failed:
The oneshot runs as User=postgres, but sops-nix installs the secret root-owned 0400. Fix: hand the secret over via systemd LoadCredential (the keycloak module's pattern) instead of reading the sops path directly.
While in there, also order the oneshot after postgresql-setup.service explicitly: ordering on postgresql.target protects a cold boot, but on a live switch the target is already active, so the oneshot can race the role creation that postgresql-setup performs (PR 339 review CONCERN 1's residual case).