I have an F15 system with two disks. One contains root and swap, on LVM, on LUKS. The other contains /home on LVM on LUKS. Systemd gets stuck trying to boot it. One of the causes is that the cryptsetup rules ignore default dependencies, which means that they don't pull in udev-trigger.service, which means that the LUKS devices never become "active". I can "fix" this by hacking up cryptsetup-generator to add Wants: udev-trigger.service.
This seems flaky, though: shouldn't systemd be smart enough to start udev-trigger.service on its own as soon as something waits for a .device unit that exists in sysfs but is inactive? (Alternatively, udev-trigger.service could just always run at the very beginning because something'll need it and it might even finish faster the sooner it starts because there may be fewer device nodes.)
[Severity set to major because this makes my system unbootable]
udev-trigger.service is installed and statically enabled by udev. (i.e. there is a .wants/ symlink for it in /lib), it should only run once, at boot, for coldplug. If you disabled it you must have done so manually.
I am not entirely sure what precisely this bug is about. Can you elaborate? If you disable udev-settle manually, overriding the default udev configuration then things will break, where's the news in that?
This is F15 and I didn't disable anything. I did, however, boot with systemd.unit=emergency.target, and it got stuck. emergency.service has DefaultDependencies=no, which makes cryptsetup wait forever.
In any case, it seems like bad form for a service to have wait forever for a dependency that it neither Wants nor Requires.
(I suspect that the reason I couldn't boot without systemd.unit=emergency.target was a combination of LVM not working and a now-fixed selinux bug.)
(In reply to comment #2)
> This is F15 and I didn't disable anything. I did, however, boot with
> systemd.unit=emergency.target, and it got stuck. emergency.service has
> DefaultDependencies=no, which makes cryptsetup wait forever.
hmm? emergency.target should not pull in cryptsetup at all, it just starts a shell and that's it. What else is being started for you? Can you attach the output of "dmesg" when booting with systemd.log_level=debug and systemd.log_target=kmsg on the kernel cmd line?
> In any case, it seems like bad form for a service to have wait forever for a
> dependency that it neither Wants nor Requires.
Almost everything in systemd is timed out after 3min.
> (I suspect that the reason I couldn't boot without
> systemd.unit=emergency.target was a combination of LVM not working and a
> now-fixed selinux bug.)
emergency.target should not spawn any LVM related service.
My turn to apologize -- I misdiagnosed this problem.
The combination of two Fedora bugs [1,2] caused my system to hang while trying to mount /home. Try try to debug the problem, I booted with systemd.unit=emergency.target and did systemctl start cryptsetup.target, which hung. I said "aha!" and filed this bug because I figured out why systemctl start cryptsetup.target hung and assumed that it was the same reason my bootup hung.
I still think it's worth fixing this "bug" because it's annoying for systemctl start cryptsetup.target to time out when run from an emergency shell.