Bug 1064265

Summary: quota: allowed to set soft-limit %age beyond 100%
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Saurabh <saujain>
Component: quotaAssignee: Manikandan <mselvaga>
Status: CLOSED ERRATA QA Contact: Anil Shah <ashah>
Severity: medium Docs Contact:
Priority: low    
Version: 2.1CC: annair, byarlaga, divya, mselvaga, mzywusko, nlevinki, nsathyan, rgowdapp, rhs-bugs, smohan, storage-qa-internal, vagarwal, vbellur, vmallika
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 3.1.1   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.7.1-12 Doc Type: Bug Fix
Doc Text:
Previously, the gluster CLI allowed to set the soft-limit value of quota to greater than 100%. With this fix, soft-limit value is validated to allow only in the range of 1-100%.
Story Points: ---
Clone Of:
: 1240654 1253222 1253224 (view as bug list) Environment:
Last Closed: 2015-10-05 07:07:14 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: 1251815, 1253222, 1253224    

Description Saurabh 2014-02-12 10:19:00 UTC
Description of problem:
allowed to set the soft-limit percentage more than 100%

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

How reproducible:
always

Steps to Reproduce:
1. create a volume, start it
2. enable quota
3. mount over nf
4. create a directory inside the mount point
5. gluster volume quota limit-usage /dir-name <size> <soft-limit-percentage>
define soft-limit percentage as 100%

Actual results:

step5 result,

[root@quota6 ~]# gluster vol quota dist-rep2 limit-usage /dir8 5GB 650%
volume quota : success


Expected results:

should not cross 100%

Additional info:

Comment 2 Manikandan 2015-07-07 13:21:33 UTC
Patch posted upstream for review
http://review.gluster.org/#/c/11566/

Comment 3 Manikandan 2015-07-30 11:01:36 UTC
Patch merged upstream.

Comment 7 Manikandan 2015-08-13 09:18:48 UTC
*** Bug 1253224 has been marked as a duplicate of this bug. ***

Comment 10 Vijaikumar Mallikarjuna 2015-08-14 06:25:49 UTC
*** Bug 1253222 has been marked as a duplicate of this bug. ***

Comment 11 Anil Shah 2015-08-25 10:09:25 UTC
[root@darkknight ~]# gluster v quota testvol limit-usage /test 50GB 100%
volume quota : success
[root@darkknight ~]# gluster v quota testvol list
                  Path                   Hard-limit Soft-limit   Used  Available  Soft-limit exceeded? Hard-limit exceeded?
---------------------------------------------------------------------------------------------------------------------------
/                                        100.0GB       80%      0Bytes 100.0GB              No                   No
/test                                     50.0GB      100%      0Bytes  50.0GB              No                   No
[root@darkknight ~]# gluster v quota testvol limit-usage /test 50GB 101%
Please enter a correct value in the range of 0 to 100
Usage: volume quota <VOLNAME> {enable|disable|list [<path> ...]| list-objects [<path> ...] | remove <path>| remove-objects <path> | default-soft-limit <percent>} |
volume quota <VOLNAME> {limit-usage <path> <size> [<percent>]} |
volume quota <VOLNAME> {limit-objects <path> <number> [<percent>]} |
volume quota <VOLNAME> {alert-time|soft-timeout|hard-timeout} {<time>}

Bug verified on glusterfs-3.7.1-12.el7rhgs.x86_64

Comment 13 errata-xmlrpc 2015-10-05 07:07:14 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-1845.html