Bug 1271627 - Creating a already deleted snapshot-clone deletes the corresponding snapshot.
Creating a already deleted snapshot-clone deletes the corresponding snapshot.
Product: GlusterFS
Classification: Community
Component: snapshot (Show other bugs)
x86_64 Linux
urgent Severity urgent
: ---
: ---
Assigned To: Avra Sengupta
Shashank Raj
Depends On:
Blocks: 1272339 1273703 glusterfs-3.7.6
  Show dependency treegraph
Reported: 2015-10-14 08:13 EDT by Shashank Raj
Modified: 2016-11-07 22:52 EST (History)
5 users (show)

See Also:
Fixed In Version: glusterfs-3.7.6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1272339 1273703 (view as bug list)
Last Closed: 2015-11-16 02:12:04 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
logs from one node (130.81 KB, text/plain)
2015-10-14 08:13 EDT, Shashank Raj
no flags Details

  None (edit)
Description Shashank Raj 2015-10-14 08:13:47 EDT
Created attachment 1082804 [details]
logs from one node

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):


How reproducible:

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.

Actual results:

Creating a already deleted clone deletes the corresponding snapshot.

Expected results:

Failure while creating a clone should not delete the corresponding snapshot.

Additional info:

logs attached for the reference
Comment 1 Vijay Bellur 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 (asengupt@redhat.com)
Comment 2 Vijay Bellur 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 (asengupt@redhat.com)
Comment 3 Vijay Bellur 2015-10-21 01:18:15 EDT
REVIEW: http://review.gluster.org/12406 (snapshot: Fix snapshot clone postvalidate) posted (#1) for review on release-3.7 by Avra Sengupta (asengupt@redhat.com)
Comment 4 Vijay Bellur 2015-10-27 05:06:31 EDT
COMMIT: http://review.gluster.org/12406 committed in release-3.7 by Rajesh Joseph (rjoseph@redhat.com) 
commit c11e3232963d28b4cdf73b694d82f7b6ed38894f
Author: Avra Sengupta <asengupt@redhat.com>
Date:   Thu Oct 15 16:08:03 2015 +0530

    snapshot: Fix snapshot clone postvalidate
        BackPort Of http://review.gluster.org/#/c/12364/
    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
    being created
    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
    anything there.
    Change-Id: I02bb22a3898d5720e318a02d6cc32d25f75d317d
    BUG: 1271627
    Signed-off-by: Avra Sengupta <asengupt@redhat.com>
    Reviewed-on: http://review.gluster.org/12364
    Tested-by: NetBSD Build System <jenkins@build.gluster.org>
    Tested-by: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: mohammed rafi  kc <rkavunga@redhat.com>
    Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
    (cherry picked from commit 59401a32de51cdb6c1a5a1208723e89e1a4abd30)
    Reviewed-on: http://review.gluster.org/12406
Comment 5 Raghavendra Talur 2015-11-17 01:00:20 EST
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.7.6, please open a new bug report.

glusterfs-3.7.6 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://www.gluster.org/pipermail/gluster-users/2015-November/024359.html
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Note You need to log in before you can comment on or make changes to this bug.