Bug 1294751 - Able to create files when quota limit is set to 0
Able to create files when quota limit is set to 0
Status: CLOSED ERRATA
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: quota (Show other bugs)
3.1
Unspecified Unspecified
unspecified Severity unspecified
: ---
: RHGS 3.1.3
Assigned To: Manikandan
Anil Shah
: ZStream
Depends On:
Blocks: 1299184 1302554 1306136
  Show dependency treegraph
 
Reported: 2015-12-30 01:04 EST by Bhaskarakiran
Modified: 2016-11-23 18:12 EST (History)
8 users (show)

See Also:
Fixed In Version: glusterfs-3.7.9-2
Doc Type: Bug Fix
Doc Text:
When the quota limit is set to zero, quota enforcement is disabled, rather than enforcing a quota limit of 0 and preventing any writes. To prevent confusion when using this option, numbers smaller than or equal to zero are no longer valid values.
Story Points: ---
Clone Of:
: 1302554 (view as bug list)
Environment:
Last Closed: 2016-06-23 01:00:54 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1240 normal SHIPPED_LIVE Red Hat Gluster Storage 3.1 Update 3 2016-06-23 04:51:28 EDT

  None (edit)
Description Bhaskarakiran 2015-12-30 01:04:55 EST
Description of problem:
=======================
When the quota limit is set to 0, writes still go through. quota list shows the limits are exceeded. 

[root@transformers ~]# gluster v quota disperse_vol2 list
                  Path                   Hard-limit  Soft-limit      Used  Available  Soft-limit exceeded? Hard-limit exceeded?
-------------------------------------------------------------------------------------------------------------------------------
/                                         0Bytes     80%(0Bytes)   18.1GB  0Bytes             Yes                  Yes
[root@transformers ~]# 

[root@rhs-client17 fuse]# df -h .
Filesystem                   Size  Used Avail Use% Mounted on
transformers:/disperse_vol2  4.2T  1.2T  3.0T  28% /mnt/fuse
[root@rhs-client17 fuse]# 


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

[root@transformers ~]# gluster --version
glusterfs 3.7.5 built on Dec 22 2015 19:44:25
Repository revision: git://git.gluster.com/glusterfs.git
Copyright (c) 2006-2011 Gluster Inc. <http://www.gluster.com>
GlusterFS comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GlusterFS under the terms of the GNU General Public License.
[root@transformers ~]# 

How reproducible:
================
100%

Steps to Reproduce:
1. Create a disperse / distribute volume and set the quota limit on / to 0
2. Try creating files from client
3. Check the quota list 

Actual results:
===============
No disk quota exceeded message and write still go through


Expected results:
================
Disk quota exceeded


Additional info:
Comment 2 Vijaikumar Mallikarjuna 2015-12-30 01:07:13 EST
Quota enforcer assumes that if hard-limit is 0, then there is no limit set.
Solution:
1) don't allow user to set limit to 0
or
2) quota enforcer should treat hard-limit 0 is a valid limit set
Comment 3 Vijaikumar Mallikarjuna 2016-02-02 06:01:45 EST
Patch submitted upstream: http://review.gluster.org/#/c/13309/
Comment 5 Mike McCune 2016-03-28 19:10:48 EDT
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
Comment 6 Vijaikumar Mallikarjuna 2016-04-06 23:03:22 EDT
Fix "http://review.gluster.org/#/c/13309/" is available in 3.1.3 as part of rebase
Comment 8 Anil Shah 2016-04-26 02:23:29 EDT
[root@dhcp46-4 ~]# glusterfind  list
SESSION                   VOLUME                    SESSION TIME             
---------------------------------------------------------------------------
sess_abc                  testvol                   2016-04-25 18:05:02      
[root@dhcp46-4 ~]# glusterfind pre sess_abc testvol /tmp/output.txt --regenerate-outfile --no-encodeGenerated output file /tmp/output.txt
[root@dhcp46-4 ~]# cat /tmp/output.txt 
NEW контрольная 
DELETE контрольная~ 
NEW Здравствуйте 
NEW Здравствуйте/Здравствуйте 
NEW азбука 
NEW промышленность 
NEW промышленность/круто 
DELETE Мир~ 
NEW Мир 

Bug verified on build glusterfs-3.7.9-2.el7rhgs.x86_64
Comment 9 Anil Shah 2016-04-26 02:32:10 EDT
Updated wrong bug, moving this bug to ON_QA again.
Comment 10 Anil Shah 2016-04-26 03:18:24 EDT
Not able to set linit usage 0.
[root@dhcp46-4 ~]# gluster v quota dist-vol limit-usage / 0GB
Please enter an integer value in the range of (1 - 9223372036854775807)
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 build glusterfs-3.7.9-2.el7rhgs.x86_64.
Comment 15 errata-xmlrpc 2016-06-23 01:00:54 EDT
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://access.redhat.com/errata/RHBA-2016:1240

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