Cannot recognize warning messages from "multipath -l"

Bug #1433202 reported by Tomoki Sekiyama
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Tomoki Sekiyama

Bug Description

If use_multipath_for_image_xfer=True is specified in cinder.conf, a volume is attached to transfer images from/to volumes using "multipath -l" or "multipath -ll" command to find the multipath device. However, in some configuration, "multipath -l" command may report an error like below:

 # multipath -l
 Mar 17 12:31:18 | sda: No fc_host device for 'host-1'
 mpathb (360000000000000000e00000000010001) dm-4 IET ,VIRTUAL-DISK
 size=1.0G features='0' hwhandler='0' wp=rw
 |-+- policy='service-time 0' prio=0 status=active
 | `- 2:0:0:1 sda 8:0 active undef running
 `-+- policy='service-time 0' prio=0 status=enabled
   `- 3:0:0:1 sdb 8:16 active undef running

Current multipath parser implementation in Nova and Cinder cannot recognize this warning message and regards "Mar" a valid multipath device name. As a result, the volume cannot be attached to the host correctly.

It is treated by MULTIPATH_ERROR_REGEX in cinder/brick/initiator/linuxscsi.py, but not in _get_multipath_device_name() in connector.py.

description: updated
Changed in cinder:
assignee: nobody → Tomoki Sekiyama (tsekiyama)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/165460
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=c93ba4230dd5e4e623cf6317df17deaa562d08c3
Submitter: Jenkins
Branch: master

commit c93ba4230dd5e4e623cf6317df17deaa562d08c3
Author: tsekiyam <email address hidden>
Date: Tue Mar 17 19:59:08 2015 -0400

    Remove error messages from multipath command output before parsing

    This fixes an issue in _get_multipath_device_name() that fails to
    parse the output from 'multipath -ll <device>' command when the
    stdout contains error messages in addition to the expected output.

    Change-Id: I498edd950627daca01eaf6343e6d742440ca4b04
    Related-Bug: #1380742
    Closes-Bug: #1433202

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: kilo-3 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.