nfs-kernel-server init script calls non-existent /usr/bin/rpcinfo, failure disables NFSv3

Bug #951925 reported by Neil Bertram
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
nfs-utils (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

The /etc/init.d/nfs-kernel-server script in Precise has a reference at line 115 to $PREFIX/bin/rpcinfo:

$PREFIX/bin/rpcinfo -u localhost nfs 3 >/dev/null 2>&1 ||
    RPCMOUNTDOPTS="$RPCMOUNTDOPTS --no-nfs-version 3"

Where $PREFIX is /usr, making the path /usr/bin/rpcinfo

Since this command doesn't exist, RPCMOUNTDOPTS always includes --no-nfs-version 3, meaning you can never run with NFSv3 support.

In Precice, the rpcbind package provides the rpcinfo binary, but it's in /usr/sbin/rpcinfo, not /usr/bin/rpcinfo. In Oneiric both rpcbind and libc-bin provided rpcinfo binaries, with the latter being /usr/bin/rpcinfo. It appears libc-bin no longer includes rpcinfo in Precise.

Elsewhere in the same init script (eg. line 88) reference is made to /usr/sbin/rpcinfo as well, so looks like it was just a patchy job updating this init script at some point.

Symlinking /usr/sbin/rpcinfo into /usr/bin/rpcinfo fixed the problem for me, but obviously the init script needs updating.

This is on a complete fresh install of Precise server beta1 with latest packages from the repos.

Environment:

Description: Ubuntu precise (development branch)
Release: 12.04

nfs-kernel-server:
  Installed: 1:1.2.5-3ubuntu1
  Candidate: 1:1.2.5-3ubuntu1
  Version table:
 *** 1:1.2.5-3ubuntu1 0
        500 http://nz.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
libc-bin:
  Installed: 2.15-0ubuntu5
  Candidate: 2.15-0ubuntu5
  Version table:
 *** 2.15-0ubuntu5 0
        500 http://nz.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
rpcbind:
  Installed: 0.2.0-7ubuntu1
  Candidate: 0.2.0-7ubuntu1
  Version table:
 *** 0.2.0-7ubuntu1 0
        500 http://nz.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
dexter1 (dexter1) wrote :

just to report that i've been hit by the exact same bug. Today I found that$PREFIX/bin/rpcinfo which /etc/init.d/nfs-kernel-server calls does not exist so i fixed it by changing it into $PREFIX/sbin/rpcinfo.

One can verify the fix by doing ps -ledaf | grep rpc.mountd and checking its options. It should not include the option "--no-nfs-version 3"

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nfs-utils (Ubuntu):
status: New → Confirmed
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.