When creating a volume from an image fails we may not clean up system devices

Bug #1502138 reported by Gorka Eguileor
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Gorka Eguileor

Bug Description

When we are creating a new volume using an image and the attachment fails in the verification phase of the attach we do not cleanup system devices, so we leave leftovers behind.

This has been observed on a multipath FC, and can happen when paths have been properly detected but they are on fail state when we do the device validation.

Gorka Eguileor (gorka)
Changed in cinder:
assignee: nobody → Gorka Eguileor (gorka)
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/230429

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

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

commit c5323c6d6c9ec6628cd38e21f11ba45bfeb7867f
Author: Gorka Eguileor <email address hidden>
Date: Fri Oct 2 15:08:31 2015 +0200

    Detach volume on device validation failure

    If device validation fails when attaching a volume for some driver
    operation (copy_volume_data, copy_image_to_volume, copy_volume_to_image)
    we may end up with an attached volume that we don't cleanup.

    This patch tries to detach the volume if we fail when validating the
    device after we have attached the volume.

    This happens for example on multipath when we have properly detected the
    paths but they are all in a failed state when we try to read from the
    device on validation.

    Closes-Bug: #1502138
    Change-Id: I73be4206930eba7da064e22d86ff2136191acb0b

Changed in cinder:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/238505

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

Reviewed: https://review.openstack.org/238505
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=98c62d2b9d44b46500cfbc2fe3fc3ac2b5955718
Submitter: Jenkins
Branch: stable/liberty

commit 98c62d2b9d44b46500cfbc2fe3fc3ac2b5955718
Author: Gorka Eguileor <email address hidden>
Date: Fri Oct 2 15:08:31 2015 +0200

    Detach volume on device validation failure

    If device validation fails when attaching a volume for some driver
    operation (copy_volume_data, copy_image_to_volume, copy_volume_to_image)
    we may end up with an attached volume that we don't cleanup.

    This patch tries to detach the volume if we fail when validating the
    device after we have attached the volume.

    This happens for example on multipath when we have properly detected the
    paths but they are all in a failed state when we try to read from the
    device on validation.

    Closes-Bug: #1502138
    Change-Id: I73be4206930eba7da064e22d86ff2136191acb0b
    (cherry picked from commit c5323c6d6c9ec6628cd38e21f11ba45bfeb7867f)

tags: added: in-stable-liberty
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/cinder 8.0.0.0b1

This issue was fixed in the openstack/cinder 8.0.0.0b1 development milestone.

Thierry Carrez (ttx)
Changed in cinder:
status: Fix Committed → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in cinder 7.0.1

This issue was fixed in the cinder 7.0.1 release (liberty).

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.opendev.org/731495

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.