rpc.mountd starts without NFSv3 support when not listening on localhost

Bug #897644 reported by Christian Affolter
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
nfs-utils (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

The nfs-kernel-server init script disables NFSv3 support when the rpc.nfsd daemon was bound to a specific IP address other than 127.0.0.1 or localhost using the --host <IP> argument.

Steps to reproduce:
1) Edit /etc/default/nfs-kernel-server and bind rpc.nfsd to a specific IP address:
# Options for rpc.nfsd.
RPCNFSDOPTS="--host 192.168.1.XYZ"

2) Restart the NFS kernel daemon service
service nfs-kernel-server restart

3) The rpc.mountd has NFSv3 disabled
ps -C rpc.mountd -o cmd
/usr/sbin/rpc.mountd --port 32767 --no-nfs-version 3

The problem happens in the /etc/init.d/nfs-kernel-server init script on line 115-116 during the rpcinfo check:
                 $PREFIX/bin/rpcinfo -u localhost nfs 3 >/dev/null 2>&1 ||
                    RPCMOUNTDOPTS="$RPCMOUNTDOPTS --no-nfs-version 3"

Environment informations:
lsb_release -rd
Description: Ubuntu 11.10
Release: 11.10

apt-cache policy nfs-kernel-server
nfs-kernel-server:
  Installed: 1:1.2.4-1ubuntu2
  Candidate: 1:1.2.4-1ubuntu2
  Version table:
 *** 1:1.2.4-1ubuntu2 0
        500 http://ch.archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages
        100 /var/lib/dpkg/status

Related branches

Steve Langasek (vorlon)
Changed in nfs-utils (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Christian Reis (kiko) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nfs-utils - 1:1.2.8-6ubuntu1

---------------
nfs-utils (1:1.2.8-6ubuntu1) trusty; urgency=medium

  * Merge from Debian unstable, remaining changes:
    - debian/nfs-common.{statd,statd-mounting,gssd,idmapd}.upstart,
      debian/control, debian/nfs-common.{preinst,postinst,prerm,postrm},
      debian/rules: drop nfs-common init script in favor of upstart jobs.
    - Depend on rpcbind (>= 0.2.0-6ubuntu1) for upstart support.
    - Depend on mountall (>= 2.41) to avoid deadlocks on boot.
    - debian/nfs-common.default: always start idmapd automatically; drop
      the configuration option.
    - nfs-kernel-server.init: Unmount nfsd fs when init script stops
    - Allow issuing options to rpc.nfsd
    - Add "-e" (ticket expiry is error) option to rpc.gssd to prevent hangs
      due to EKEYEXPIRED error from kernel on ticket expiry.

nfs-utils (1:1.2.8-6) unstable; urgency=medium

  * Fix the sec=krb5* handling in debian/nfs-common.init to properly match
    all cases. Closes: #715478.
  * Move the rpc.svcgssd(8) symlink to nfs-common along with the rest of it,
    and add the Replaces: on old versions of nfs-kernel-server to support
    upgrades properly. Closes: #731479.
  * Only start nfs-common in runlevel S; it doesn't need to be started
    more than once (and startpar won't actually run it more than once,
    anyway). Closes: #510528.
  * Fix obsolete invocations of update-rc.d by switching nfs-common to use
    dh_installinit. Closes: #736059.
  * Tweak nfs-common preinst to not remove nfs state files except on package
    removal (i.e., these should not be removed when the package is
    deconfigured temporarily).
  * debian/nfs-kernel-server.init: don't try to check for nfsv3 configuration
    in nfsd and pass --no-nfs-version 3 to mountd if absent; the check is
    buggy and impossible to make reliable, and there's no reason to single
    out NFSv3 here (and the original rationale for this behavior is lost).
    Closes LP: #897644, LP: #1284210.
  * Provide quoted entries by default in debian/nfs-kernel-server.default,
    consistent with other default files, so that users who edit the file to
    add multiple options don't accidentally cause shell syntax bugs.
 -- Steve Langasek <email address hidden> Tue, 25 Feb 2014 09:18:47 -0800

Changed in nfs-utils (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.