[arch-general] Services with DefaultDependencies=no

Leonid Isaev leonid.isaev at jila.colorado.edu
Mon Aug 27 17:52:50 UTC 2018


On Mon, Aug 27, 2018 at 12:51:13PM -0400, Eli Schwartz via arch-general wrote:
> On 8/27/18 8:45 AM, Leonid Isaev via arch-general wrote:
> > Hi,
> > 
> > 	While going over .service files on my system, I noticed that quite a
> > few of them, not belonging to systemd package, contain DefaultDependencies=no
> > (DD=no). This is understandable (perhaps) for programs like systemd-journald,
> > but what about normal daemons, like rpcbind, haveged and rpc-nfsd? I thought
> > that setting DD=no is kind of a hack needed only for special services (e.g.
> > called from fstab via x-systemd.requires=). Or am I missing something?
> 
> DefaultDependencies=false means it won't get "ensure that the service is
> started only after basic system initialization is completed and is
> properly terminated on system shutdown." (from the systemd.unit(5) man
> page).

Yeah, systemd.service manpage is more relevant here. Because it says that
daemons with DD=no are also not subject to the normal shutdown logic...

> Seems like a reasonable thing to want to avoid for programs that are
> meant to be started as part of initializing the system.

Initialization or early boot?

> e.g. you might want RPC daemons running as soon as possible. You most
> likely do want haveged running as soon as possible.

Actually, digging into nfs-utils I understand why devs did it (for NFS-mounted
/var). But they also were careful to specify dependencies on services that are
pulled as a part of basic and sysinit targets. I disagree with that decision
because I might want to bring firewall (iptables.service obeys the normal DD
logic) before NFS/rpcbind is started (I do it for port-forwarding RPCbind and
ypserv calls into a container).

But I'm really not sure why you'd need haveged in early boot (as opposed to
inird), nor that it doesn't require any of the early-boot services...

But thx anyway,
-- 
Leonid Isaev


More information about the arch-general mailing list