systemd: Relax dependencies of services
Subsystems (2)
PATCH 1/1 systemd: Relax dependencies of services
Hello all,
I would like to make NFS start earlier in the boot (i. e. before basic.target), so that you can do things like put /var/ on NFS, and rcS SysV init scripts which depend on $remote_fs work.
I tested this on both a server and a client.
Thanks for considering!
Martin
Signature · 2 lines
Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
From e4eba8124c4efbfa172e5bc0aac632452b97e016 Mon Sep 17 00:00:00 2001
From: Martin Pitt <[email protected]>
Date: Tue, 3 Mar 2015 16:42:28 +0100
Subject: [PATCH] systemd: Relax dependencies of services
Stop depending on basic.target in the daemons which still do; i. e. add DefaultDependencies=no. This makes it possible to run NFS during early boot, and helps if you e. g. have /var on NFS. We don't require much else than local-fs.
--- systemd/auth-rpcgss-module.service | 1 + systemd/nfs-config.service | 2 ++ systemd/nfs-idmapd.service | 3 ++- systemd/nfs-mountd.service | 3 ++- systemd/nfs-server.service | 2 ++ systemd/rpc-statd-notify.service | 3 ++- systemd/rpc-svcgssd.service | 3 ++- 7 files changed, 13 insertions(+), 4 deletions(-)
systemd/auth-rpcgss-module.service +1 -0
@@ -6,6 +6,7 @@ # unit will fail. But that's OK.) [Unit] Description=Kernel Module supporting RPCSEC_GSS +DefaultDependencies=no Before=gssproxy.service rpc-svcgssd.service rpc-gssd.service Wants=gssproxy.service rpc-svcgssd.service rpc-gssd.service ConditionPathExists=/etc/krb5.keytab
systemd/nfs-config.service +2 -0
@@ -1,5 +1,7 @@ [Unit] Description=Preprocess NFS configuration +After=local-fs.target +DefaultDependencies=no [Service] Type=oneshot
systemd/nfs-idmapd.service +2 -1
@@ -1,7 +1,8 @@ [Unit] Description=NFSv4 ID-name mapping service +DefaultDependencies=no Requires=var-lib-nfs-rpc_pipefs.mount -After=var-lib-nfs-rpc_pipefs.mount +After=var-lib-nfs-rpc_pipefs.mount local-fs.target BindsTo=nfs-server.service
systemd/nfs-mountd.service +2 -1
@@ -1,8 +1,9 @@ [Unit] Description=NFS Mount Daemon +DefaultDependencies=no Requires=proc-fs-nfsd.mount After=proc-fs-nfsd.mount -After=network.target +After=network.target local-fs.target BindsTo=nfs-server.service Wants=nfs-config.service
systemd/nfs-server.service +2 -0
@@ -1,10 +1,12 @@ [Unit] Description=NFS server and services +DefaultDependencies=no Requires= network.target proc-fs-nfsd.mount rpcbind.target Requires= nfs-mountd.service Wants=rpc-statd.service nfs-idmapd.service Wants=rpc-statd-notify.service +After= local-fs.target After= network.target proc-fs-nfsd.mount rpcbind.target nfs-mountd.service After= nfs-idmapd.service rpc-statd.service Before= rpc-statd-notify.service
systemd/rpc-statd-notify.service +2 -1
@@ -1,7 +1,8 @@ [Unit] Description=Notify NFS peers of a restart +DefaultDependencies=no Requires=network-online.target -After=network.target nss-lookup.target +After=local-fs.target network.target nss-lookup.target # if we run an nfs server, it needs to be running before we # tell clients that it has restarted.
systemd/rpc-svcgssd.service +2 -1
@@ -1,7 +1,8 @@ [Unit] Description=RPC security service for NFS server +DefaultDependencies=no Requires=var-lib-nfs-rpc_pipefs.mount -After=var-lib-nfs-rpc_pipefs.mount +After=var-lib-nfs-rpc_pipefs.mount local-fs.target PartOf=nfs-server.service PartOf=nfs-utils.service
Signature · 1 line
2.1.4
Hey
Quoted 9 lines · Martin Pitt
Hello all,
I would like to make NFS start earlier in the boot (i. e. before basic.target), so that you can do things like put
/var/on NFS, and rcS SysV init scripts which depend on $remote_fs work.I tested this on both a server and a client.
Thanks for considering!
To make your two patch easier to review, could you mind in-lining the patches in your email instead of attaching them and then repost both patches?
See section 6 of https://www.kernel.org/doc/Documentation/SubmittingPatches
for details
Being we are looking into monkey around with the systemd scripts and changing the time of things I want make it as easy as possible to review.
Finally could you also cc the systemd folks at
[email protected]
when you repost the patches?
tia!
steved.
Hey Steve,
Steve Dickson [2015-03-03 12:10 -0500]:
Quoted 3 lines
To make your two patch easier to review, could you mind in-lining the patches in your email instead of attaching them and then repost both patches?
Ack, done. I'm always a bit afraid of breaking them that way, but git send-email ought to DTRT.
Quoted 3 lines
Finally could you also cc the systemd folks at
[email protected]
when you repost the patches?
Done.
Thanks,
Martin
Signature · 2 lines
Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)