Bug 1114015 - [SNAPSHOT]: setting config valuses doesn't delete the already created snapshots,but wrongly warns the user that it might delete
Summary: [SNAPSHOT]: setting config valuses doesn't delete the already created snapsho...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: snapshot
Version: rhgs-3.0
Hardware: x86_64
OS: Linux
medium
low
Target Milestone: ---
: RHGS 3.1.0
Assignee: Joseph Elwin Fernandes
QA Contact: Rahul Hinduja
URL:
Whiteboard: SNAPSHOT
Depends On:
Blocks: 1087818 1116263 1202842 1223636
TreeView+ depends on / blocked
 
Reported: 2014-06-27 13:03 UTC by Rahul Hinduja
Modified: 2016-09-17 12:52 UTC (History)
9 users (show)

Fixed In Version: glusterfs-3.7.0-3.el6rhs
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1116263 (view as bug list)
Environment:
Last Closed: 2015-07-29 04:32:56 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1495 0 normal SHIPPED_LIVE Important: Red Hat Gluster Storage 3.1 update 2015-07-29 08:26:26 UTC

Description Rahul Hinduja 2014-06-27 13:03:39 UTC
Description of problem:
=======================

When a snapshot config values are changed than we are currently warning a user that it might delete the already created snapshots if they exceed the new limit. This is not a correct behaviour we are not deleting snapshots with the change in config.

[root@snapshot13 ~]# gluster snapshot list
snap3
snap4
test
test1
[root@snapshot13 ~]# gluster snapshot config snap-max-hard-limit 3
Changing snapshot-max-hard-limit will lead to deletion of snapshots if they exceed the new limit.
Do you want to continue? (y/n) y
snapshot config: System for snap-max-hard-limit set successfully
[root@snapshot13 ~]# gluster snapshot list
snap3
snap4
test
test1
[root@snapshot13 ~]# gluster snapshot config 

Snapshot System Configuration:
snap-max-hard-limit : 3
snap-max-soft-limit : 20%
auto-delete : disable

Snapshot Volume Configuration:

Volume : vol0
snap-max-hard-limit : 256
Effective snap-max-hard-limit : 3
Effective snap-max-soft-limit : 0 (20%)

Volume : vol2
snap-max-hard-limit : 256
Effective snap-max-hard-limit : 3
Effective snap-max-soft-limit : 0 (20%)

Volume : vol4
snap-max-hard-limit : 256
Effective snap-max-hard-limit : 3
Effective snap-max-soft-limit : 0 (20%)
[root@snapshot13 ~]# 



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

glusterfs-3.6.0.22-1.el6rhs.x86_64



How reproducible:
=================
1/1


Steps to Reproduce:
===================
1. Change a config value to lesser than already created snaps


Actual results:
===============
[root@snapshot13 ~]# gluster snapshot config snap-max-hard-limit 3
Changing snapshot-max-hard-limit will lead to deletion of snapshots if they exceed the new limit.
Do you want to continue? (y/n) y
snapshot config: System for snap-max-hard-limit set successfully
[root@snapshot13 ~]#


Expected results:
=================
It should not warn a user because it doesn't actually delete the snaps

Comment 2 Joseph Elwin Fernandes 2014-07-04 06:24:28 UTC
Upstream patch

REVIEW: http://review.gluster.org/8236 (glusterd/snapshot: Fix CLI msg for snap limit set) posted (#1) for review on master by Joseph Fernandes (josferna)

Comment 4 senaik 2015-06-23 07:52:33 UTC
Version : glusterfs-3.7.1-4.el6rhs.x86_64

Changing  the config value to less than already created snapshots does not warn the user that it might delete the already created snapshots if they exceed the new limit. 
It prints the below message : Changing snapshot-max-hard-limit will limit the creation of new snapshots if they exceed the new limit.

1) create 8 snapshots for volume 
gluster snapshot list vol1 
S1_GMT-2015.06.23-07.43.54
S2_GMT-2015.06.23-07.44.05
S3_GMT-2015.06.23-07.44.17
S1_GMT-2015.06.23-07.46.10
S2_GMT-2015.06.23-07.46.22
S3_GMT-2015.06.23-07.46.35
S4_GMT-2015.06.23-07.46.47
S5_GMT-2015.06.23-07.47.00

2) set snapshot hard limit to 3 
gluster snapshot config snap-max-hard-limit 3
Changing snapshot-max-hard-limit will limit the creation of new snapshots if they exceed the new limit.
Do you want to continue? (y/n) y
snapshot config: snap-max-hard-limit for System set successfully

[root@inception scripts]# gluster snapshot list vol1 
S1_GMT-2015.06.23-07.43.54
S2_GMT-2015.06.23-07.44.05
S3_GMT-2015.06.23-07.44.17
S1_GMT-2015.06.23-07.46.10
S2_GMT-2015.06.23-07.46.22
S3_GMT-2015.06.23-07.46.35
S4_GMT-2015.06.23-07.46.47
S5_GMT-2015.06.23-07.47.00

Marking the bug 'Verified'

Comment 6 errata-xmlrpc 2015-07-29 04:32:56 UTC
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.