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)
Reviewed: https:/ /review. openstack. org/89560 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=560740f7348 da143d8739980a0 6496d6e24d1c4e
Committed: https:/
Submitter: Jenkins
Branch: stable/icehouse
commit 560740f7348da14 3d8739980a06496 d6e24d1c4e
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 <uuid>. <snapshot- uuid>. This patch looks at the volume info
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-
file to find any active snapshot file and properly delete it when
the volume is deleted.
Change-Id: Ib0af4401d839ec 3bd1eb3a81e1671 811e0d4a288 d71f636add0810a 538cbd444f)
Closes-Bug: #1300303
(cherry picked from commit 5f00cad02da1093