dm-multipath not autoloaded causes multipath to fail

Bug #120177 reported by Fabio Massimo Di Nitto
4
Affects Status Importance Assigned to Milestone
multipath-tools (Ubuntu)
Fix Released
Undecided
Fabio Massimo Di Nitto
Feisty
Fix Released
Undecided
Fabio Massimo Di Nitto

Bug Description

Binary package hint: multipath-tools

In the process of fixing #98518 in feisty, we introduced a corner case bug.

Installing multipath-tools alone (without any other device-mapper client),
will make multipathd fail because dm-multipath is not autoloaded.

The fix is very simple by adding a udev rule as fixed in gutsy to modprobe
the proper module.

Impact: multipath will not work if dm-multipath is not loaded
Fix: make sure to load dm-multipath as soon as possible if the package is installed and this can be achieved with udev rules.
Patch: in attachement
How to reproduce: install clean feisty server (no lvm or mdadm or crypto). Install multipath-tools and see that it will fail to start. modprobe dm-multipath and start.. it will work.

Fabio

Changed in multipath-tools:
assignee: nobody → fabbione
Revision history for this message
Fabio Massimo Di Nitto (fabbione) wrote :
description: updated
Revision history for this message
Fabio Massimo Di Nitto (fabbione) wrote :

Fixed in gutsy... fehhh LP is confusing :)

Changed in multipath-tools:
assignee: nobody → fabbione
status: Unconfirmed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

That looks weird. You attempt a modprobe on each and every block device addition/change? That's going to be a lot, and is certainly unnecessary.

Why not just add/remove it from /etc/modules in postinst/prerm?

Changed in multipath-tools:
status: Unconfirmed → Needs Info
Revision history for this message
Martin Pitt (pitti) wrote :

Approved after discussion in #ubuntu-devel.

<Keybuk> pitti: *shrug* we attempt a modprobe on each and every device change, pretty much <g>

Changed in multipath-tools:
status: Needs Info → In Progress
Revision history for this message
Fabio Massimo Di Nitto (fabbione) wrote :

Package uploaded in feisty-proposed.

Fabio

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into feisty-proposed, please go ahead with QA testing.

Changed in multipath-tools:
status: In Progress → Fix Committed
Revision history for this message
Fabio Massimo Di Nitto (fabbione) wrote :

multipath-tools (0.4.7-1.1ubuntu3.1) feisty-proposed; urgency=low

  * Fix udev rule to modprobe dm-multipath.

  (Closes LP: #120177)

 -- <email address hidden> (Fabio M. Di Nitto) Wed, 13 Jun 2007 12:26:24 +0200

Changed in multipath-tools:
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

It's just in proposed, not yet in -updates.

Changed in multipath-tools:
status: Fix Released → Fix Committed
Revision history for this message
Michael Vogt (mvo) wrote :

Please add detailled instructions how to reproduce the bug. These should allow someone who is not familiar with the affected package to reproduce the bug and verify that the updated package fixes the problem.

Thanks,
 Michael

Revision history for this message
Michael Vogt (mvo) wrote :

I did a sru verfication based on the above instructions.

I installed multipath-tools on a fesh feisty install. The package installed and ps ax|grep multipathd showed no daemon runing. I can installed the package from feisty-proposed. The installation failed with the following error:

[..]
Preparing to replace multipath-tools 0.4.7-1.1ubuntu3 (using .../multipath-tools_0.4.7-1.1ubuntu3.1_i386.deb) ...
Stopping multipath daemoninvoke-rc.d: initscript multipath-tools, action "stop" failed.
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
Stopping multipath daemoninvoke-rc.d: initscript multipath-tools, action "stop" failed.
dpkg: error processing /var/cache/apt/archives/multipath-tools_0.4.7-1.1ubuntu3.1_i386.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
Starting multipath daemon.
Errors were encountered while processing:
 /var/cache/apt/archives/multipath-tools_0.4.7-1.1ubuntu3.1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
egon@egon-desktop:~$

I think we need to fix this issue before this can go into -updates.

I can confirm that when no prior multipath-tools package is installed the version from feisty-proposed works as expected.

Changed in multipath-tools:
status: Fix Committed → In Progress
Revision history for this message
Fabio Massimo Di Nitto (fabbione) wrote :

New debdiff (feisty -> feisty-proposed) in attachment that addresses all the corner cases spotted by Michael.

Also uploaded to feisty-proposed pending review/approval.

Fabio

Revision history for this message
Martin Pitt (pitti) wrote :

Fabio,

shouldn't you use lt-nl instead of lt? Otherwise you'll run the special case instead of #DEBHELPER# on a fresh installation.

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into feisty-proposed, please test.

Changed in multipath-tools:
status: In Progress → Fix Committed
Revision history for this message
Fabio Massimo Di Nitto (fabbione) wrote :

multipath-tools (0.4.7-1.1ubuntu3.2) feisty-proposed; urgency=low

  * Fix preinst script to modprobe dm-multipath. This will make sure
    that multipathd will be able to start.

  * Fix init script not to die on stop if multipathd is not running.

  * Add prerm script to not fail when upgrading from a broken version of
    multipathd.

  (Closes LP: #120177)

 -- <email address hidden> (Fabio M. Di Nitto) Fri, 10 Aug 2007 13:03:39 +0200

Changed in multipath-tools:
status: Fix Committed → Fix Released
Martin Pitt (pitti)
Changed in multipath-tools:
status: Fix Released → Fix Committed
Revision history for this message
Fabio Massimo Di Nitto (fabbione) wrote :

Martin,

just for the record (as we discussed on IRC) the lt-nl is pointless because on fresh install prerm is not executed. Even if it was executed, the special case would do the rigth thing by checking if the init script is there and executable (it's not) and that the daemon is not running so the stop action will fail properly.

Fabio

Revision history for this message
Fabio Massimo Di Nitto (fabbione) wrote :

Packages from -proposed were also tested at the time.

Fabio

Revision history for this message
Martin Pitt (pitti) wrote :

Copied to feisty-updates. Thanks!

Changed in multipath-tools:
status: Fix Committed → Fix Released
Revision history for this message
Pascal de Bruijn (pmjdebruijn) wrote :

Please note that now the package will fail to install on (hardy) when the dm-multipath module is not available, for example on a monolithing kernel.

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.