public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH nfs-utils] systemd/rpc-statd.service - add IgnoreOnIsolate=yes
@ 2018-11-28  3:52 NeilBrown
  2018-11-29 19:36 ` Steve Dickson
  0 siblings, 1 reply; 2+ messages in thread
From: NeilBrown @ 2018-11-28  3:52 UTC (permalink / raw)
  To: Steve Dickson; +Cc: linux-nfs

[-- Attachment #1: Type: text/plain, Size: 1368 bytes --]


If you run
  systemctl isolate multi-user.target
then all services not needed by multi-user.target are stopped.
This currently includes rpc-statd, which is a problem.

Systemd doesn't know that rpc-statd.service is needed by
multi-user.target, or more accurately nfs-client.target, because
sometimes it isn't.
It is started dynamically by mount.nfs when a v3 or v2 filesystem
is mounted (not when v4 is mounted) - so systemd doesn't see the connection.

mount units default to IgnoreOnIsolate=yes, as mounts are expected to be
left mounted when you run "systemctl isolate ....".  As rpc-statd.service
is started by a mount, and needed for some mounts, it makes sense for it
to declare IgnoreOnIsolate=yes too.
With this declaration in place rpc.statd remains running when
  systemctl isolate multi-user.target
is run.

Signed-off-by: NeilBrown <neilb@suse.com>
---
 systemd/rpc-statd.service | 1 +
 1 file changed, 1 insertion(+)

diff --git a/systemd/rpc-statd.service b/systemd/rpc-statd.service
index f41ae2084f3c..1f4e6a8b92ab 100644
--- a/systemd/rpc-statd.service
+++ b/systemd/rpc-statd.service
@@ -7,6 +7,7 @@ Wants=network-online.target
 After=network-online.target nss-lookup.target rpcbind.socket
 
 PartOf=nfs-utils.service
+IgnoreOnIsolate=yes
 
 [Service]
 Environment=RPC_STATD_NO_NOTIFY=1
-- 
2.14.0.rc0.dirty


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH nfs-utils] systemd/rpc-statd.service - add IgnoreOnIsolate=yes
  2018-11-28  3:52 [PATCH nfs-utils] systemd/rpc-statd.service - add IgnoreOnIsolate=yes NeilBrown
@ 2018-11-29 19:36 ` Steve Dickson
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2018-11-29 19:36 UTC (permalink / raw)
  To: NeilBrown; +Cc: linux-nfs



On 11/27/18 10:52 PM, NeilBrown wrote:
> If you run
>   systemctl isolate multi-user.target
> then all services not needed by multi-user.target are stopped.
> This currently includes rpc-statd, which is a problem.
> 
> Systemd doesn't know that rpc-statd.service is needed by
> multi-user.target, or more accurately nfs-client.target, because
> sometimes it isn't.
> It is started dynamically by mount.nfs when a v3 or v2 filesystem
> is mounted (not when v4 is mounted) - so systemd doesn't see the connection.
> 
> mount units default to IgnoreOnIsolate=yes, as mounts are expected to be
> left mounted when you run "systemctl isolate ....".  As rpc-statd.service
> is started by a mount, and needed for some mounts, it makes sense for it
> to declare IgnoreOnIsolate=yes too.
> With this declaration in place rpc.statd remains running when
>   systemctl isolate multi-user.target
> is run.
> 
> Signed-off-by: NeilBrown <neilb@suse.com>
Committed....

steved.

> ---
>  systemd/rpc-statd.service | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/systemd/rpc-statd.service b/systemd/rpc-statd.service
> index f41ae2084f3c..1f4e6a8b92ab 100644
> --- a/systemd/rpc-statd.service
> +++ b/systemd/rpc-statd.service
> @@ -7,6 +7,7 @@ Wants=network-online.target
>  After=network-online.target nss-lookup.target rpcbind.socket
>  
>  PartOf=nfs-utils.service
> +IgnoreOnIsolate=yes
>  
>  [Service]
>  Environment=RPC_STATD_NO_NOTIFY=1
> -- 2.14.0.rc0.dirty
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-29 19:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-28  3:52 [PATCH nfs-utils] systemd/rpc-statd.service - add IgnoreOnIsolate=yes NeilBrown
2018-11-29 19:36 ` Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox