DellEMC VNX: original volume can not be deleted on array backend if its snapshot has been used.

Bug #1794646 reported by Sam Wan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Rajat Dhasmana

Bug Description

Scenario to reproduce:
1. Create a vol (testvol)
2. Create a snapshot of the vol (testsnap)
3. Create a new vol from the snapshot (newvol)
4. Delete the new vol (newvol)
5. Delete snapshot (testsnap)
6. Delete the original vol (testvol)
The original volume has gone from cinder database ie: 'openstack volume list' can not see the original volume.
But it's still on array backend with a snapshot.

Ryan Liang (ryan-liang)
tags: added: dellemc vnx
Changed in cinder:
assignee: nobody → Ryan Liang (ryan-liang)
Revision history for this message
Ryan Liang (ryan-liang) wrote :

Async migration was used in the process of creating a volume from a snapshot and an internal temp snapshot was created for async migration.

The bug was caused by that the temp snapshot wasn't deleted. Then the LUN hosting the snapshot cannot be deleted from the VNX storage.

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/605904

Changed in cinder:
status: New → In Progress
Changed in cinder:
assignee: Ryan Liang (ryan-liang) → Rajat Dhasmana (whoami-rajat)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/605904
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=b3a89dc187ae4d71fb1fc27645cb4383209b0ef8
Submitter: Zuul
Branch: master

commit b3a89dc187ae4d71fb1fc27645cb4383209b0ef8
Author: Ryan Liang <email address hidden>
Date: Fri Sep 28 09:58:43 2018 +0800

    VNX: delete the LUN from VNX backend

    Async migration is used in the process of creating a volume from a
    snapshot and an internal temp snapshot is created.

    Because the temp snapshot isn't deleted, the LUN hosting the temp
    snapshot cannot be deleted from the VNX storage.

    For example, a new volume, V2, is created from snapshot S1 of volume V1.
    An internal temp snapshot S2 is created from copying S1. V1 now has two
    snapshots, S1 and S2. Although we delete V1, V2 and S1 from Cinder,
    S2 which is Cinder user-invisible isn't deleted and which causes V1 left
    on VNX too.

    The fix makes sure the snapshot S2 is deleted. Then the delay deletion
    on V1 can be executed successfully.

    Change-Id: Ib86729488ebfb0aea5d5d4f815a64e00258040e7
    Closes-bug: #1794646

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 15.0.0.0rc1

This issue was fixed in the openstack/cinder 15.0.0.0rc1 release candidate.

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

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/687147

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

Reviewed: https://review.opendev.org/687147
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=a74945b0687c4aa69960777fb301984cd4d2fedd
Submitter: Zuul
Branch: stable/stein

commit a74945b0687c4aa69960777fb301984cd4d2fedd
Author: Ryan Liang <email address hidden>
Date: Fri Sep 28 09:58:43 2018 +0800

    VNX: delete the LUN from VNX backend

    Async migration is used in the process of creating a volume from a
    snapshot and an internal temp snapshot is created.

    Because the temp snapshot isn't deleted, the LUN hosting the temp
    snapshot cannot be deleted from the VNX storage.

    For example, a new volume, V2, is created from snapshot S1 of volume V1.
    An internal temp snapshot S2 is created from copying S1. V1 now has two
    snapshots, S1 and S2. Although we delete V1, V2 and S1 from Cinder,
    S2 which is Cinder user-invisible isn't deleted and which causes V1 left
    on VNX too.

    The fix makes sure the snapshot S2 is deleted. Then the delay deletion
    on V1 can be executed successfully.

    Change-Id: Ib86729488ebfb0aea5d5d4f815a64e00258040e7
    Closes-bug: #1794646
    (cherry picked from commit b3a89dc187ae4d71fb1fc27645cb4383209b0ef8)

tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 14.0.3

This issue was fixed in the openstack/cinder 14.0.3 release.

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

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/727602

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

Reviewed: https://review.opendev.org/727602
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=6e2e278f3c97ee14d7b18272cee5bfea1c231768
Submitter: Zuul
Branch: stable/rocky

commit 6e2e278f3c97ee14d7b18272cee5bfea1c231768
Author: Ryan Liang <email address hidden>
Date: Fri Sep 28 09:58:43 2018 +0800

    VNX: delete the LUN from VNX backend

    Async migration is used in the process of creating a volume from a
    snapshot and an internal temp snapshot is created.

    Because the temp snapshot isn't deleted, the LUN hosting the temp
    snapshot cannot be deleted from the VNX storage.

    For example, a new volume, V2, is created from snapshot S1 of volume V1.
    An internal temp snapshot S2 is created from copying S1. V1 now has two
    snapshots, S1 and S2. Although we delete V1, V2 and S1 from Cinder,
    S2 which is Cinder user-invisible isn't deleted and which causes V1 left
    on VNX too.

    The fix makes sure the snapshot S2 is deleted. Then the delay deletion
    on V1 can be executed successfully.

    Change-Id: Ib86729488ebfb0aea5d5d4f815a64e00258040e7
    Closes-bug: #1794646
    (cherry picked from commit b3a89dc187ae4d71fb1fc27645cb4383209b0ef8)
    (cherry picked from commit a74945b0687c4aa69960777fb301984cd4d2fedd)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/744591

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

Reviewed: https://review.opendev.org/744591
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=8641eed2ea5b0b62ef0209e86ed7446a18232784
Submitter: Zuul
Branch: stable/queens

commit 8641eed2ea5b0b62ef0209e86ed7446a18232784
Author: Ryan Liang <email address hidden>
Date: Fri Sep 28 09:58:43 2018 +0800

    VNX: delete the LUN from VNX backend

    Async migration is used in the process of creating a volume from a
    snapshot and an internal temp snapshot is created.

    Because the temp snapshot isn't deleted, the LUN hosting the temp
    snapshot cannot be deleted from the VNX storage.

    For example, a new volume, V2, is created from snapshot S1 of volume V1.
    An internal temp snapshot S2 is created from copying S1. V1 now has two
    snapshots, S1 and S2. Although we delete V1, V2 and S1 from Cinder,
    S2 which is Cinder user-invisible isn't deleted and which causes V1 left
    on VNX too.

    The fix makes sure the snapshot S2 is deleted. Then the delay deletion
    on V1 can be executed successfully.

    Change-Id: Ib86729488ebfb0aea5d5d4f815a64e00258040e7
    Closes-bug: #1794646
    Conflicts:
      cinder/volume/drivers/dell_emc/vnx/driver.py
    (cherry picked from commit b3a89dc187ae4d71fb1fc27645cb4383209b0ef8)
    (cherry picked from commit a74945b0687c4aa69960777fb301984cd4d2fedd)
    (cherry picked from commit 6e2e278f3c97ee14d7b18272cee5bfea1c231768)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder queens-eol

This issue was fixed in the openstack/cinder queens-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder rocky-eol

This issue was fixed in the openstack/cinder rocky-eol release.

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.