Comment 2 for bug 1616719

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

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

commit c3b33b6a23c885853d28cb340a394d72cd18839a
Author: lisali <email address hidden>
Date: Thu Aug 25 12:03:31 2016 +0800

    Recover volume status after remove_export

    Currently Cinder recover volume's status before remove_export,
    which leads that recreated iSCSI targets may be deleted and
    attachment fails.

    Let's consider the case: A volume is attached to instance A, and then
    detached. During detach, Cinder sets volume's status to available and
    remove iSCSI targets.
    At the exact time the volume is reset to
    available but targets are not removed, the volume is attached to
    instance 2 and targets are created again. And then former remove_export
    removed the recreated targets, and then it leads attachment fail.

    This patch is to move remove_export after changing volume's
    status.

    Change-Id: I914d4badd9b93e9dc8f4ebc4f74314afe95bf855
    Closes-Bug: #1616719