Bug 1144015 - gluster accepts invalid values when changing cluster.min-free-disk option
Summary: gluster accepts invalid values when changing cluster.min-free-disk option
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: glusterd
Version: rhgs-3.0
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
: RHGS 3.0.4
Assignee: Gaurav Kumar Garg
QA Contact: SATHEESARAN
URL:
Whiteboard:
Depends On:
Blocks: 1163108 1182947
TreeView+ depends on / blocked
 
Reported: 2014-09-18 13:01 UTC by Ondřej Komárek
Modified: 2016-06-05 23:37 UTC (History)
9 users (show)

Fixed In Version: glusterfs-3.6.0.44-1
Doc Type: Bug Fix
Doc Text:
Previously, gluster was not validating input value for cluster-min-free-disk option. Due to this, gluster was accepting input value as a percentage which was out of range [0-100] and was accepting input value as a size (unit is byte) which was fractional for cluster.min-free-disk option. With this fix, a correct validation function for checking cluster.min-free-disk value is added. gluster now accepts the value that is in range [0-100] for the input value as a percentage and an unsigned integer value for input as a size (unit in byte) for option cluster.min-free-disk.
Clone Of:
: 1163108 (view as bug list)
Environment:
Last Closed: 2015-03-26 06:34:37 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0682 0 normal SHIPPED_LIVE Red Hat Storage 3.0 enhancement and bug fix update #4 2015-03-26 10:32:55 UTC

Description Ondřej Komárek 2014-09-18 13:01:05 UTC
Description of problem:
gluster accepts values that are making no sense when changing cluster.min-free-disk option.

Version-Release number of selected component (if applicable):
glusterfs-3.6.0.27-1.el6rhs.x86_64

How reproducible:
100%

Steps to Reproduce:
gluster volume set HadoopVol1 cluster.min-free-disk 4000%

Actual results:
stdout: volume set: success

Expected results:
Gluster should be more strict and should not accept incorrect values.
volume set: failed: '4000.000000' in 'option min-free-disk 4000%' is out of range [0 - 100]

Comment 2 SATHEESARAN 2015-01-20 10:13:16 UTC
This bug falls under MUST_FIX list for RHS 3.0.4 and this bug could be verified in time. Providing the qa_ack for the same

Comment 3 Atin Mukherjee 2015-01-21 04:31:11 UTC
Upstream patch is now ready for merge and since we have already got a QE ack, moving the milestone back to 3.0.4

Comment 5 SATHEESARAN 2015-02-20 08:29:08 UTC
Tested with glusterfs-3.6.0.45-1.el6rhs

Tested with the following steps,
[~]# gluster volume set distvol cluster.min-free-disk 4000%
volume set: failed: '4000.000000' in 'option min-free-disk 4000%' is out of range [0 - 100]

[~]# gluster volume set distvol cluster.min-free-disk -4000%
volume set: failed: invalid number format "-4000%" in "option min-free-disk"

[~]# gluster volume set distvol cluster.min-free-disk 1g
volume set: failed: invalid number format "1g" in "option min-free-disk"

[~]# gluster volume set distvol cluster.min-free-disk 1G
volume set: failed: invalid number format "1G" in "option min-free-disk"

[~]# gluster volume set distvol cluster.min-free-disk -1gb
volume set: failed: invalid number format "-1gb" in "option min-free-disk"

[~]# gluster volume set distvol cluster.min-free-disk -1024
volume set: failed: invalid number format "-1024" in "option min-free-disk"

[~]# gluster volume set distvol cluster.min-free-disk -1kb
volume set: failed: invalid number format "-1kb" in "option min-free-disk"

[~]# gluster volume set distvol cluster.min-free-disk -1mb
volume set: failed: invalid number format "-1mb" in "option min-free-disk"

[~]# gluster volume set distvol cluster.min-free-disk -1gb
volume set: failed: invalid number format "-1gb" in "option min-free-disk"

Marking this bug as VERIFIED

Comment 6 Bhavana 2015-03-24 04:15:11 UTC
Hi gaurav,



The doc text is updated. review the same and sign off if it looks ok.

Comment 7 Gaurav Kumar Garg 2015-03-24 10:52:23 UTC
Hi Bhavana,

This doc text looks good to me.

Comment 9 errata-xmlrpc 2015-03-26 06:34:37 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/RHBA-2015-0682.html


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