Bug 1100050

Summary: Can't write to quota enable folder
Product: [Community] GlusterFS Reporter: Brian Joiner <martinitime1975>
Component: quotaAssignee: Krutika Dhananjay <kdhananj>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: gluster-bugs, kdhananj
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.5.2beta1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-31 11:43:01 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: 1104511    

Description Brian Joiner 2014-05-21 21:25:11 UTC
Description of problem: 
Enabling folder quotas using the "limit-usage" command seems to take, but I can't write anything to the folder with the limited size.  All non quota folders are fine.

Also, even though the command "volume set gfs01-gv0 features.limit-usage enable" gives a "success" message, the option never shows in my volume info output:
gluster> volume info

Volume Name: gfs01-gv0
Type: Stripe
Volume ID: 46838144-ebc8-4ff2-a5dd-3f76cfe56a76
Status: Started
Number of Bricks: 1 x 8 = 8
Transport-type: tcp
Bricks:
Brick1: gfs01a:/gluster/brick1
Brick2: gfs01a:/gluster/brick2
Brick3: gfs01b:/gluster/brick1
Brick4: gfs01b:/gluster/brick2
Brick5: gfs01c:/gluster/brick1
Brick6: gfs01c:/gluster/brick2
Brick7: gfs01d:/gluster/brick1
Brick8: gfs01d:/gluster/brick2
Options Reconfigured:
features.default-soft-limit: 95%
features.quota-deem-statfs: on
features.quota-timeout: 0
features.quota: on
cluster.stripe-coalesce: on

Version-Release number of selected component (if applicable):
3.5


How reproducible:
Every folder I set the quota on is broken in this way


Steps to Reproduce:
1. Enable quota on folder
2. Mount volume on client node
3. Writing or touching anything in the folder with quota gives error:

[root@houdt45 01]# mkdir test2
mkdir: cannot create directory `test2': Invalid argument

Actual results:


Expected results:


Additional info:
All OS involved CentOS 6.4 64bit, and all Gluster installs 3.5 from the same rpm's.  It also fails from Ubuntu clients.
/etc/fstab line = gfs01a:/gfs01-gv0       /gfs01  glusterfs       rw,noauto       0       0

Comment 1 Brian Joiner 2014-05-21 21:33:35 UTC
Bricks are formatted with XFS.

I can delete an existing file/subfolder that was created before the quota was turned on, but still cannot create/modify files or folders.

Comment 2 Anand Avati 2014-06-22 13:26:48 UTC
REVIEW: http://review.gluster.org/8145 (cluster/stripe: Fix EINVAL errors on quota enabled volumes) posted (#1) for review on master by Krutika Dhananjay (kdhananj)

Comment 3 Anand Avati 2014-06-23 11:36:14 UTC
REVIEW: http://review.gluster.org/8145 (cluster/stripe: Fix EINVAL errors on quota enabled volumes) posted (#2) for review on master by Krutika Dhananjay (kdhananj)

Comment 4 Brian Joiner 2014-06-23 15:23:19 UTC
Robert Dildy is working with us, he says hi!

(In reply to Anand Avati from comment #2)
> REVIEW: http://review.gluster.org/8145 (cluster/stripe: Fix EINVAL errors on
> quota enabled volumes) posted (#1) for review on master by Krutika Dhananjay
> (kdhananj)

Comment 5 Anand Avati 2014-06-26 16:58:39 UTC
COMMIT: http://review.gluster.org/8145 committed in master by Vijay Bellur (vbellur) 
------
commit e93e7d3050544a09785753d56c18f6538423915e
Author: Krutika Dhananjay <kdhananj>
Date:   Sun Jun 22 15:20:19 2014 +0530

    cluster/stripe: Fix EINVAL errors on quota enabled volumes
    
    Write operations on directories with quota enabled used to fail with
    EINVAL on stripe volumes. This was due to assert failure in
    stripe_lookup(), meant to ensure loc->path is not NULL. However,
    in nameless lookup (in this particular case triggered by quotad, which
    has stripe xlator in its graph), loc->path can be legitimately NULL.
    
    The fix involves removing this check in stripe_lookup().
    
    Change-Id: Ibbd4f68763fdd8a85f29da78b3937cef1ee4fd1e
    BUG: 1100050
    Signed-off-by: Krutika Dhananjay <kdhananj>
    Reviewed-on: http://review.gluster.org/8145
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 6 Anand Avati 2014-06-27 02:18:47 UTC
REVIEW: http://review.gluster.org/8186 (cluster/stripe: Fix EINVAL errors on quota enabled volumes) posted (#1) for review on release-3.5 by Krutika Dhananjay (kdhananj)

Comment 7 Anand Avati 2014-06-27 08:46:36 UTC
COMMIT: http://review.gluster.org/8186 committed in release-3.5 by Niels de Vos (ndevos) 
------
commit bf7c6105f643683e76e5659f028e6a08dabb019c
Author: Krutika Dhananjay <kdhananj>
Date:   Sun Jun 22 15:20:19 2014 +0530

    cluster/stripe: Fix EINVAL errors on quota enabled volumes
    
            Backport of http://review.gluster.org/8145
    
    Write operations on directories with quota enabled used to fail with
    EINVAL on stripe volumes. This was due to assert failure in
    stripe_lookup(), meant to ensure loc->path is not NULL. However,
    in nameless lookup (in this particular case triggered by quotad, which
    has stripe xlator in its graph), loc->path can be legitimately NULL.
    
    The fix involves removing this check in stripe_lookup().
    
    Change-Id: Ibbd4f68763fdd8a85f29da78b3937cef1ee4fd1e
    BUG: 1100050
    Signed-off-by: Krutika Dhananjay <kdhananj>
    Reviewed-on: http://review.gluster.org/8186
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>
    Reviewed-by: Niels de Vos <ndevos>

Comment 8 Niels de Vos 2014-07-21 15:41:31 UTC
The first (and last?) Beta for GlusterFS 3.5.2 has been released [1]. Please verify if the release solves this bug report for you. In case the glusterfs-3.5.2beta1 release does not have a resolution for this issue, leave a comment in this bug and move the status to ASSIGNED. If this release fixes the problem for you, leave a note and change the status to VERIFIED.

Packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update (possibly an "updates-testing" repository) infrastructure for your distribution.

[1] http://supercolony.gluster.org/pipermail/gluster-devel/2014-July/041636.html
[2] http://supercolony.gluster.org/pipermail/gluster-users/

Comment 9 Niels de Vos 2014-07-31 11:43:01 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.5.2, please reopen this bug report.

glusterfs-3.5.2 has been announced on the Gluster Users mailinglist [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://supercolony.gluster.org/pipermail/gluster-users/2014-July/041217.html
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user