This service will be undergoing maintenance at 20:00 UTC, 2017-04-03. It is expected to last about 30 minutes
Bug 436335 - mkinitrd should not depend on device-mapper-multipath
mkinitrd should not depend on device-mapper-multipath
Status: CLOSED CANTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: mkinitrd (Show other bugs)
5.1
All Linux
high Severity medium
: rc
: ---
Assigned To: Peter Jones
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-06 11:13 EST by Bryn M. Reeves
Modified: 2010-10-22 19:04 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-07-15 13:33:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to check for static multipath tools & abort if not present (619 bytes, patch)
2008-03-18 08:39 EDT, Bryn M. Reeves
no flags Details | Diff
Patch to check for static multipath tools & warn/fallback to single path if not present (611 bytes, patch)
2008-03-18 08:41 EDT, Bryn M. Reeves
no flags Details | Diff

  None (edit)
Description Bryn M. Reeves 2008-03-06 11:13:41 EST
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@redhat.com> - 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 08:39:56 EDT
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 08:41:23 EDT
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 08:44:13 EDT
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 Product and Program Management 2008-06-02 16:15:21 EDT
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 13:33:33 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.