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).
A patch which fixes this bug has been posted upstream.
https://code.engineering.redhat.com/gerrit/#/c/25997/
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'
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