Bug 1144015

Summary: gluster accepts invalid values when changing cluster.min-free-disk option
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Ondřej Komárek <okomarek>
Component: glusterdAssignee: Gaurav Kumar Garg <ggarg>
Status: CLOSED ERRATA QA Contact: SATHEESARAN <sasundar>
Severity: unspecified Docs Contact:
Priority: high    
Version: rhgs-3.0CC: amukherj, bmohanra, esammons, ggarg, kparthas, nlevinki, sasundar, smohan, vbellur
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: RHGS 3.0.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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.
Story Points: ---
Clone Of:
: 1163108 (view as bug list) Environment:
Last Closed: 2015-03-26 06:34:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1163108, 1182947    

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