Bug 1489043 - The number of bytes of the quota specified in version 3.7 or later is incorrect
Summary: The number of bytes of the quota specified in version 3.7 or later is incorrect
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: quota
Version: 3.12
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Sanoj Unnikrishnan
QA Contact:
URL:
Whiteboard:
Depends On: 1510940
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-06 15:49 UTC by kaminariman
Modified: 2018-02-01 04:43 UTC (History)
2 users (show)

Fixed In Version: glusterfs-3.12.5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1510940 (view as bug list)
Environment:
Last Closed: 2018-02-01 04:43:00 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description kaminariman 2017-09-06 15:49:05 UTC
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) {

Comment 1 Sanoj Unnikrishnan 2017-10-09 09:32:40 UTC
marking as low pri since this is scaling limit of quota.conf file. The configuration file may also change when glusterd2 is used.

Comment 2 Worker Ant 2017-11-08 11:11:52 UTC
REVIEW: https://review.gluster.org/18695 (quota: fixes issue in quota.conf when setting large number of limits) posted (#1) for review on master by sanoj-unnikrishnan

Comment 3 Worker Ant 2017-11-08 13:14:25 UTC
REVISION POSTED: 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

Comment 4 Worker Ant 2017-11-30 06:03:39 UTC
REVIEW: https://review.gluster.org/18895 (quota: fixes issue in quota.conf when setting large number of limits) posted (#1) for review on release-3.12 by sanoj-unnikrishnan

Comment 5 Worker Ant 2018-01-10 06:59:40 UTC
COMMIT: https://review.gluster.org/18895 committed in release-3.12 by \"sanoj-unnikrishnan\" <sunnikri@redhat.com> with a commit message- 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: 1489043
Signed-off-by: Sanoj Unnikrishnan <sunnikri@redhat.com>
(cherry picked from commit 2899a4f125735636fe7cd8db73c0b8a13289df9b)

Comment 6 Jiffin 2018-02-01 04:43:00 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.12.5, please open a new bug report.

glusterfs-3.12.5 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://lists.gluster.org/pipermail/gluster-devel/2018-February/054356.html
[2] https://www.gluster.org/pipermail/gluster-users/


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