glusterfs: Rebased snapshot volume is not deleted

Bug #1300303 reported by Thang Pham
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Thang Pham
Icehouse
Fix Released
Medium
Chuck Short

Bug Description

When deleting a volume that was snapshot, the volume is not properly deleted.

Steps to recreate bug:
1. Create a volume

2. Attach volume to a running instance.

3. Take an online snapshot of the volume.
Note that the active volume used by the instance is now switched to volume-<uuid>.<snapshot-uuid>.

4. Delete the snapshot.
The snapshot volume will be rebased, and the "active" volume as seen in volume-<uuid>.info is now set to
volume-<uuid>.<snapshot-uuid>.

Under the glusterfs mount point, there are now only 2 files related to the volume:
  - volume-<uuid>.info
  - volume-<uuid>.<snapshot-uuid>
The original volume base volume-<uuid> is deleted after the rebase.

5. Detach the volume from the running instance.

6. Delete the volume.
Under the glusterfs mount point, the volume-<uuid>.<snapshot-uuid> file is not deleted as expected.

Thang Pham (thang-pham)
Changed in cinder:
assignee: nobody → Thang Pham (thang-pham)
Mike Perez (thingee)
tags: added: drivers
Changed in cinder:
status: New → In Progress
milestone: none → next
importance: Undecided → Low
Eric Harney (eharney)
Changed in cinder:
milestone: next → juno-1
Eric Harney (eharney)
tags: added: icehouse-backport-potential
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/86158

Revision history for this message
Eric Harney (eharney) wrote :

I'd suggest that this is probably "medium" priority since it causes leaking of backend space.

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

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

commit 5f00cad02da1093d71f636add0810a538cbd444f
Author: Thang Pham <email address hidden>
Date: Tue Apr 8 16:45:34 2014 -0400

    GlusterFS: Delete active snapshot file on volume delete.

    If a snapshot is taken of a volume that is attached to an active
    instance, the volume file used by the instance will be switched to
    the new snapshot file that is created. When you delete the
    snapshot, the base volume file will be merged with the snapshot
    file and the base volume is deleted. Upon a deleting the active
    volume, the active snapshot file is not deleted because it does not
    have the expected name that cinder is looking for, i.e.
    volume-<uuid>. Instead, the snapshot file has the name
    volume-<uuid>.<snapshot-uuid>. This patch looks at the volume info
    file to find any active snapshot file and properly delete it when
    the volume is deleted.

    Change-Id: Ib0af4401d839ec3bd1eb3a81e1671811e0d4a288
    Closes-Bug: #1300303

Changed in cinder:
status: In Progress → Fix Committed
Eric Harney (eharney)
Changed in cinder:
importance: Low → Medium
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to cinder (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/89560

Alan Pevec (apevec)
tags: removed: icehouse-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/icehouse)

Reviewed: https://review.openstack.org/89560
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=560740f7348da143d8739980a06496d6e24d1c4e
Submitter: Jenkins
Branch: stable/icehouse

commit 560740f7348da143d8739980a06496d6e24d1c4e
Author: Thang Pham <email address hidden>
Date: Tue Apr 8 16:45:34 2014 -0400

    GlusterFS: Delete active snapshot file on volume delete.

    If a snapshot is taken of a volume that is attached to an active
    instance, the volume file used by the instance will be switched to
    the new snapshot file that is created. When you delete the
    snapshot, the base volume file will be merged with the snapshot
    file and the base volume is deleted. Upon a deleting the active
    volume, the active snapshot file is not deleted because it does not
    have the expected name that cinder is looking for, i.e.
    volume-<uuid>. Instead, the snapshot file has the name
    volume-<uuid>.<snapshot-uuid>. This patch looks at the volume info
    file to find any active snapshot file and properly delete it when
    the volume is deleted.

    Change-Id: Ib0af4401d839ec3bd1eb3a81e1671811e0d4a288
    Closes-Bug: #1300303
    (cherry picked from commit 5f00cad02da1093d71f636add0810a538cbd444f)

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