[systemd-devel] Ordering issues
Lennart Poettering
lennart at poettering.net
Thu Jan 5 09:15:24 UTC 2023
On Mi, 04.01.23 13:21, Scott Ellentuch (tuctboh at gmail.com) wrote:
> Hi,
>
> I'm trying to do something with inconsistent results and wondered where I'm
> going wrong. I recently installed GLUSTERFS onto a set of 4 Raspberry PI's,
> but am having some boot sequencing issues.
>
> It started trying to run rsyslogd. Apparently, it was getting started
> before the gluster mount was done. After a bit of looking, I added into
> [Unit] -
>
> After=glusterd.service
>
> Restarted the machine and all good.
Hmm, you actually *want* rsyslog to run after glusterd?
The thing is that most system services log, and I presume glusterd
too, and usually you want that to enter your log framework of choice,
but that means rsyslog probably should run first, not after glusterd,
but that means it cannot log onto gluster fs. because that would be a
cyclic dep.
> So the next thing I tried was for
> keepalived . It started up and failed with not being able to see its config
> file (Moved to gluster). I changed -
>
> [Unit]
> Description=Keepalive Daemon (LVS and VRRP)
> After=network-online.target
> Wants=network-online.target
> # Only start if there is a configuration file
> ConditionFileNotEmpty=/etc/keepalived/keepalived.conf
>
> to
>
> [Unit]
> Description=Keepalive Daemon (LVS and VRRP)
> After=network-online.target glusterd.service
> Wants=network-online.target glusterd.service
> # Only start if there is a configuration file
> ConditionFileNotEmpty=/etc/keepalived/keepalived.conf
>
> But it still isn't letting glusterd run before it. (And I did run
> `systemctl daemon-reload` after the change.
>
> How can I track down why this isn't happening in the order I expect?
This all smeels like a mess of cyclic deps. See the system logs
(journalctl).
/etc/ must be available during early boot, before you run complex
services (such as glusterd) off it. Thus it cannot be backed by such
complex services.
If you want /etc/ to be backed by such complex services, these
services must run from the initrd, and stick around. But I doubt
glusterfs is ready for that.
Lennart
--
Lennart Poettering, Berlin
More information about the systemd-devel
mailing list