[Bug 1898778] [NEW] RPCNFSDARGS missing from /etc/default/nfs-kernel-server

Patrick Goetz 1898778 at bugs.launchpad.net
Tue Oct 6 19:38:22 UTC 2020


Public bug reported:

The tl;dr: version:

An RPCNFSARGS variable needs to be added to /etc/default/nfs-kernel-
server file in order to facilitate turning off NFSv3, so that the
rpcbind dependency goes away. Otherwise the user is forced to snoop
through all the related systemd service files (as I did) in order to
figure out how to turn off NFSv3.   Meanwhile, this does appear in
/etc/default/nfs-kernel-server, but doesn't seem to be used anywhere in
the systemd service file chain for nfsd:

  # 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/systemd/system/nfs-
config.service

includes this:

  Wants=nfs-config.service
  After=nfs-config.service

All nfs-config does is run this script:

  ExecStart=/usr/lib/systemd/scripts/nfs-utils_env.sh

and the script reads the /etc/default/nfs* files and then

  echo RPCNFSDARGS=\"$RPCNFSDOPTS ${RPCNFSDCOUNT:-8}\"

which then goes on the command line in the nfs-server service file:

  ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS

So the solution is to add this line to /etc/default/nfs-kernel-server:

  RPCNFSDOPTS="-N 2 -N 3"

Still unaccounted for is this variable in /etc/default/nfs-kernel-
server:

  # 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 at helios:~# cat /proc/fs/nfsd/versions
-2 -3 +4 +4.1 +4.2

** Affects: nfs-utils (Ubuntu)
     Importance: Undecided
         Status: New

** Description changed:

  The tl;dr: version:
  
- An RPCNFSARGS needs to be added to /etc/default/nfs-kernel-server file
- in order to facilitate turning off NFSv3, so that the rpcbind dependency
- goes away.  Meanwhile, this does appear in /etc/default/nfs-kernel-
- server, but doesn't seem to be used anywhere in the systemd service file
- chain for nfsd:
+ An RPCNFSARGS variable needs to be added to /etc/default/nfs-kernel-
+ server file in order to facilitate turning off NFSv3, so that the
+ rpcbind dependency goes away. Otherwise the user is forced to snoop
+ through all the related systemd service files (as I did) in order to
+ figure out how to turn off NFSv3.   Meanwhile, this does appear in
+ /etc/default/nfs-kernel-server, but doesn't seem to be used anywhere in
+ the systemd service file chain for nfsd:
  
-   # Runtime priority of server (see nice(1))
-   RPCNFSDPRIORITY=0
+   # 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/systemd/system/nfs-
  config.service
  
  includes this:
  
-   Wants=nfs-config.service
-   After=nfs-config.service
+   Wants=nfs-config.service
+   After=nfs-config.service
  
  All nfs-config does is run this script:
  
-   ExecStart=/usr/lib/systemd/scripts/nfs-utils_env.sh
+   ExecStart=/usr/lib/systemd/scripts/nfs-utils_env.sh
  
  and the script reads the /etc/default/nfs* files and then
  
-   echo RPCNFSDARGS=\"$RPCNFSDOPTS ${RPCNFSDCOUNT:-8}\"
+   echo RPCNFSDARGS=\"$RPCNFSDOPTS ${RPCNFSDCOUNT:-8}\"
  
  which then goes on the command line in the nfs-server service file:
  
-   ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS
+   ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS
  
  So the solution is to add this line to /etc/default/nfs-kernel-server:
  
-   RPCNFSDOPTS="-N 2 -N 3"
+   RPCNFSDOPTS="-N 2 -N 3"
  
  Still unaccounted for is this variable in /etc/default/nfs-kernel-
  server:
  
-   # Runtime priority of server (see nice(1))
-   RPCNFSDPRIORITY=0
+   # 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 at helios:~# cat /proc/fs/nfsd/versions
  -2 -3 +4 +4.1 +4.2

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to nfs-utils in Ubuntu.
https://bugs.launchpad.net/bugs/1898778

Title:
  RPCNFSDARGS missing from /etc/default/nfs-kernel-server

Status in nfs-utils package in Ubuntu:
  New

Bug description:
  The tl;dr: version:

  An RPCNFSARGS variable needs to be added to /etc/default/nfs-kernel-
  server file in order to facilitate turning off NFSv3, so that the
  rpcbind dependency goes away. Otherwise the user is forced to snoop
  through all the related systemd service files (as I did) in order to
  figure out how to turn off NFSv3.   Meanwhile, this does appear in
  /etc/default/nfs-kernel-server, but doesn't seem to be used anywhere
  in the systemd service file chain for nfsd:

    # 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/systemd/system/nfs-
  config.service

  includes this:

    Wants=nfs-config.service
    After=nfs-config.service

  All nfs-config does is run this script:

    ExecStart=/usr/lib/systemd/scripts/nfs-utils_env.sh

  and the script reads the /etc/default/nfs* files and then

    echo RPCNFSDARGS=\"$RPCNFSDOPTS ${RPCNFSDCOUNT:-8}\"

  which then goes on the command line in the nfs-server service file:

    ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS

  So the solution is to add this line to /etc/default/nfs-kernel-server:

    RPCNFSDOPTS="-N 2 -N 3"

  Still unaccounted for is this variable in /etc/default/nfs-kernel-
  server:

    # 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 at helios:~# cat /proc/fs/nfsd/versions
  -2 -3 +4 +4.1 +4.2

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1898778/+subscriptions



More information about the foundations-bugs mailing list