Bug 215971 - [RHEL5 Beta2] device-mapper-multipath: wrong weight when rr_weight=priorities and pp->priority > 1
[RHEL5 Beta2] device-mapper-multipath: wrong weight when rr_weight=priorities...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: device-mapper-multipath (Show other bugs)
5.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ben Marzinski
Corey Marthaler
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-16 12:10 EST by Kiyoshi Ueda
Modified: 2010-01-11 21:36 EST (History)
14 users (show)

See Also:
Fixed In Version: RC
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-02-07 19:30:21 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Kiyoshi Ueda 2006-11-16 12:10:38 EST
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 Product and Program Management 2006-11-17 18:20:33 EST
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 18:47:33 EST
Fixed with a patch pulled from upstream.
Comment 4 Kiersten (Kerri) Anderson 2006-12-01 16:09:23 EST
Devel ACK.
Comment 5 RHEL Product and Program Management 2007-02-07 19:30:21 EST
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.