EMC SMI-S driver needs to check if a volume is attached to a specific host

Bug #1295906 reported by Xing Yang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Critical
Xing Yang

Bug Description

There's a problem in the attach volume logic of the EMC SMI-S driver. The existing logic checks if a volume is already attached to a host, but it doesn’t check whether it is attached to the host inidicated by the connector info.
So we need to add a check to see if a volume is already attached to a specific host. If not, it will do the attach.

Xing Yang (xing-yang)
Changed in cinder:
assignee: nobody → Xing Yang (xing-yang)
status: New → In Progress
Xing Yang (xing-yang)
Changed in cinder:
importance: Undecided → Critical
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/82653

Revision history for this message
Xing Yang (xing-yang) wrote :

The reason that the volume being attached already could be due to a nova live-migration use case. Cinder doesn't support multiple attaches currently, but allows a volume to be attached multiple times from nova during live-migration.

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

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

commit 7320422e5a496350906dcd2a1cd5487088cf63e5
Author: Xing Yang <email address hidden>
Date: Sat Mar 22 15:05:42 2014 -0400

    Fixes a problem in attach volume in EMC driver.

    This patch fixes a problem in attach volume in EMC SMI-S driver.
    The existing logic checks if a volume is already attached to any host,
    but it doesn't check whether a volume is already attached to the specific
    host that nova wants cinder to attach. As a result, initialize_connection
    could return success (thinking it is already attached), but nova will
    fail to discover the LUN later and fail the attach.

    This patch adds a check to see if a volume is already attached to a
    specific host. If not, it will do the attach. The reason that the
    volume being attached already could be due to a nova live-migration
    use case. Cinder doesn't support multiple attaches currently, but
    allows a volume to be attached multiple times from nova during
    live-migration.

    Change-Id: I05a2f57cd8708d7fcbe902ec13665a9cfb44db07
    Closes-Bug: #1295906

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → icehouse-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: icehouse-rc1 → 2014.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.