`/etc/init.d/nfs-kernel-server status` fails to report when nfs-kernel-server is stopped

Bug #499897 reported by Remi Broemeling
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nfs-utils (Ubuntu)
New
Undecided
Unassigned

Bug Description

--- SNIP ---

root@boot1:/etc/init.d# lsb_release -rd
Description: Ubuntu 8.04.3 LTS
Release: 8.04
root@boot1:/etc/init.d# apt-cache policy nfs-kernel-server
nfs-kernel-server:
  Installed: 1:1.1.2-2ubuntu2.2
  Candidate: 1:1.1.2-2ubuntu2.2
  Version table:
 *** 1:1.1.2-2ubuntu2.2 0
        500 http://archive.ubuntu.com hardy-updates/main Packages
        500 http://security.ubuntu.com hardy-security/main Packages
        100 /var/lib/dpkg/status
     1:1.1.2-2ubuntu2 0
        500 http://archive.ubuntu.com hardy/main Packages
root@boot1:/etc/init.d# /etc/init.d/nfs-kernel-server start
 * Exporting directories for NFS kernel daemon... [ OK ]
 * Starting NFS kernel daemon [ OK ]
root@boot1:/etc/init.d# /etc/init.d/nfs-kernel-server status
nfsd running
root@boot1:/etc/init.d# /etc/init.d/nfs-kernel-server stop
 * Stopping NFS kernel daemon [ OK ]
 * Unexporting directories for NFS kernel daemon... [ OK ]
root@boot1:/etc/init.d# /etc/init.d/nfs-kernel-server status
nfsd running

--- SNIP ---

This is obviously incorrect. More-over, it means that this script cannot be properly used with heartbeat, as heartbeat will think that the resource is always running and therefore will not execute it on take-over.

The problem lies in the /etc/init.d/nfs-kernel-server script, where it uses `pidof nfsd` to check for running nfs-servers. The command `/etc/init.d/nfs-kernel-server stop` fails to stop the NFSd kernel servers, and therefore `pidof nfsd` always returns true. Suggested fix is to change `pidof nfsd` to be `pidof rpc.mountd`.

Revision history for this message
Remi Broemeling (remi-nexopia) wrote :

... alternative fix, of course, would be to have `/etc/init.d/nfs-kernel-server stop` actually stop all of the "[nfsd]" kernel servers. This would likely be the better path, actually, but I am unsure as to how to make that happen.

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.