Bug 527756 - The H/W default path checker is taken before the one set in multipath.conf
Summary: The H/W default path checker is taken before the one set in multipath.conf
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: device-mapper-multipath
Version: 5.4
Hardware: All
OS: Linux
low
high
Target Milestone: rc
: ---
Assignee: Ben Marzinski
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-07 15:37 UTC by Menny Hamburger
Modified: 2010-02-15 11:39 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-11-25 22:16:25 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Menny Hamburger 2009-10-07 15:37:22 UTC
I set up TURas the default path checker in my multipath.conf file and I am still getting RDAC path checker to test my paths instead of TUR.

The code in propsel.c (select_checker) takes the H/W default first (if one exists), but I want to use tur and not RDAC.

Comment 1 Menny Hamburger 2009-10-08 14:31:52 UTC
Actually this is a generic issue:
One should be able to modify the default H/W configurations that are hardcoded into mutipathd's code. 

Specifically:
If I have a IBM 1814 RAID and I am not interested in using RDAC (that is hardcoded) - what should I do?

My expectations:
1) If I put my own device into the devices section of multipath.conf, with the 
   same vendor/product as one that exists in the hardcoded configuration - I  
   expect it to replace the default.
2) If I put have a default configuation I expect the properties included in 
   it to replace the properties of the hardcoded configuration. 

Thanks

Comment 2 Ben Marzinski 2009-10-09 16:25:03 UTC
Your expectations are half correct.
1. is correct.  If you add a device to the devices section with the same vendor/product as the default, it will override it. If it doesn't, this is a bug.
2. is probably incorrect, by "have a default configuration" do you mean "add a configuration option to the defaults section".  This does not override the devices section by design.

The may multipath works is the following.

1. Any configuration parameter you have in the multipaths section overrides all other sections.
2. Any configuration parameter in the devices section overrides the default section.
3. If no multipath or device specific configuration is specified for a parameter, it simply gets the default value (specified in the defaults section).

Multipath has a compiled in defaults and devices section.  Any configuration specified in multipath.conf in these sections overrides the compiled in values.

However, I have found a bug.  If you use the exact same vendor and product string that's in the hardcoded version multipath will do the correct thing. You
can check these strings be looking at

# cat /usr/share/doc/device-mapper-multipath-0.4.7/multipath.conf.defaults

or by running

multipathd -k"show config"

If you do not use the exact same vendor and product string, both device sections are present, and currently, multipath picks the compiled in one over the user
supplied one.  This is a bug.

Comment 3 Menny Hamburger 2009-10-11 07:14:38 UTC
Hi,

My problem can be described as followed:
My company is a supplier of a NAS device over off the chelf H/W.
Whe do not always know what storage array will be connected to the machines that run our software. We would like to define a default configuration using
tools available in any Linux, specifically linux device-mapper-multipath using tur or readsector0. RDAC is a third party multipath software, which needs to be installed over Linux.
I am running over an IBM 1814 an I have the following configuration in multipath.conf. 

defaults {
         path_grouping_policy    multibus
         failback                immediate
         user_friendly_names     yes
         path_checker            tur
         no_path_retry           3
         rr_min_io               10
         rr_weight               priorities
         polling_interval        10
         hardware_handler        "0"
}

I expect this configuration to override the configuration in the hardcoded device section - this does not happen:
multipathd takes the hardcoded values for IBM and uses RDAC instead.

Comment 4 Ben Marzinski 2009-10-12 17:17:17 UTC
Like I explained in comment #2, multipath doesn't work this way.  The defaults are for parameters that aren't configured by a more specific level of configuration.

Perhaps something like

devices {
  device {
    vendor ".*"
    product ".*"
    <your config here>
  }
}

would be more like what you want.  This should override all the device specific configurations, and use yours instead.  But, it doesn't, because of the bug I mentioned at the end of comment #2.  If I fixed multipath to choose the user supplied device configurations over the compiled in device configurations, would something like the above device section solve your problem?

Comment 5 Ben Marzinski 2009-11-25 22:16:25 UTC
Actually, there I must have made a mistake when I tested this earlier.  Looking at the code and retesting, multipath does indeed take the user defined device over the builtin device.


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