Bug 1083024 - [SNAPSHOT]: Setting config snap-max-hard-limit values require correction in output in different scenarios
Summary: [SNAPSHOT]: Setting config snap-max-hard-limit values require correction in o...
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
low
low
Target Milestone: ---
: RHGS 3.1.0
Assignee: Nagaprasad Sathyanarayana
QA Contact: Rahul Hinduja
URL:
Whiteboard: SNAPSHOT
Depends On:
Blocks: 1098122 1202842 1223636
TreeView+ depends on / blocked
 
Reported: 2014-04-01 10:47 UTC by Rahul Hinduja
Modified: 2016-09-17 13:06 UTC (History)
12 users (show)

Fixed In Version: glusterfs-3.7.0-3.el6rhs
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1098122 (view as bug list)
Environment:
Last Closed: 2015-07-29 04:31:21 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-04-01 10:47:09 UTC
Description of problem:
=======================

From user readability and script parsing the output when user tries to set  snap-max-hard-limit to greater value than the allowed, the output needs a space " " in between the snap-max-hard-limit and value.

Current Example:
================
[root@snapshot-09 ~]# gluster snapshot config vol1 snap-max-hard-limit 100
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 : failed: Invalid snap-max-hard-limit100. Expected range 0 - 75
Snapshot command failed

Should be:
==========

[root@snapshot-09 ~]# gluster snapshot config vol1 snap-max-hard-limit 100
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 : failed: Invalid snap-max-hard-limit 100. Expected range 0 - 75
Snapshot command failed



Version-Release number of selected component (if applicable):
=============================================================
glusterfs-3.4.1.7.snap.mar27.2014git-1.el6.x86_64


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


Steps to Reproduce:
====================
1. Set the snap-max-hard-limit to higher value (300)

Actual results:
===============
Snapshot Config : failed: Invalid snap-max-hard-limit300. Expected range 0 - 75

Expected results:
=================
Snapshot Config : failed: Invalid snap-max-hard-limit 300. Expected range 0 - 75

Comment 3 Nagaprasad Sathyanarayana 2014-04-21 06:18:21 UTC
Marking snapshot BZs to RHS 3.0.

Comment 4 Sachin Pandit 2014-05-06 07:19:50 UTC
The patch which fixes this bug can be found in http://review.gluster.org/#/c/7457/

Comment 5 Rahul Hinduja 2014-05-15 10:15:37 UTC
Reopening this bug to address other set of similar issues


(a) When we set a volume limit which is greater than the default 256, it shows proper message as follows:


[root@snapshot09 ~]# gluster snapshot config vol1 snap-max-hard-limit 300
snap-max-hard-limit value cannot be more than 256
Usage: snapshot config [volname] [snap-max-hard-limit <count>] [snap-max-soft-limit <percent>]

(b) Now set the system limit to 200 lesser than default 256, and than try to set the volume limit greater than 256, it fails still complaining the max limit to 256

[root@snapshot09 ~]# gluster snapshot config snap-max-hard-limit 200
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@snapshot09 ~]# 

[root@snapshot09 ~]# gluster snapshot config vol1 snap-max-hard-limit 300
snap-max-hard-limit value cannot be more than 256
Usage: snapshot config [volname] [snap-max-hard-limit <count>] [snap-max-soft-limit <percent>]

(c) Since it complained in step b for 256, try to set the value to 250 which is lesser than 256 but greater than system set value 200. It eventually fails with the proper range.
[root@snapshot09 ~]# gluster snapshot config vol1 snap-max-hard-limit 250
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 : failed: Invalid snap-max-hard-limit 250. Expected range 1 - 200
Snapshot command failed

So here, we are unnecessary checking two lever whereas we should just check the effective hard limit for a volume and fail with the range.

Reopening the bug

Comment 6 Sachin Pandit 2014-05-23 05:04:14 UTC
A patch which fixes this bug has beeb posted upstream, I'll send a relevant patch downstream once upstream patch gets merged.

Comment 7 Sachin Pandit 2014-05-30 05:33:20 UTC
Patch which fixes this has been posted downstream, https://bugzilla.redhat.com/show_bug.cgi?id=1083024 is the link to that.

Comment 12 Anil Shah 2015-06-12 09:38:43 UTC
[root@darkknightrises ~]# gluster snapshot config snap-max-hard-limit 200
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@darkknightrises ~]# gluster snapshot config snapvol  snap-max-hard-limit 300
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 : failed: Invalid snap-max-hard-limit 300. Expected range 1 - 200
Snapshot command failed


[root@darkknightrises ~]# gluster snapshot config snapvol  snap-max-hard-limit 250
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 : failed: Invalid snap-max-hard-limit 250. Expected range 1 - 200
Snapshot command failed

Bug verified on build glusterfs-server-3.7.1-2.el6

Comment 15 errata-xmlrpc 2015-07-29 04:31:21 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.