[systemd-devel] unit symlinks ignored

John Lane systemd at jelmail.com
Tue Sep 5 16:23:09 UTC 2017

I recently upgraded a box which caused systemd to update from 232 to
234. Now it drops into an emergency shell and won't boot without my help.

Having checked the journal, I see complaints of the form:

systemd[1]: cryptsetup.target: Wants dependency dropin
/etc/systemd/system/cryptsetup.target.wants/cryptsetup at sda.service is
not a symlink, ignoring.

However it is most definitely a symlink:

# ls -l
/etc/systemd/system/cryptsetup.target.wants/cryptsetup at sda.service
lrwxrwxrwx 1 root root 39 Jan 29  2016
/etc/systemd/system/cryptsetup.target.wants/cryptsetup at sda.service ->
/etc/systemd/system/cryptsetup at .service

# file !$
file /etc/systemd/system/cryptsetup.target.wants/cryptsetup at sda.service

/etc/systemd/system/cryptsetup.target.wants/cryptsetup at sda.service:
symbolic link to /etc/systemd/system/cryptsetup at .service
# stat
/etc/systemd/system/cryptsetup.target.wants/cryptsetup at sda.service ->
/etc/systemd/system/cryptsetup at .service
  Size: 39              Blocks: 0          IO Block: 4096   symbolic
Device: fe02h/65026d    Inode: 263672      Links: 1

Access: (0777/lrwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)

Access: 2017-09-05 13:00:29.445469702 +0100
Modify: 2016-01-29 09:42:11.000000000 +0000
Change: 2016-01-29 12:35:58.866681978 +0000
 Birth: -

This changed in version 233, I think the related commit is 1f9e5cf
5/feb/17 to file src/core/load-dropin.c

The intervention I perform to allow the boot to continue is to
"systemctl start" the units that systemd chose to ignore. My current
workaround is to downgrade to systemd 232 which boots without intervention.

FYI the unit in question "cryptsetup at .service" is a custom unit that
mounts encrypted volumes using external luks headers and keys because
crypttab could not handle that (I don't know if that situation has
changed) but I don't think that's relevant to the issue at hand.

Please let me know if I can provide any more information. If this is a
bug then I can raise it on the Github issue tracker.

More information about the systemd-devel mailing list