[systemd-bugs] [Bug 88491] RFE: udev should default to --resolve-names=never if in_initrd() returns true

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Apr 26 07:00:20 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=88491

--- Comment #4 from Alain Kalker <a.c.kalker at gmail.com> ---
I have tried (unsuccessfully) one other alternative: add
/usr/lib/systemd/system/systemd-sysusers.service and
/usr/lib/sysusers.d/basic.conf to the initrd.
The dependency ordering suggests that this could work: systemd-udevd.service
contains an After= directive which includes systemd-sysusers.service.

However, when I boot this setup in a VM (with an added
`ExecStartPre=/usr/bin/sleep 5` added to systemd-udevd.service via a drop-in
for debugging purposes), I get the following in the journal:

[..snip..]
Apr 26 15:30:01 localhost systemd[1]: Starting Create System Users...
Apr 26 15:30:01 localhost systemd[1]: Started Create list of required static
device nodes for the current kernel.
Apr 26 15:30:01 localhost systemd[1]: Started udev Coldplug all Devices.
Apr 26 15:30:01 localhost systemd-journal[45]: Journal started
Apr 26 15:30:01 localhost systemd[1]: Started Journal Service.
Apr 26 15:30:01 localhost systemd-sysusers[48]: Creating group optical with gid
999.
Apr 26 15:30:01 localhost systemd-sysusers[48]: Creating group utmp with gid
998.
Apr 26 15:30:01 localhost systemd-sysusers[48]: Creating group adm with gid
997.
Apr 26 15:30:01 localhost systemd-sysusers[48]: Creating group users with gid
996.
Apr 26 15:30:01 localhost systemd-sysusers[48]: Creating group input with gid
995.
Apr 26 15:30:01 localhost systemd-sysusers[48]: Creating group audio with gid
994.
Apr 26 15:30:01 localhost systemd-sysusers[48]: Creating group disk with gid
993.
Apr 26 15:30:01 localhost systemd-sysusers[48]: Creating group wheel with gid
992.
Apr 26 15:30:01 localhost systemd-sysusers[48]: Creating group lock with gid
991.
Apr 26 15:30:01 localhost systemd-sysusers[48]: Creating group kmem with gid
990.
Apr 26 15:30:01 localhost systemd-sysusers[48]: Creating group uucp with gid
989.
Apr 26 15:30:01 localhost systemd-sysusers[48]: Creating group lp with gid 988.
Apr 26 15:30:01 localhost systemd-sysusers[48]: Creating group storage with gid
987.
Apr 26 15:30:01 localhost systemd-sysusers[48]: Creating group video with gid
986.
Apr 26 15:30:01 localhost systemd-sysusers[48]: Creating group tty with gid 5.
Apr 26 15:30:01 localhost systemd-sysusers[48]: Creating group root with gid 0.
Apr 26 15:30:01 localhost systemd-sysusers[48]: Creating user root (Super User)
with uid 0 and gid 0.
Apr 26 15:30:01 localhost systemd-sysusers[48]: Creating group nobody with gid
65534.
Apr 26 15:30:01 localhost systemd-sysusers[48]: Creating user nobody (Nobody)
with uid 65534 and gid 65534.
Apr 26 15:30:01 localhost systemd[1]: Started Create System Users.
Apr 26 15:30:01 localhost systemd[1]: Starting Create Static Device Nodes in
/dev...
Apr 26 15:30:01 localhost systemd[1]: Started Create Static Device Nodes in
/dev.
Apr 26 15:30:01 localhost systemd[1]: Starting udev Kernel Device Manager...
Apr 26 15:30:02 localhost kernel: tsc: Refined TSC clocksource calibration:
3600.029 MHz
Apr 26 15:30:06 localhost systemd-udevd[60]: starting version 219
Apr 26 15:30:06 localhost systemd-udevd[60]: specified group 'tty' unknown
Apr 26 15:30:06 localhost systemd-udevd[60]: specified group 'uucp' unknown
Apr 26 15:30:06 localhost systemd-udevd[60]: specified group 'kmem' unknown
Apr 26 15:30:06 localhost systemd-udevd[60]: specified group 'input' unknown
Apr 26 15:30:06 localhost systemd-udevd[60]: specified group 'video' unknown
Apr 26 15:30:06 localhost systemd-udevd[60]: specified group 'audio' unknown
Apr 26 15:30:06 localhost systemd-udevd[60]: specified group 'lp' unknown
Apr 26 15:30:06 localhost systemd-udevd[60]: specified group 'disk' unknown
Apr 26 15:30:06 localhost systemd-udevd[60]: specified group 'optical' unknown
Apr 26 15:30:06 localhost systemd-udevd[60]: specified group 'storage' unknown
[..snip..]

As is clear from the timestamps, systemd-udevd cannot determine the groups even
though they have been created just 5 seconds ago.

The initrd does contain the required /etc/{group,password,...} at the end of
the early boot stage, so I don't know why systemd-udevd is failing here.
Journal output from yet another drop-in tacked onto initrd-cleanup.service:

Apr 26 15:30:06 localhost systemd[1]: Starting Initrd Default Target.
Apr 26 15:30:06 localhost systemd[1]: Starting Cleaning Up and Shutting Down
Daemons...
Apr 26 15:30:06 localhost ls[96]: /etc:
Apr 26 15:30:06 localhost ls[96]: drwxr-xr-x    4 0        0                0
Apr 26 13:30 .
Apr 26 15:30:06 localhost ls[96]: drwxr-xr-x   12 0        0                0
Apr 26 13:30 ..
Apr 26 15:30:06 localhost ls[96]: -rw-------    1 0        0                0
Apr 26 13:30 .pwd.lock
Apr 26 15:30:06 localhost ls[96]: -rw-r--r--    1 0        0                0
Apr 26 13:29 fstab
Apr 26 15:30:06 localhost ls[96]: -rw-r--r--    1 0        0              211
Apr 26 13:30 group
Apr 26 15:30:06 localhost ls[96]: ----------    1 0        0              179
Apr 26 13:30 gshadow
Apr 26 15:30:06 localhost ls[96]: -rw-r--r--    1 0        0                0
Apr 26 13:29 initrd-release
Apr 26 15:30:06 localhost ls[96]: -rw-r--r--    1 0        0             1739
Apr 26 13:29 ld.so.cache
Apr 26 15:30:06 localhost ls[96]: -rw-r--r--    1 0        0                0
Apr 26 13:29 ld.so.conf
Apr 26 15:30:06 localhost ls[96]: -r--r--r--    1 0        0               33
Apr 26 13:30 machine-id
Apr 26 15:30:06 localhost ls[96]: drwxr-xr-x    2 0        0                0
Apr 26 13:29 modprobe.d
Apr 26 15:30:06 localhost ls[96]: lrwxrwxrwx    1 0        0               17
Apr 26 13:29 mtab -> /proc/self/mounts
Apr 26 15:30:06 localhost ls[96]: -rw-r--r--    1 0        0               80
Apr 26 13:30 passwd
Apr 26 15:30:06 localhost ls[96]: ----------    1 0        0               42
Apr 26 13:30 shadow
[..snip..]
Apr 26 15:30:06 localhost grep[99]: /etc/passwd:root:x:0:0:Super
User:/root:/bin/sh
Apr 26 15:30:06 localhost grep[99]:
/etc/passwd:nobody:x:65534:65534:Nobody:/:/sbin/nologin
Apr 26 15:30:06 localhost grep[99]: /etc/group:input:x:995:
Apr 26 15:30:06 localhost grep[99]: /etc/group:uucp:x:989:
Apr 26 15:30:06 localhost grep[99]: /etc/group:storage:x:987:
Apr 26 15:30:06 localhost grep[99]: /etc/group:tty:x:5:
Apr 26 15:30:06 localhost grep[99]: /etc/group:wheel:x:992:
Apr 26 15:30:06 localhost grep[99]: /etc/group:kmem:x:990:
Apr 26 15:30:06 localhost grep[99]: /etc/group:nobody:x:65534:
Apr 26 15:30:06 localhost grep[99]: /etc/group:lp:x:988:
Apr 26 15:30:06 localhost grep[99]: /etc/group:users:x:996:
Apr 26 15:30:06 localhost grep[99]: /etc/group:optical:x:999:
Apr 26 15:30:06 localhost grep[99]: /etc/group:adm:x:997:
Apr 26 15:30:06 localhost grep[99]: /etc/group:utmp:x:998:
Apr 26 15:30:06 localhost grep[99]: /etc/group:audio:x:994:
Apr 26 15:30:06 localhost grep[99]: /etc/group:lock:x:991:
Apr 26 15:30:06 localhost grep[99]: /etc/group:video:x:986:
Apr 26 15:30:06 localhost grep[99]: /etc/group:root:x:0:
Apr 26 15:30:06 localhost grep[99]: /etc/group:disk:x:993:

Any idea why this isn't working?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20150426/b50b653f/attachment-0001.html>


More information about the systemd-bugs mailing list