diff mbox series

systemd: rpc_pipefs.target use BindsTo= instead of Requires=

Message ID 20190125083302.3346-1-yongcheng.yang@gmail.com (mailing list archive)
State New, archived
Headers show
Series systemd: rpc_pipefs.target use BindsTo= instead of Requires= | expand

Commit Message

Yongcheng Yang Jan. 25, 2019, 8:33 a.m. UTC
The rpc_pipefs.target should enter inactive state if
var-lib-nfs-rpc_pipefs.mount is stopped. Otherwise,
services depending rpc_pipefs.target (e.g. nfs-idmapd)
fail to start after /var/lib/nfs/rpc_pipefs unmounted

Signed-off-by: Yongcheng Yang <yongcheng.yang@gmail.com>
---

Reproducing steps:
$ systemctl stop nfs-idmapd
$ umount /var/lib/nfs/rpc_pipefs
$ systemctl start nfs-idmapd

Thanks,
Yongcheng

 systemd/rpc_pipefs.target | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Steve Dickson Jan. 25, 2019, 4:44 p.m. UTC | #1
Hello Yongcheng,

On 1/25/19 3:33 AM, Yongcheng Yang wrote:
> The rpc_pipefs.target should enter inactive state if
> var-lib-nfs-rpc_pipefs.mount is stopped. Otherwise,
> services depending rpc_pipefs.target (e.g. nfs-idmapd)
> fail to start after /var/lib/nfs/rpc_pipefs unmounted
> 
> Signed-off-by: Yongcheng Yang <yongcheng.yang@gmail.com>
> ---
> 
> Reproducing steps:
> $ systemctl stop nfs-idmapd
> $ umount /var/lib/nfs/rpc_pipefs
> $ systemctl start nfs-idmapd
I look at things like this and I think there real
fix here is... Just don't do that! :-) 

Now I'm sure the patch works... but... why in the world would anybody 
unmount /var/lib/nfs/rpc_pipefs with NFS daemons running? 

Unless you are some mad QA person trying to destroy the world! ;-) 

steved.
> 
> Thanks,
> Yongcheng
> 
>  systemd/rpc_pipefs.target | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/systemd/rpc_pipefs.target b/systemd/rpc_pipefs.target
> index 01d4d27..5ce3981 100644
> --- a/systemd/rpc_pipefs.target
> +++ b/systemd/rpc_pipefs.target
> @@ -1,3 +1,3 @@
>  [Unit]
> -Requires=var-lib-nfs-rpc_pipefs.mount
> +BindsTo=var-lib-nfs-rpc_pipefs.mount
>  After=var-lib-nfs-rpc_pipefs.mount
>
diff mbox series

Patch

diff --git a/systemd/rpc_pipefs.target b/systemd/rpc_pipefs.target
index 01d4d27..5ce3981 100644
--- a/systemd/rpc_pipefs.target
+++ b/systemd/rpc_pipefs.target
@@ -1,3 +1,3 @@ 
 [Unit]
-Requires=var-lib-nfs-rpc_pipefs.mount
+BindsTo=var-lib-nfs-rpc_pipefs.mount
 After=var-lib-nfs-rpc_pipefs.mount