nfs-kernel-server does not start on boot because portmap is not running

Bug #875471 reported by ejprinz
58
This bug affects 9 people
Affects Status Importance Assigned to Milestone
rpcbind (Ubuntu)
Fix Released
High
Steve Langasek
Oneiric
Fix Released
High
Steve Langasek
Precise
Fix Released
High
Steve Langasek

Bug Description

SRU justification: unreliable start of NFS-related services (client and server) when /var is a separate partition, due to oversight in /run handling in the rpcbind package.

Regression potential: minimal.

Test case:
1) configure a system with /var as a separate mount point and install rpcbind.
2) reboot
3) verify that rpcbind is not started after boot.
4) upgrade to the SRU version
5) reboot
6) verify that rpcbind is now started reliably.

I have a fully upgraded 11.10 desktop release and installed nfs-common, nfs-kernel-server, and rpcbind which provides portmap. After I boot up, nfs-kernel-server is not running. When I try to start nfs-kernel-server with
service nfs-kernel-server-start
I get the error message that portmap is not running. But, with
service portmap status
I get the message that portmap is running. To start nfs-kernel-server, I have to do:
service statd start
service portmap stop
service portmap start
service nfs-kernel-server start
This may be related to the fact that the script /etc/init/portmap-wait.conf portmap returns "2" on exit which I think confuses the "system ... status" command.
Also, in /etc/init/statd.conf there is a reference to a file "portmap-boot.conf" but that file is missing in /etc/init.

A temporary workaround may be to put the lines
service statd start
service portmap stop
service portmap start
service nfs-kernel-server start
into /etc/rc.local

Note that I have /, /boot, /var, /tmp, /usr in different partitions. Not sure this makes a difference.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: nfs-kernel-server 1:1.2.4-1ubuntu2
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic i686
NonfreeKernelModules: nvidia
ApportVersion: 1.23-0ubuntu3
Architecture: i386
Date: Sat Oct 15 22:53:34 2011
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: nfs-utils
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
ejprinz (ejprinz) wrote :
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
Revision history for this message
Chris (gentlec) wrote :

I have a fresh installation of 11.10 64 bit. I can confirm that rpcbind is not starting at boot time. In my case, I needed to mount some NFS directories from another server. Since rpcbind doesn't start, statd fails. This, in turn, causes the NFS mounts to fail. I've tried tracking through the rpcbind startup stuff but I'm not very familiar with upstart. As suggested above, the workaround is to start the required services manually from /etc/rc.local.

Revision history for this message
ejprinz (ejprinz) wrote :

I've confirmed with another machine where I have only / and /tmp on separate partitions that rpcbind starts OK and therefore nfs-kernel-server starts OK. I then took another machine (11.10 64 bit) where /var and /tmp and /usr are on different partitions from / that rpcbind doesn't start either. So, it looks like the upstart sequence doesn't work if either /var or /tmp or /usr (I suspect it's /var) is on a different partition.

Revision history for this message
Chris (gentlec) wrote :

I have /var on a separate partition also on the machine where I'm seeing the failure.

Revision history for this message
Steve Langasek (vorlon) wrote :

Confirmed; even though the real location of the state files is now under run, rpcbind is using the /var/run compatibility symlink to get there, which isn't guaranteed to exist until /var is mounted.

This needs to be fixed by having rpcbind use /run directly, and depend on the necessary package versions to ensure its existence on upgrade.

affects: nfs-utils (Ubuntu) → rpcbind (Ubuntu)
Changed in rpcbind (Ubuntu):
assignee: nobody → Steve Langasek (vorlon)
importance: Undecided → High
status: Confirmed → Triaged
Changed in rpcbind (Ubuntu Oneiric):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Steve Langasek (vorlon)
milestone: none → oneiric-updates
Steve Langasek (vorlon)
description: updated
Steve Langasek (vorlon)
Changed in rpcbind (Ubuntu Oneiric):
status: Triaged → In Progress
Changed in rpcbind (Ubuntu Precise):
status: Triaged → In Progress
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello ejprinz, or anyone else affected,

Accepted rpcbind into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in rpcbind (Ubuntu Oneiric):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package rpcbind - 0.2.0-6ubuntu3.1

---------------
rpcbind (0.2.0-6ubuntu3.1) oneiric-proposed; urgency=low

  * Fix to look directly in /run instead of via the /var/run symlink which
    is not guaranteed to be present yet when the job starts when /var is a
    separate partition; and include a versioned dependency on initscripts
    to ensure proper upgrade ordering. LP: #875471.
 -- Steve Langasek <email address hidden> Mon, 17 Oct 2011 18:58:41 +0000

Changed in rpcbind (Ubuntu Precise):
status: In Progress → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote :

rpcbind 0.2.0-6ubuntu3.1 copied to precise.

Revision history for this message
David Bell (evad) wrote :

This fix also fixes a problem I've been having trying to get NIS to work on Ubuntu 11.10, please push this update from proposed into main asap :)

Revision history for this message
Steve Langasek (vorlon) wrote :

Fix confirmed in duplicate bug #877485.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Marco Lazzaroni (marcolazzaroni) wrote :

I have a separate /var partition and I confirm that the fixed rpcbind package from oneiric-proposed solves the problem.

Revision history for this message
Markus Berndt (markus-berndt) wrote :

the package oneiric-proposed solves the problem for me

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

This bug was fixed in the package rpcbind - 0.2.0-6ubuntu3.1

---------------
rpcbind (0.2.0-6ubuntu3.1) oneiric-proposed; urgency=low

  * Fix to look directly in /run instead of via the /var/run symlink which
    is not guaranteed to be present yet when the job starts when /var is a
    separate partition; and include a versioned dependency on initscripts
    to ensure proper upgrade ordering. LP: #875471.
 -- Steve Langasek <email address hidden> Mon, 17 Oct 2011 18:58:41 +0000

Changed in rpcbind (Ubuntu Oneiric):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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