Bug 215971 - [RHEL5 Beta2] device-mapper-multipath: wrong weight when rr_weight=priorities and pp->priority > 1
Summary: [RHEL5 Beta2] device-mapper-multipath: wrong weight when rr_weight=priorities...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: device-mapper-multipath
Version: 5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Ben Marzinski
QA Contact: Corey Marthaler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-11-16 17:10 UTC by Kiyoshi Ueda
Modified: 2010-01-12 02:36 UTC (History)
14 users (show)

Fixed In Version: RC
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-02-08 00:30:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Kiyoshi Ueda 2006-11-16 17:10:38 UTC
Description of problem:
Wrong round-robin parameter is set when rr_weight is set in "priorities"
and more than 1 value is given for path priority.


Version-Release number of selected component:
device-mapper-multipath-0.4.7-5.2


How reproducible:
Always


Steps to Reproduce:
 1. Setup /etc/multipath.conf
        defaults {
                prio_callout    "/bin/echo 5"
                rr_min_io       1000
                rr_weight       priorities
        }
 2. Run multipath
        # multipath


Actual results:
In 2 paths environment, the round-robin parameter of the first path
is 5000 (this is correct) but that of the second path is 25000.
-----------------------------------------------------------------------
[root@nec-tx7-1 ~]# multipath
create: disk2 (1NEC_iStorage_2000_000000092680024600002)  NEC,iStorage 2000
[size=67G][features=0][hwhandler=0]
\_ round-robin 0 [prio=5][undef]
 \_ 4:0:0:2  sdg 8:96  [undef][ready]
\_ round-robin 0 [prio=5][undef]
 \_ 5:0:0:2  sdh 8:112 [undef][ready]
[root@nec-tx7-1 ~]# dmsetup table
disk2: 0 139841536 multipath 0 0 2 1 round-robin 0 1 1 \
8:96 5000 round-robin 0 1 1 8:112 25000
[root@nec-tx7-1 ~]#
-----------------------------------------------------------------------


Expected results:
The round-robin parameter of all paths should be same
in the sample config above.
(RHEL4 device-mapper-multipath behaved as such.)


Additional info:
In libmultipath/dmparser.c:assemble_map(), minio seems not to be
reset to mp->minio.
----------------------------------------------------------------
        vector_foreach_slot (pgp->paths, pp, j) {
                if (mp->rr_weight == RR_WEIGHT_PRIO && pp->priority)
                        minio *= pp->priority;

                shift = snprintf(p, freechar, " %s %d",
                                 pp->dev_t, minio);
                if (shift >= freechar) {
                        fprintf(stderr, "mp->params too small\n");
                        return 1;
                }
                p += shift;
                freechar -= shift;
        }
----------------------------------------------------------------

Comment 1 RHEL Program Management 2006-11-17 23:20:33 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 3 Ben Marzinski 2006-11-30 23:47:33 UTC
Fixed with a patch pulled from upstream.

Comment 4 Kiersten (Kerri) Anderson 2006-12-01 21:09:23 UTC
Devel ACK.

Comment 5 RHEL Program Management 2007-02-08 00:30:21 UTC
A package has been built which should help the problem described in 
this bug report. This report is therefore being closed with a resolution 
of CURRENTRELEASE. You may reopen this bug report if the solution does 
not work for you.



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