1 From 314a5003a27d2a654d117c40714739e6aa3b7092 Mon Sep 17 00:00:00 2001
2 From: Martin Pitt <martin.pitt@ubuntu.com>
3 Date: Tue, 3 Mar 2015 16:42:28 +0100
4 Subject: [PATCH] systemd: Relax dependencies of services
6 Stop depending on basic.target in the daemons which still do; i. e. add
7 DefaultDependencies=no. This makes it possible to run NFS during early boot,
8 and helps if you e. g. have /var on NFS. We don't require much else than
11 systemd/auth-rpcgss-module.service | 1 +
12 systemd/nfs-config.service | 2 ++
13 systemd/nfs-idmapd.service | 3 ++-
14 systemd/nfs-mountd.service | 3 ++-
15 systemd/nfs-server.service | 2 ++
16 systemd/rpc-statd-notify.service | 3 ++-
17 systemd/rpc-svcgssd.service | 3 ++-
18 7 files changed, 13 insertions(+), 4 deletions(-)
20 Forwarded: http://www.spinics.net/lists/linux-nfs/msg49934.html
22 diff --git a/systemd/auth-rpcgss-module.service b/systemd/auth-rpcgss-module.service
23 index 0355e13..5241f7b 100644
24 --- a/systemd/auth-rpcgss-module.service
25 +++ b/systemd/auth-rpcgss-module.service
27 # unit will fail. But that's OK.)
29 Description=Kernel Module supporting RPCSEC_GSS
30 +DefaultDependencies=no
31 Before=gssproxy.service rpc-svcgssd.service rpc-gssd.service
32 Wants=gssproxy.service rpc-svcgssd.service rpc-gssd.service
33 ConditionPathExists=/etc/krb5.keytab
34 diff --git a/systemd/nfs-config.service b/systemd/nfs-config.service
35 index 64010e6..7f65305 100644
36 --- a/systemd/nfs-config.service
37 +++ b/systemd/nfs-config.service
40 Description=Preprocess NFS configuration
41 +After=local-fs.target
42 +DefaultDependencies=no
46 diff --git a/systemd/nfs-idmapd.service b/systemd/nfs-idmapd.service
47 index e84f8c8..df3dd9d 100644
48 --- a/systemd/nfs-idmapd.service
49 +++ b/systemd/nfs-idmapd.service
52 Description=NFSv4 ID-name mapping service
53 +DefaultDependencies=no
54 Requires=var-lib-nfs-rpc_pipefs.mount
55 -After=var-lib-nfs-rpc_pipefs.mount
56 +After=var-lib-nfs-rpc_pipefs.mount local-fs.target
58 BindsTo=nfs-server.service
60 diff --git a/systemd/nfs-mountd.service b/systemd/nfs-mountd.service
61 index d908afe..8a39f3e 100644
62 --- a/systemd/nfs-mountd.service
63 +++ b/systemd/nfs-mountd.service
66 Description=NFS Mount Daemon
67 +DefaultDependencies=no
68 Requires=proc-fs-nfsd.mount
69 After=proc-fs-nfsd.mount
71 +After=network.target local-fs.target
72 BindsTo=nfs-server.service
74 Wants=nfs-config.service
75 diff --git a/systemd/nfs-server.service b/systemd/nfs-server.service
76 index b35e193..db801cb 100644
77 --- a/systemd/nfs-server.service
78 +++ b/systemd/nfs-server.service
81 Description=NFS server and services
82 +DefaultDependencies=no
83 Requires= network.target proc-fs-nfsd.mount rpcbind.target
84 Requires= nfs-mountd.service
85 Wants=rpc-statd.service nfs-idmapd.service
86 Wants=rpc-statd-notify.service
88 +After= local-fs.target
89 After= network.target proc-fs-nfsd.mount rpcbind.target nfs-mountd.service
90 After= nfs-idmapd.service rpc-statd.service
91 Before= rpc-statd-notify.service
92 diff --git a/systemd/rpc-statd-notify.service b/systemd/rpc-statd-notify.service
93 index a655445..a7e2f8e 100644
94 --- a/systemd/rpc-statd-notify.service
95 +++ b/systemd/rpc-statd-notify.service
98 Description=Notify NFS peers of a restart
99 +DefaultDependencies=no
100 Requires=network-online.target
101 -After=network.target nss-lookup.target
102 +After=local-fs.target network.target nss-lookup.target
104 # if we run an nfs server, it needs to be running before we
105 # tell clients that it has restarted.
106 diff --git a/systemd/rpc-svcgssd.service b/systemd/rpc-svcgssd.service
107 index f7424b0..41177b6 100644
108 --- a/systemd/rpc-svcgssd.service
109 +++ b/systemd/rpc-svcgssd.service
112 Description=RPC security service for NFS server
113 +DefaultDependencies=no
114 Requires=var-lib-nfs-rpc_pipefs.mount
115 -After=var-lib-nfs-rpc_pipefs.mount
116 +After=var-lib-nfs-rpc_pipefs.mount local-fs.target
117 PartOf=nfs-server.service
118 PartOf=nfs-utils.service