systemd: nfs-server.service add "Wants" dependency on rpc-rquotad.service
Subsystems (2)
PATCH 1/1 systemd: nfs-server.service add "Wants" dependency on rpc-rquotad.service
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.
---
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.rquotadApr 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(-)
systemd/nfs-server.service +2 -1
@@ -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
Signature · 1 line
2.20.1
Quoted 8 lines · Yongcheng Yang
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 <[email protected]>Signed-off-by Yongcheng Yang <[email protected]>
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