Bug 436335

Summary: mkinitrd should not depend on device-mapper-multipath
Product: Red Hat Enterprise Linux 5 Reporter: Bryn M. Reeves <bmr>
Component: mkinitrdAssignee: Peter Jones <pjones>
Status: CLOSED CANTFIX QA Contact:
Severity: medium Docs Contact:
Priority: high    
Version: 5.1CC: tao
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-07-15 17:33:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to check for static multipath tools & abort if not present
none
Patch to check for static multipath tools & warn/fallback to single path if not present none

Description Bryn M. Reeves 2008-03-06 16:13:41 UTC
Description of problem:
It is sometimes desirable to completely disable device-mapper-multipath on a
system (for example when using a 3rd party multipathing solution, or when
building a minimal system with no need for this functionality). The most
straightforward and effective route to do this is to remove the entire
device-mapper-multipath package from the system.

This was possible in RHEL4 but is no longer simple in RHEL5 due to a mkinitrd
dependency:

# rpm -q --requires mkinitrd | grep multipath
device-mapper-multipath >= 0.4.7-9
device-mapper-multipath >= 0.4.7-9

$ grep 'Requires.*multipath' mkinitrd.spec
Requires: device-mapper-multipath >= 0.4.7-9, kpartx >= 0.4.7-9

This was introduced with the multipath-boot-from-SAN support in RHEL-5.1:

* Tue Jun 19 2007 David Cantrell <dcantrell> - 5.1.19.6-6
- Require device-mapper-multipath and kpartx packages
  Related: rhbz#185852

This was added as a version-specific Requires in order to make sure that the
*.static versions of the mpath_prio callouts & multipath itself. Older versions
of the packages do not provide these and cannot be used in the RHEL5-style
initramfs.

Version-Release number of selected component (if applicable):
5.1.19.6-25.EL

How reproducible:
100%

Steps to Reproduce:
1. rpm -e device-mapper-multipath
  
Actual results:
# rpm -e device-mapper-multipath
error: Failed dependencies:
        device-mapper-multipath >= 0.4.7-9 is needed by (installed)
mkinitrd-5.1.19.6-19.x86_64
        device-mapper-multipath >= 0.4.7-9 is needed by (installed)
mkinitrd-5.1.19.6-19.i386


Expected results:
# rpm -e device-mapper-multipath
#

Additional info:
Changing this would seem to need a runtime check for the presence of the static
versions of multipath-tools. This means either aborting a mkinitrd run or
abandoning the attempt to make a multipath initramfs and continuing to build a
non-mpath image.

Comment 2 Bryn M. Reeves 2008-03-18 12:39:56 UTC
Created attachment 298386 [details]
Patch to check for static multipath tools & abort if not present

Add a runtime check to mkinitrd and abort if static multipath tools are not
present.

Comment 3 Bryn M. Reeves 2008-03-18 12:41:23 UTC
Created attachment 298387 [details]
Patch to check for static multipath tools & warn/fallback to single path if not present

Add a runtime check for static multipath tools to mkinitrd and warn but
continue to create a non-multipath image.

Comment 4 Bryn M. Reeves 2008-03-18 12:44:13 UTC
Although there are other fatal errors in mkinitrd that will abort the script
they seem to be for somewhat less likely error cases; the patch in comment #2
will e.g. prevent automatic kernel updates from working (since building the
image will abort when new-kernel-pkg runs mkinitrd).

The second patch in comment #3 avoids this by issuing a warning & falling back
to a non-multipath image (similar to the warning given when a module does not
exist for the target kernel).


Comment 6 RHEL Program Management 2008-06-02 20:15:21 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 8 Peter Jones 2008-07-15 17:33:33 UTC
There's really no way to do this correctly until we can specify ordering
constraints that /aren't/ dependencies in rpm packages.  If we're /using/
multipath, then we need to have it installed before mkinitrd is.  The only way
to constrain that currently is to have the package require it.