Commit ee5c601
committed
fix(postcheck): materialize sysusers.d before tmpfiles dry-run
Same cockpit-group resolution failure as before, different root cause.
The previous fix added a 'sysusers-declared' filter that suppressed
'Failed to resolve' warnings whose target was declared in a MiOS-owned
sysusers.d file. That covered our own users + cephadm, but did not
cover names declared by upstream RPMs whose sysusers.d entries are
present on disk but have not yet been materialized into /etc/passwd /
/etc/group.
Concrete failure:
/usr/lib/tmpfiles.d/mios-infra.conf:5:
Failed to resolve group 'cockpit': Unknown group
/usr/lib/tmpfiles.d/mios-infra.conf:6:
Failed to resolve group 'cockpit': Unknown group
The cockpit-ws RPM ships /usr/lib/sysusers.d/cockpit-ws.conf with the
cockpit group declaration. At first boot, systemd-sysusers runs before
systemd-tmpfiles and the group is created; at build time inside the
OCI image, neither has run when our postcheck fires, so the tmpfiles
dry-run sees an Unknown group.
Fix: call 'systemd-sysusers --no-pager' once at the top of postcheck
so EVERY declared sysusers entry (MiOS-owned + upstream-shipped)
lands in /etc/passwd and /etc/group before the tmpfiles dry-run
reads them. systemd-sysusers is idempotent, runs cleanly inside the
OCI image, and is the same operation the first-boot sequence
performs anyway, so this just brings the build-time state forward
to match runtime. Failure of the call itself is non-fatal -- a
warning is logged and the existing 'sysusers-declared' filter (added
in the prior fix) still covers the corner case.
After this commit:
- cockpit, cockpit-ws, and any other group declared by an upstream
RPM's sysusers.d file resolve cleanly at build time.
- The MiOS-owned sysusers entries (mios-forge UID 816 included)
also materialize before the dry-run, reinforcing the existing
filter as belt-and-braces rather than the only line of defense.1 parent eacc173 commit ee5c601
1 file changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
13 | 30 | | |
14 | 31 | | |
15 | 32 | | |
| |||
0 commit comments