storwize SVC driver fails to map volume to host when SCSI IDs are not contiguous

Bug #1157012 reported by Alan Jiang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Avishay Traeger

Bug Description

When multiple cinder volumes are attached to VM and detach/deleted in a different order
of creation/attatch, the SCSI ID for vdisk mapping may not be contiguous any more. The _map_vol_to_host()
function in storwize_driver.py may map a vdisk with an in-use SCSI ID which will cause nova
volume-attach to fail.

In the case of existing vdisk host mapping with the following SCSI ID: [0,1,2,3,4,5,7,8],
_map_vol_to_host() will use SCSI ID 7 to map a vdisk to host. It failed the mkvdiskhostmap command:

Command: mkvdiskhostmap -host b02 -scsi 7 vol-b629539b-fac5-4382-b6bd-3e639df2ee43
Exit code: 1
Stdout: ''
Stderr: 'CMMVC5879E The VDisk-to-host mapping was not created because a VDisk is already mapped to this host with this SCSI LUN

Changed in cinder:
status: New → Confirmed
assignee: nobody → Avishay Traeger (avishay-il)
importance: Undecided → High
tags: added: drivers folsom-backport-potential storwize-svc
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/24761
Committed: http://github.com/openstack/cinder/commit/e0878c86207d5ff5c2ebaa69eac454af545925ef
Submitter: Jenkins
Branch: master

commit e0878c86207d5ff5c2ebaa69eac454af545925ef
Author: Avishay Traeger <email address hidden>
Date: Tue Mar 19 09:42:06 2013 +0200

    Fix Storwize/SVC LUN allocation with holes.

    The Storwize/SVC driver should find the first unused LUN, but
    continues searching, returning erroneous results. Added 'break'
    statement to fix.

    Change-Id: Ibd95714e086a513a39fe9d20ffec57135dc5ec55
    Fixes: bug 1157012

Changed in cinder:
status: In Progress → Fix Committed
Changed in cinder:
milestone: none → grizzly-rc2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/25097

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (milestone-proposed)

Reviewed: https://review.openstack.org/25097
Committed: http://github.com/openstack/cinder/commit/9ff5bf692e09bfadd9ed10eeec8160af4d2662a6
Submitter: Jenkins
Branch: milestone-proposed

commit 9ff5bf692e09bfadd9ed10eeec8160af4d2662a6
Author: Avishay Traeger <email address hidden>
Date: Tue Mar 19 09:42:06 2013 +0200

    Fix Storwize/SVC LUN allocation with holes.

    The Storwize/SVC driver should find the first unused LUN, but
    continues searching, returning erroneous results. Added 'break'
    statement to fix.

    Change-Id: Ibd95714e086a513a39fe9d20ffec57135dc5ec55
    Fixes: bug 1157012
    (cherry picked from commit e0878c86207d5ff5c2ebaa69eac454af545925ef)

Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: grizzly-rc2 → 2013.1
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.