[systemd-devel] Early testing for service enablement
Martin Wilck
mwilck at suse.com
Thu Apr 13 09:58:10 UTC 2017
On Thu, 2017-04-13 at 08:49 +0000, Mantas Mikulėnas wrote:
> IIRC, enable/disable/is-enabled are implemented entirely via direct
> filesystem access. Other than that, systemctl uses a private socket
> when running as root – it talks DBus but doesn't require dbus-daemon.
> A bigger problem is that initramfs can't know much about the main
> system due to having a separate /etc, unless maybe you run `systemctl
> --root=...`
This is not a problem for us because in initramfs, we only care whether
the service is enabled in initramfs itself.
> Could you elaborate on why you find this checking necessary in the
> first place? Do your udev rules run some weird stuff?
It's about multipath. In the udev rule that checks whether or not a
given device should be treated as a multipath device path, we need to
figure out whether multipathd.service is enabled. We want to to that
without connecting to multipathd.socket at that time in the boot
process, because that would fire up multipathd, and there's strong
evidence that multipath-enabled systems boot more stably if multipathd
is started later (after udev settle). Therefore the idea was to obtain
the information from systemd ("will multipathd.service be started later
in the boot process?").
> If you're working with your own internal services, there might be
> other ways of checking this.
What do you mean?
Regards,
Martin
--
Dr. Martin Wilck <mwilck at suse.com>, Tel. +49 (0)911 74053 2107
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
More information about the systemd-devel
mailing list