All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] systemd: nfs-server.service add "Wants" dependency on rpc-rquotad.service
@ 2021-04-30  6:56 Yongcheng Yang
  2021-05-04  3:34 ` NeilBrown
  0 siblings, 1 reply; 2+ messages in thread
From: Yongcheng Yang @ 2021-04-30  6:56 UTC (permalink / raw)
  To: Steve Dickson; +Cc: Linux NFS Mailing list, Yongcheng Yang, Petr Pisar

The RPC quota service was part of nfs-utils and started together
with nfs-server before it was splitting out from nfs-utils.

It would be convenient to preserve the behavior: Let nfs-server
start rpc-rquotad automatically.

Signed-off-by: Petr Pisar <ppisar@redhat.com>
Signed-off-by: Yongcheng Yang <yoyang@redhat.com>
---
Hi,

The rpc-rquotad.service contains "WantedBy=nfs-server.service" but it only
takes effect after "systemctl enable rpc-rquotad":

"A symbolic link is created in the .wants/ directory of each of the listed
units when this unit is installed by systemctl enable"

This is different with the previous behavior when it's not splitted.

Test logs:
~~~~~~~~~~
[root@rhel-latest ~]# systemctl is-enabled rpc-rquotad
disabled
[root@rhel-latest ~]# systemctl start nfs-server
[root@rhel-latest ~]# systemctl status rpc-rquotad
* rpc-rquotad.service - Remote quota server
   Loaded: loaded (/usr/lib/systemd/system/rpc-rquotad.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:rpc.rquotad(8)
[root@rhel-latest ~]#
[root@rhel-latest ~]# systemctl enable rpc-rquotad
Created symlink /etc/systemd/system/multi-user.target.wants/rpc-rquotad.service -> /usr/lib/systemd/system/rpc-rquotad.service.
Created symlink /etc/systemd/system/nfs-server.service.wants/rpc-rquotad.service -> /usr/lib/systemd/system/rpc-rquotad.service.
[root@rhel-latest ~]# systemctl restart nfs-server
[root@rhel-latest ~]# systemctl status rpc-rquotad
* rpc-rquotad.service - Remote quota server
   Loaded: loaded (/usr/lib/systemd/system/rpc-rquotad.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2021-04-30 02:17:33 EDT; 6s ago
     Docs: man:rpc.rquotad(8)
 Main PID: 5821 (rpc.rquotad)
    Tasks: 1 (limit: 7971)
   Memory: 12.7M
   CGroup: /system.slice/rpc-rquotad.service
           `-5821 /usr/sbin/rpc.rquotad

Apr 30 02:17:33 rhel-latest systemd[1]: Starting Remote quota server...
Apr 30 02:17:33 rhel-latest systemd[1]: Started Remote quota server.
[root@rhel-latest ~]#

Thanks,
Yongcheng

 systemd/nfs-server.service | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/systemd/nfs-server.service b/systemd/nfs-server.service
index b432f910..16eca3f9 100644
--- a/systemd/nfs-server.service
+++ b/systemd/nfs-server.service
@@ -3,7 +3,8 @@ Description=NFS server and services
 DefaultDependencies=no
 Requires=network.target proc-fs-nfsd.mount
 Requires=nfs-mountd.service
-Wants=rpcbind.socket network-online.target
+Wants=network-online.target
+Wants=rpcbind.socket rpc-rquotad.service
 Wants=rpc-statd.service nfs-idmapd.service
 Wants=rpc-statd-notify.service
 Wants=nfsdcld.service
-- 
2.20.1


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

* Re: [PATCH] systemd: nfs-server.service add "Wants" dependency on rpc-rquotad.service
  2021-04-30  6:56 [PATCH] systemd: nfs-server.service add "Wants" dependency on rpc-rquotad.service Yongcheng Yang
@ 2021-05-04  3:34 ` NeilBrown
  0 siblings, 0 replies; 2+ messages in thread
From: NeilBrown @ 2021-05-04  3:34 UTC (permalink / raw)
  To: Yongcheng Yang
  Cc: Steve Dickson, Linux NFS Mailing list, Yongcheng Yang, Petr Pisar

On Fri, 30 Apr 2021, Yongcheng Yang wrote:
> The RPC quota service was part of nfs-utils and started together
> with nfs-server before it was splitting out from nfs-utils.
> 
> It would be convenient to preserve the behavior: Let nfs-server
> start rpc-rquotad automatically.
> 
> Signed-off-by: Petr Pisar <ppisar@redhat.com>
> Signed-off-by: Yongcheng Yang <yoyang@redhat.com>

I would prefer that whatever package provides rpc-rquotad should take
care of this.
It can provide a "wants" symlink

  .../systemd/system/nfs-server.wants/rpc-rquotad.service -> .../rpc-rquotad.service

NeilBrown

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

end of thread, other threads:[~2021-05-04  3:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-30  6:56 [PATCH] systemd: nfs-server.service add "Wants" dependency on rpc-rquotad.service Yongcheng Yang
2021-05-04  3:34 ` NeilBrown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.