nbd-client doesn't stop on reboot or halt

Bug #822304 reported by Schöner, Axel
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
nbd (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

OS: Ubuntu Natty (Ubuntu 11.04) 32+64 Bit
Affected versions: 1:2.9.16-7.1ubuntu2 1:2.9.23-3ubuntu1 perhaps some others.

When rebooting or shutdown a system with nbd-client active, then the clients doesn't close the connection properly to the server -> postrun can not be used. Server-log shows entries like this: "Read failed: Inappropriate ioctl for device", "Child exited with 1".
By manual disconnect the share (nbd-client -d share) there is no problem.

The problem is, that in /etc/rc0.d and /etc/rc6.d are faulty links: "S34nbd-client -> ../init.d/nbd-client".
The correct links should look like this: "K59nbd-client -> ../init.d/nbd-client".

The solution is very easy:
"update-rc.d -f nbd-client remove"
"update-rc.d nbd-client start 41 S . stop 59 0 6 ."

The package-maintainer should correct it.

Related branches

Revision history for this message
Wouter Verhelst (wouter-debian) wrote : Re: [Bug 822304] [NEW] nbd-client doesn't stop on reboot or halt

On Sun, Aug 07, 2011 at 03:01:43PM -0000, Schöner, Axel wrote:
> The solution is very easy:
> "update-rc.d -f nbd-client remove"
> "update-rc.d nbd-client start 41 S . stop 59 0 6 ."

The problem is this:

override_dh_installinit:
        dh_installinit -p nbd-client --no-start -- start 41 S . start 34 0 6 .
        dh_installinit -p nbd-server

in debian/rules. That should, of course, be 'stop 34 0 6' at the end.

This bug was most likely introduced when I modified nbd to use a
debhelper 7 'dh' style debian/rules file, which happened at a time when
Debian had already migrated to using insstyle by default to create the
links. In that mode, the symlinks aren't chosen from the update-rc.d
command line, but from special comments in the init script instead; this
is why the bug wasn't found earlier. I suppose this also means that the
manually-specified symlink order in Debian isn't being maintained
anymore.

I've committed a change to my local copy of the debian/rules file so
that with my next upload, this problem should not occur anymore. It
might be prudent for Ubuntu to do an update to fix this as well, but I
don't know what Ubuntu's release policies are.

--
The volume of a pizza of thickness a and radius z can be described by
the following formula:

pi zz a

Revision history for this message
Schöner, Axel (axel-schoener) wrote :

Thanks so far ;-)

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

This bug was fixed in the package nbd - 1:2.9.24-3ubuntu1

---------------
nbd (1:2.9.24-3ubuntu1) precise; urgency=low

  * Merge from debian unstable. Remaining changes:
    - Drop /etc/modprobe.d/nbd-client; the kernel default is already
      appropriate. Ubuntu-specific change.
      + Modify debian/nbd-client.dirs
      + Remove debian/nbd-client.modprobe
      + Add debian/nbd-client.preinst

nbd (1:2.9.24-3) unstable; urgency=low

  * Actually add the includedir statement to the default configuration
    file, so that it can be used. D'oh.

nbd (1:2.9.24-2) unstable; urgency=low

  * Cherry-pick 7eca128845ed86754b526bf7f920ad65b95c931d from git HEAD
    to fix includedir configuration statement on kFreeBSD.

nbd (1:2.9.24-1) unstable; urgency=low

  * New upstream release.
    - Adds support for directory of config file snippets, by request of
      Vagrant Cascadian.
  * Fix syntaxis of test for nbd-client connectivity. Closes: #641882.

nbd (1:2.9.23-4) unstable; urgency=low

  * Fix dh_installinit invocation. LP: #822304.
  * Properly quote variables in nbd-client initscript and postinst.
    Closes: #636401. Minor change to the patch: do not quote NBD_EXTRA
    variables, as that one is supposed to be able to contain multiple
    values.
  * Also properly quote nbd-client.config. Closes: #628388.
  * Improve error handling in nbd-client initscript. Closes: #628389
 -- Stephane Graber <email address hidden> Thu, 20 Oct 2011 10:27:44 -0400

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