Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1048122 - [SNAPSHOT] : gluster snapshot delete doesnt provide option to delete all / multiple snaps of a given volume
[SNAPSHOT] : gluster snapshot delete doesnt provide option to delete all / mu...
Status: CLOSED ERRATA
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: snapshot (Show other bugs)
3.0
Unspecified Unspecified
low Severity medium
: ---
: RHGS 3.1.0
Assigned To: Nagaprasad Sathyanarayana
Rahul Hinduja
SNAPSHOT
: FutureFeature
Depends On:
Blocks: 1112613 1145083 1202842 1223636
  Show dependency treegraph
 
Reported: 2014-01-03 04:04 EST by Rahul Hinduja
Modified: 2016-09-17 08:52 EDT (History)
12 users (show)

See Also:
Fixed In Version: glusterfs-3.7.0-3.el6rhs
Doc Type: Enhancement
Doc Text:
Previously, the snapshot delete command had to be executed multiple times to delete more than one snapshot. Two new commands are now introduced that can be used to delete multiple snapshots. To delete all the snapshots present in a system, execute the following command: # gluster snapshot delete all To delete all the snapshot present in a specified volume, execute the following command: # gluster snapshot delete volume <volname>
Story Points: ---
Clone Of:
: 1112613 (view as bug list)
Environment:
Last Closed: 2015-07-29 00:33:21 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1495 normal SHIPPED_LIVE Important: Red Hat Gluster Storage 3.1 update 2015-07-29 04:26:26 EDT

  None (edit)
Description Rahul Hinduja 2014-01-03 04:04:34 EST
Description of problem:
=======================

With current implementation of gluster snapshot delete, we do not have a wayout to delete all or multiple snaps of a given volume 

[root@snapshot-09 ~]# gluster snapshot delete 
Usage: snapshot delete (<volname> -s <snapname> | -c <cgname>)
[root@snapshot-09 ~]#

For user feasibility it is must have option to delete multiple snaps in one short or/and delete all snaps in one short.

For example:

1. The below cli should have deleted snap2 and snap3 for a given volume, but it deletes only one snap2. 

[root@snapshot-09 ~]# gluster snapshot delete vol-snap0 -s snap2 snap3
snapshot delete: snap2: snap removed successfully
[root@snapshot-09 ~]# 
 
2. With below set of commands their is no way that all snaps of a given volume be deleted

[root@snapshot-09 ~]# gluster snapshot delete vol-snap0 
Usage: snapshot delete (<volname> -s <snapname> | -c <cgname>)
[root@snapshot-09 ~]# gluster snapshot delete vol-snap0 all
Usage: snapshot delete (<volname> -s <snapname> | -c <cgname>)
[root@snapshot-09 ~]# gluster snapshot delete vol-snap0 -s 
Usage: snapshot delete (<volname> -s <snapname> | -c <cgname>)
[root@snapshot-09 ~]# gluster snapshot delete vol-snap0 -s all
snapshot remove: failed: snap all is not found
Snapshot command failed
[root@snapshot-09 ~]# 


It is debatable how we need to tackle this but it is must have as we have 256 default snapshot for any given volume and deleting them individually is not user friendly


Version-Release number of selected component (if applicable):
=============================================================

glusterfs-3.4.0.snap.dec30.2013git-1.el6.x86_64
Comment 2 Vijaikumar Mallikarjuna 2014-01-09 04:13:07 EST
Patch posted: http://review.gluster.org/#/c/6673/
Comment 4 rjoseph 2014-03-25 05:02:51 EDT
With the new cli support for deleting multiple snaps in multiple volumes are not provided.
We will consider this bug in the next release
Comment 5 Nagaprasad Sathyanarayana 2014-04-21 02:18:14 EDT
Marking snapshot BZs to RHS 3.0.
Comment 6 Nagaprasad Sathyanarayana 2014-05-19 06:56:18 EDT
Setting flags required to add BZs to RHS 3.0 Errata
Comment 8 Vijaikumar Mallikarjuna 2014-05-30 04:14:04 EDT
See comment #4.
Comment 10 Sachin Pandit 2014-07-28 00:04:08 EDT
http://review.gluster.org/#/c/8162/ is merged upstream. However as this
bug doesn't contain any blocker flags, I will not send the relevant patch
downstream until the Denail release.
Comment 12 senaik 2015-06-11 06:09:11 EDT
Version :glusterfs 3.7.1 built on Jun  9 2015
======== 

Deleting all snapshots part of a volume:
========================================
gluster snapshot delete volume vol0
Volume (vol0) contains 2 snapshot(s).
Do you still want to continue and delete them?  (y/n) y
snapshot delete: S1_GMT-2015.06.11-09.16.17: snap removed successfully
snapshot delete: S2_GMT-2015.06.11-09.17.23: snap removed successfully

Deleting all snapshots present in the system :
=============================================
[root@inception ~]# gluster snapshot delete all 
System contains 80 snapshot(s).
Do you still want to continue and delete them?  (y/n) y
snapshot delete: Scheduled-Job1-vol0_GMT-2015.06.10-13.30.01: snap removed successfully
snapshot delete: Scheduled-Job2-vol1_GMT-2015.06.10-13.30.01: snap removed successfully
snapshot delete: Scheduled-Job2-vol1_GMT-2015.06.10-14.00.01: snap removed successfully

Marking the bug as 'Verified'
Comment 13 Bhavana 2015-07-15 01:47:54 EDT
Hi Sachin,

The doc text is updated. Please review the same and share your technical review comments. If it looks ok, then sign-off on the same.

Regards,
Bhavana
Comment 14 Sachin Pandit 2015-07-15 02:00:15 EDT
Hi Bhavana,

The coc text looks good to me.

Thanks,
Sachin.
Comment 15 Sachin Pandit 2015-07-15 02:01:14 EDT
Sorry for the typo.

====================
Hi Bhavana,

The doc text looks good to me.

Thanks,
Sachin.
Comment 18 errata-xmlrpc 2015-07-29 00:33:21 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-1495.html

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