Bug 1098093 - [SNAPSHOT]: setting the -ve values in snapshot config should result in proper message
Summary: [SNAPSHOT]: setting the -ve values in snapshot config should result in proper...
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: 1084409 1202842 1223636
TreeView+ depends on / blocked
 
Reported: 2014-05-15 09:54 UTC by Rahul Hinduja
Modified: 2016-09-17 12:55 UTC (History)
8 users (show)

Fixed In Version: glusterfs-3.7.0-3.el6rhs
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-29 04:31:40 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-05-15 09:54:07 UTC
Description of problem:
=======================

When we set a negative(-ve) value of snapshot config snap-max-soft-limit or snap-max-hard-limit for example(-110 OR -5), the output shows that the value can not be set to greater than 100. Mathematically -110 < 100 , the message should be corrected to reflect that the -ve values are not allowed, or only positive integer is allowed, or the best would be to show the range (min-max).

For example:
============

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


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


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

glusterfs-3.6.0.1-1.el6rhs.x86_64


How reproducible:
=================
5/5


Steps to Reproduce:
===================
1. Set the snap-max-soft-limit to -5
2. Set the snap-max-hard-limit to -5


Actual results:
===============

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


Expected results:
=================

The message should be corrected to reflect that the -ve values are not allowed, or only positive integer is allowed, or the best would be to show the range (min-max).

Comment 2 Sachin Pandit 2014-05-23 05:03:26 UTC
A patch which fixes this bug has been posted upstream.

Comment 6 senaik 2015-06-11 14:04:04 UTC
Version : glusterfs-3.7.1-1.el6rhs.x86_64

 gluster snapshot config vol0 snap-max-hard-limit -5
Please enter an integer value greater than zero for snap-max-hard-limit
Usage: snapshot config [volname] ([snap-max-hard-limit <count>] [snap-max-soft-limit <percent>]) | ([auto-delete <enable|disable>])| ([activate-on-create <enable|disable>])

gluster snapshot config snap-max-soft-limit -5
Please enter an integer value greater than zero for snap-max-soft-limit
Usage: snapshot config [volname] ([snap-max-hard-limit <count>] [snap-max-soft-limit <percent>]) | ([auto-delete <enable|disable>])| ([activate-on-create <enable|disable>])

gluster snapshot config snap-max-hard-limit -5
Please enter an integer value greater than zero for snap-max-hard-limit
Usage: snapshot config [volname] ([snap-max-hard-limit <count>] [snap-max-soft-limit <percent>]) | ([auto-delete <enable|disable>])| ([activate-on-create <enable|disable>])

Marking the bug 'Verified'

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