using a blacklist and a blacklist_exception section results in multipathd filtering out paths it shouldn't

Bug #789229 reported by Craig Magina
22
This bug affects 1 person
Affects Status Importance Assigned to Milestone
multipath-tools (Ubuntu)
Fix Released
High
Unassigned
Lucid
Won't Fix
High
Craig Magina
Maverick
Invalid
High
Craig Magina
Natty
Won't Fix
High
Craig Magina

Bug Description

Binary package hint: multipath-tools

The issue is due to a bug in some if/then logic in blacklist.c:_filter_path resulting in the routine returning a value other then 0 for anything found on the exceptions list.

SRU Justification:
1. Impact: a config which (correctly) finds an entry both in blacklist and blacklist exceptions will not honor the exception
2. How bug was addressed: an upstream fix was pulled in. The root cause was that return values from functions checking existence in blacklists were being misinterpreted.
3. Minimal patch: see debdiff in comment #6.
4. TEST CASE: Create a multipath config with /dev/sda in both blacklist and blacklist exception. /dev/sda won't be used.
5. Regression potential: this commit has been upstream since 2007, so should cause no regressions.

Tags: patch testcase
Revision history for this message
Craig Magina (craig.magina) wrote :
Revision history for this message
Craig Magina (craig.magina) wrote :
tags: added: patch
Changed in multipath-tools (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Changed in multipath-tools (Ubuntu Lucid):
status: New → Confirmed
Changed in multipath-tools (Ubuntu Maverick):
status: New → Confirmed
Changed in multipath-tools (Ubuntu Natty):
status: New → Confirmed
importance: Undecided → High
Changed in multipath-tools (Ubuntu Maverick):
importance: Undecided → High
Changed in multipath-tools (Ubuntu Lucid):
importance: Undecided → High
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Hi Craig,

actually, I as about to upload this, but when checking the git commit, it also fixes up main.c:

diff --git a/multipathd/main.c b/multipathd/main.c
index f887ad0..e65834a 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -368,7 +368,7 @@ ev_add_path (char * devname, struct vectors * vecs)
                condlog(0, "%s: failed to get path uid", devname);
                return 1; /* leave path added to pathvec */
        }
- if (filter_path(conf, pp)){
+ if (filter_path(conf, pp) > 0){
                int i = find_slot(vecs->pathvec, (void *)pp);
                if (i != -1)
                        vector_del_slot(vecs->pathvec, i);
@@ -1062,7 +1062,7 @@ configure (struct vectors * vecs, int start_waiters)
        path_discovery(vecs->pathvec, conf, DI_ALL);

        vector_foreach_slot (vecs->pathvec, pp, i){
- if (filter_path(conf, pp)){
+ if (filter_path(conf, pp) > 0){
                        vector_del_slot(vecs->pathvec, i);
                        free_path(pp);
                        i--;

Is there a reason why you dropped that from the patch, or should it be added to this fix?

Revision history for this message
Craig Magina (craig.magina) wrote :

I didn't see the fix in the git tree and took the patch from the mailing list, which was obviously missing a few things. Not sure why I missed this commit, good find.

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

This bug was fixed in the package multipath-tools - 0.4.8-14ubuntu11

---------------
multipath-tools (0.4.8-14ubuntu11) oneiric; urgency=low

  * Fixes some return logic issues in the blacklist.c:_filter_path function
    where using blacklist and blacklist_exceptions would cause multipathd to
    improperly filter paths. (LP: #789229)
    - The patch was created by Christophe Varoqui in 2007.
      + http://www.redhat.com/archives/dm-devel/2007-November/msg00054.html
      + 0013-libmultipath-filter_path-fix_blacklist_filter_exit.patch
    - [serge-hallyn] swap in the whole upstream git commit and call it
      0013-blacklist_exception_issues.patch.
 -- Craig Magina <email address hidden> Fri, 27 May 2011 11:47:19 -0400

Changed in multipath-tools (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :
description: updated
Revision history for this message
Clint Byrum (clint-fewbar) wrote : Please test proposed package

Accepted multipath-tools into lucid-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 multipath-tools (Ubuntu Lucid):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

The upload to lucid-proposed was deleted, as the version was higher than that of the dev release, oneiric. If you happened to download that version while it was briefly available, you should manually downgrade back to 0.4.8-14ubuntu4, otherwise you run the risk of not updating this package on an upgrade to maverick.

Changed in multipath-tools (Ubuntu Lucid):
status: Fix Committed → Triaged
tags: removed: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote :

Likewise, I rejected the maverick/natty-proposed uploads. Please reupload with a version that is smaller than oneiric, e. g. 0.4.8-14ubuntu11~10.10 and 0.4.8-14ubuntu11~11.04 (if the uploads are by and large straight backports).

Changed in multipath-tools (Ubuntu Lucid):
assignee: nobody → Craig Magina (craig.magina)
Changed in multipath-tools (Ubuntu Lucid):
status: Triaged → In Progress
Revision history for this message
Craig Magina (craig.magina) wrote :
Changed in multipath-tools (Ubuntu Maverick):
assignee: nobody → Craig Magina (craig.magina)
status: Confirmed → In Progress
Revision history for this message
Craig Magina (craig.magina) wrote :
Changed in multipath-tools (Ubuntu Natty):
status: Confirmed → In Progress
assignee: nobody → Craig Magina (craig.magina)
Revision history for this message
Craig Magina (craig.magina) wrote :
tags: added: verification-needed
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Hi Craig, the verification-needed tag is only for bugs that have already been accepted into -proposed.

What you need is sponsorship. The procedure is here:

https://wiki.ubuntu.com/SponsorshipProcess

The next step is to subscribe ubuntu-sponsors to the bug, which I've done so that it appears in the sponsorship queue right away.

tags: removed: verification-needed
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

As a follow up, first I forgot to say, thanks for the great work.

I took a look at the patches, and there are some fixes necessary.

First off, make sure you start from the latest version of the package for the desired release. multipath-tools has been updated in lucid, maverick, and natty, so you need to get the source from there rather than the release pocket.

One way to make sure you have the latest is to use 'rmadison':

$ rmadison multipath-tools
multipath-tools | 0.4.8-7ubuntu2 | hardy | source, amd64, i386
multipath-tools | 0.4.8-14ubuntu4 | lucid | source, amd64, i386
multipath-tools | 0.4.8-14ubuntu4 | maverick | source, amd64, i386
multipath-tools | 0.4.8-14ubuntu4.10.04.2 | lucid-updates | source, amd64, i386
multipath-tools | 0.4.8-14ubuntu4.10.10.2 | maverick-updates | source, amd64, i386
multipath-tools | 0.4.8-14ubuntu10 | natty | source, amd64, i386
multipath-tools | 0.4.8-14ubuntu10.1 | natty-updates | source, amd64, i386
multipath-tools | 0.4.9-2ubuntu1 | oneiric | source, amd64, i386

So first off, you'll need to update your debdiffs to take all of these updates into account. Make sure the version number is one that fits into the scheme you already see above. So you will want your lucid updated to be

0.4.8-14ubuntu4.10.04.3

and maverick

0.4.8-14ubuntu4.10.10.3

and natty

0.4.8-14ubuntu10.2

Also make sure you specify 'release-proposed' in the changelog.

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Third comment is the charm. I've unsubscribed ubuntu-sru, ubuntu-sponsors, and the SRU verification team. Please re-subscribe ubuntu-sponsors when you've corrected the issues above.

Revision history for this message
Craig Magina (craig.magina) wrote :
Revision history for this message
Craig Magina (craig.magina) wrote :
Revision history for this message
Craig Magina (craig.magina) wrote :
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Thanks Craig, well done! I sponsored the uploads to lucid,maverick,and natty -proposed. Unsubsribing sponsors, re-subscribing ubuntu-sru.

Revision history for this message
Chris Halse Rogers (raof) wrote :

Hello Craig, or anyone else affected,

Accepted multipath-tools into lucid-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 multipath-tools (Ubuntu Lucid):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Chris Halse Rogers (raof) wrote :

Hello Craig, or anyone else affected,

Accepted multipath-tools into maverick-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 multipath-tools (Ubuntu Maverick):
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

There have been two recent uploads of multipath-tools into natty-proposed, one for this bug and one for bug 829061. I rejected them both, please reupload one package which fixes them both. Thanks!

tags: added: testcase
Revision history for this message
JC Hulce (soaringsky) wrote :

This bug affects Ubuntu 10.10, Maverick Meerkat. Maverick has reached end-of-life and is no longer supported, so I am closing the bugtask for Maverick. Please upgrade to a newer version of Ubuntu.
More information here: https://lists.ubuntu.com/archives/ubuntu-announce/2012-April/000158.html

Changed in multipath-tools (Ubuntu Maverick):
status: Fix Committed → Invalid
Revision history for this message
Brian Murray (brian-murray) wrote : Verification still needed

The fix for this bug has been awaiting testing feedback in the -proposed repository for lucid for more than 90 days. Please test this fix and update the bug appropriately with the results. In the event that the fix for this bug is still not verified 15 days from now, the package will be removed from the -proposed repository.

Changed in multipath-tools (Ubuntu Natty):
status: In Progress → Won't Fix
tags: added: removal-candidate
Revision history for this message
Brian Murray (brian-murray) wrote :

The version of multipath-tools in lucid-proposed has been removed as this bug report was not verified in a timely fashion.

Changed in multipath-tools (Ubuntu Lucid):
status: Fix Committed → Triaged
tags: removed: verification-needed
tags: removed: removal-candidate
Revision history for this message
Rolf Leggewie (r0lf) wrote :

lucid has seen the end of its life and is no longer receiving any updates. Marking the lucid task for this ticket as "Won't Fix".

Changed in multipath-tools (Ubuntu Lucid):
status: Triaged → Won't Fix
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.