zabbly / incus

Incus package repository
176 stars 14 forks source link

Separate /opt partition breaks startup on boot #30

Closed jgraichen closed 4 months ago

jgraichen commented 4 months ago

We have a separate /opt partition (ZFS) which seams to break the service units on boot:

$ journalctl -b | grep incus
Mar 15 16:37:09 control2c systemd[1]: incus-startup.service: Failed to open /lib/systemd/system/incus-startup.service: No such file or directory
Mar 15 16:37:09 control2c systemd[1]: incus-lxcfs.service: Failed to open /lib/systemd/system/incus-lxcfs.service: No such file or directory
Mar 15 16:37:09 control2c systemd[1]: incus.socket: Failed to open /lib/systemd/system/incus.socket: No such file or directory
Mar 15 16:37:09 control2c systemd[1]: incus-user.socket: Failed to open /lib/systemd/system/incus-user.socket: No such file or directory

Nothing is started.

Is it intended for the system service units to be symlinks to files in /opt?

$ ls -lah /lib/systemd/system/incus*
lrwxrwxrwx 1 root root 49 Feb 28 18:48 /lib/systemd/system/incus-lxcfs.service -> /opt/incus/lib/systemd/system/incus-lxcfs.service
lrwxrwxrwx 1 root root 43 Feb 28 18:48 /lib/systemd/system/incus.service -> /opt/incus/lib/systemd/system/incus.service
lrwxrwxrwx 1 root root 42 Feb 28 18:48 /lib/systemd/system/incus.socket -> /opt/incus/lib/systemd/system/incus.socket
lrwxrwxrwx 1 root root 51 Feb 28 18:48 /lib/systemd/system/incus-startup.service -> /opt/incus/lib/systemd/system/incus-startup.service
lrwxrwxrwx 1 root root 48 Feb 28 18:48 /lib/systemd/system/incus-user.service -> /opt/incus/lib/systemd/system/incus-user.service
lrwxrwxrwx 1 root root 47 Feb 28 18:48 /lib/systemd/system/incus-user.socket -> /opt/incus/lib/systemd/system/incus-user.socket

The symlinks introduce a hidden dependency to that partition, which is not mounted yet when the service units are evaluated.