RPCNFSDARGS missing from /etc/default/nfs-kernel-server
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nfs-utils (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
The tl;dr: version:
An RPCNFSARGS variable needs to be added to /etc/default/
# Runtime priority of server (see nice(1))
RPCNFSDPRIORITY=0
I'll just repost what I wrote to the NFS developers list about this:
The service file for the nfs server, /usr/lib/
includes this:
Wants=
After=
All nfs-config does is run this script:
ExecStart=
and the script reads the /etc/default/nfs* files and then
echo RPCNFSDARGS=
which then goes on the command line in the nfs-server service file:
ExecStart=
So the solution is to add this line to /etc/default/
RPCNFSDOPTS="-N 2 -N 3"
Still unaccounted for is this variable in /etc/default/
# Runtime priority of server (see nice(1))
RPCNFSDPRIORITY=0
Which I can't find used anywhere in the service files. But in any case, adding the RPCNFSDOPTS variable resolved the issue:
root@helios:~# cat /proc/fs/
-2 -3 +4 +4.1 +4.2
description: | updated |
tags: | removed: server-triage-discuss |
tags: | added: rls-hh-incoming |
tags: |
added: fr-875 removed: rls-hh-incoming |
Hi Patrick,
thank you for your report!
#1 RPCNFSDPRIORITY server. init $RPCNFSDPRIORIT Y
That was used with the old style of starting a service like
start-stop-daemon ... --nicelevel $RPCNFSDPRIORITY
in sysV style nfs-kernel-
Which doesn't work that way in systemd, one would need to set the following in the service file
LimitNICE=
#2 RPCNFSDOPTS systemd/ scripts/ nfs-utils_ env.sh generating /run/sysconfig/ nfs-utils on behalf of nfs-config.service. \"$RPCNFSDOPTS ${RPCNFSDCOUNT: -8}\" we have:
I agree to your analysis of /usr/lib/
And then nfs-server.service using this ans environment for $RPCNFSDARGS
Of echo RPCNFSDARGS=
- RPCNFSDCOUNT which is in the .default
- RPCNFSDOPTS missing in .default
- the .default lists some exclusions, but this isn't part of that list
# the following are supported by the systemd units, but not exposed in default files \"$SMNOTIFYARGS \" \"$RPCIDMAPDARG S\" \"$RPCGSSDARGS\ " \"$BLKMAPDARGS\ " PROXY=\ "$GSS_USE_ PROXY\"
# echo SMNOTIFYARGS=
# echo RPCIDMAPDARGS=
# echo RPCGSSDARGS=
# echo BLKMAPDARGS=
# echo GSS_USE_
Note: the old sysV also didn't have RPCNFSDOPTS/ RPCNFSDARGS it directly passed RPCNFSDCOUNT.
So this isn't a regression but a request to fix a feature (daemon arguments) that seems only partially implemented.