Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1511766 - The number of bytes of the quota specified in version 3.7 or later is incorrect [NEEDINFO]
Summary: The number of bytes of the quota specified in version 3.7 or later is incorrect
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: quota
Version: unspecified
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
: RHGS 3.4.0
Assignee: Sanoj Unnikrishnan
QA Contact: Vinayak Papnoi
URL:
Whiteboard:
Depends On: 1510940
Blocks: 1503137
TreeView+ depends on / blocked
 
Reported: 2017-11-10 04:58 UTC by Sanoj Unnikrishnan
Modified: 2018-09-20 09:42 UTC (History)
10 users (show)

Fixed In Version: glusterfs-3.12.2-2
Doc Type: Bug Fix
Doc Text:
Previously, it was not possible to have more than 7712 limits configured for a volume due to limitations on how the quota.conf file was read and written. With this fix, you can now configure more than 65000 limits on a single volume.
Clone Of: 1510940
Environment:
Last Closed: 2018-09-04 06:39:09 UTC
srmukher: needinfo? (sunnikri)


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:2607 None None None 2018-09-04 06:40:27 UTC

Description Sanoj Unnikrishnan 2017-11-10 04:58:16 UTC
+++ This bug was initially created as a clone of Bug #1510940 +++

+++ This bug was initially created as a clone of Bug #1489043 +++

Description of problem:
The number of bytes specified in version 3.7 or later is incorrect. Therefore, only 7711 quota settings can be registered.


How reproducible:
When 7711 or more quotas are registered, the following error occurs.

"quota.conf corrupted"


Additional info:

glusterfs/xlators/mgmt/glusterd/src/glusterd-quota.c
Line 927

while ((bytes_read = sys_read (src_fd, (void *)&buf, entry_sz)) > 0) {
    if (bytes_read % 16 != 0) {

--- Additional comment from Worker Ant on 2017-11-08 08:14:28 EST ---

REVIEW: https://review.gluster.org/18695 (quota: fixes issue in quota.conf when setting large number of limits) posted (#3) for review on master by sanoj-unnikrishnan

--- Additional comment from Worker Ant on 2017-11-09 16:15:34 EST ---

COMMIT: https://review.gluster.org/18695 committed in master by  

------------- quota: fixes issue in quota.conf when setting large number of limits

Problem: It was not possible to configure more than 7712 quota limits.
This was because a stack buffer of size 131072 was used to read from
quota.conf file. In the new format of quota.conf file each gfid entry
takes 17bytes (16byte gfid + 1 byte type). So, the buf_size was not a
multiple of gfid entry size and as per code this was considered as
corruption.

Solution: make buf size multiple of gfid entry size

Change-Id: Id036225505a47a4f6fa515a572ee7b0c958f30ed
BUG: 1510940
Signed-off-by: Sanoj Unnikrishnan <sunnikri@redhat.com>

Comment 4 Vinayak Papnoi 2018-03-13 07:36:16 UTC
Build : glusterfs-3.12.2-5.el7rhgs.x86_64

Quota limits more than 7711 are now possible to set on a volume.

[root@dhcp42-68 ~]# time gluster v quota distrep list | wc -l
8197

real	1m28.938s
user	0m8.801s
sys	0m3.117s
[root@dhcp42-68 ~]#

As seen above , 8197 quota limits are set on the volume.

Hence, moving bug to VERIFIED.

Comment 7 errata-xmlrpc 2018-09-04 06:39:09 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://access.redhat.com/errata/RHSA-2018:2607


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