Mulitpath scsi devices are not removed if there is an error in multipath command stdout

Bug #1380742 reported by Patrick East
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Patrick East
OpenStack Compute (nova)
Invalid
Medium
Lee Yarwood

Bug Description

In cinder/brick/initiator/linuxscsi.py remove_multipath_devce() we are skipping over the remove_scsi_device() calls because find_multipath_device() fails to get information about the device. The problem is that there is a device connected and this then leaves it in a bad state afterwards.

Inside of find_multipath_device() we do a call to 'mulitpath -l <device>' and then parse the stdout which we expect to be in this format:

3624a9370590474d16e6708fd00012dc0 dm-0 PURE,FlashArray
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=-1 status=active
  |- 34:0:0:1 sdc 8:32 active undef running
  `- 33:0:0:1 sdb 8:16 active undef running

But with a slight misconfiguration you can get a string back that looks like:

Oct 13 10:24:01 | /lib/udev/scsi_id exitted with 1
3624a9370590474d16e6708fd00012dc0 dm-0 PURE,FlashArray
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=-1 status=active
  |- 34:0:0:1 sdc 8:32 active undef running
  `- 33:0:0:1 sdb 8:16 active undef running

Which is then unable to be parsed with the code in there currently, and we just bail out of disconnecting 'dm-0'. We probably should support being able to pick out the device from the string regardless of the extra line in stdout.

Tags: volumes
Revision history for this message
Walt Boring (walter-boring) wrote :

Thanks for the bug report Patrick. There is something up with your multipath daemon puking on something prior to showing the multipath device. You should try and resolve that issue.

That being said, brick should be a bit more resilient to these types of issues and try and overcome this.

Changed in cinder:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Walt Boring (walter-boring)
Changed in cinder:
assignee: Walt Boring (walter-boring) → Patrick East (patrick-east)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

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

commit 0b84027204d94e7b314bce505e59aa0c336af43c
Author: Patrick East <email address hidden>
Date: Tue Oct 14 15:45:38 2014 -0700

    Multipath commands with error messages in stdout fail to parse

    This change fixes an issue in find_multipath_device() where the command
    output of ‘multipath -l <device>’ would sometimes fail to be parsed if
    there were error messages in the stdout string in addition to the
    expected output. We will now strip out the error messages before we
    attempt to parse the lines.

    Change-Id: I3d48debc7d64f6a891ac37d4c2c5ebddfb5b00b0
    Closes-Bug: #1380742

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to cinder (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/165460

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related 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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/juno)

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/172328

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (stable/juno)

Change abandoned by Lee Yarwood (<email address hidden>) on branch: stable/juno
Review: https://review.openstack.org/172328
Reason: Missed 2014.2.3, not a suitable exception.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/172660

Changed in nova:
assignee: nobody → Lee Yarwood (lyarwood)
status: New → In Progress
Thierry Carrez (ttx)
Changed in cinder:
milestone: kilo-1 → 2015.1.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (stable/juno)

Change abandoned by Lee Yarwood (<email address hidden>) on branch: stable/juno
Review: https://review.openstack.org/172328

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Lee Yarwood (<email address hidden>) on branch: master
Review: https://review.openstack.org/172660

Revision history for this message
John Garbutt (johngarbutt) wrote :

Apparently the move to os_brick means we don't need this fixing any more.

tags: added: volumes
Changed in nova:
status: In Progress → Invalid
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/240909

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (stable/kilo)

Change abandoned by Lee Yarwood (<email address hidden>) on branch: stable/kilo
Review: https://review.openstack.org/240909

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.