Red Hat Bugzilla – Bug 1272339
Creating a already deleted snapshot-clone deletes the corresponding snapshot.
Last modified: 2016-06-16 09:40:19 EDT
+++ This bug was initially created as a clone of Bug #1271627 +++
Description of problem:
Deleting and then creating the snapshot-clone with the same name deletes the snapshot as well
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create a dist-replica volume and start it.
2. Create a snapshot of this volume.
3. Create a clone from this snapshot.
4. Delete the clone and observe that the clone entries can still be seen under /run/gluster/snaps/clonename/../ and its is shows as mounted.
5. Create the clone again with the same name from the snapshot.
6. Observe that the creation of clone fails and inturn it deletes the snapshot from which we are trying to create the clone.
Creating a already deleted clone deletes the corresponding snapshot.
Failure while creating a clone should not delete the corresponding snapshot.
logs attached for the reference
--- Additional comment from Vijay Bellur on 2015-10-15 06:46:30 EDT ---
REVIEW: http://review.gluster.org/12364 (snapshot: Fix snapshot clone postvalidate) posted (#1) for review on master by Avra Sengupta (email@example.com)
--- Additional comment from Vijay Bellur on 2015-10-15 06:52:45 EDT ---
REVIEW: http://review.gluster.org/12364 (snapshot: Fix snapshot clone postvalidate) posted (#2) for review on master by Avra Sengupta (firstname.lastname@example.org)
REVIEW: http://review.gluster.org/12364 (snapshot: Fix snapshot clone postvalidate) posted (#3) for review on master by Avra Sengupta (email@example.com)
REVIEW: http://review.gluster.org/12364 (snapshot: Fix snapshot clone postvalidate) posted (#4) for review on master by Avra Sengupta (firstname.lastname@example.org)
COMMIT: http://review.gluster.org/12364 committed in master by Rajesh Joseph (email@example.com)
Author: Avra Sengupta <firstname.lastname@example.org>
Date: Thu Oct 15 16:08:03 2015 +0530
snapshot: Fix snapshot clone postvalidate
In glusterd_snapshot_clone_postvalidate(), we were deleting
snap object and snap vol, by looking up snapname. Hence, it
was deleting the orignal snapshot from which the clone was
Instead it should fetch the clonename, the respective
clone vol, and its corresponding snap object, and delete them.
Also glusterd_snap_remove(), needs to differentiate a clone
snap object from a snaphsot snap object, as in case of a clone
snap object, we don't have any persisted data in
/var/run/gluster/snaps/ and hence is shouldn't try to delete
Signed-off-by: Avra Sengupta <email@example.com>
Tested-by: NetBSD Build System <firstname.lastname@example.org>
Tested-by: Gluster Build System <email@example.com>
Reviewed-by: mohammed rafi kc <firstname.lastname@example.org>
Reviewed-by: Rajesh Joseph <email@example.com>
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.8.0, please open a new bug report.
glusterfs-3.8.0 has been announced on the Gluster mailinglists , packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist  and the update infrastructure for your distribution.