Bug 1294478

Summary: quota: limit xattr not healed for a sub-directory on a newly added bricks
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Vijaikumar Mallikarjuna <vmallika>
Component: quotaAssignee: Bug Updates Notification Mailing List <rhs-bugs>
Status: CLOSED ERRATA QA Contact: Anil Shah <ashah>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rhgs-3.1CC: asrivast, bmohanra, byarlaga, rgowdapp, rhs-bugs, sankarshan, smohan, spalai, storage-qa-internal
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 3.1.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.7.5-14 Doc Type: Bug Fix
Doc Text:
Previously, when a new brick was added to a volume which had quota enabled and a limit was set on a sub-dir, users could write data to a sub-dir even after exceeding the quota limit to this newly added brick. With this fix, this issue is resolved.
Story Points: ---
Clone Of:
: 1294479 (view as bug list) Environment:
Last Closed: 2016-03-01 06:05:50 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: 1020127, 1286188, 1286191, 1294479, 1294608    

Description Vijaikumar Mallikarjuna 2015-12-28 11:59:11 UTC
If there are any quota limit set on a sub-directory. these xattrs are not healed in a newly added brick

Steps:
1) Create a volume
2) Enable quota
3) create dir /d1
4) set limit on /d1
5) add new brick
6) send lookup from mount point so that dir /d1 is created on a new brick
7) check 'trusted.glusterfs.quota.limit-set' xattr for /d1 on a new brick


There is another issue, where limit xattr not healed on a root directory. This issue is tracked in bug# 1292073

Comment 2 Vijaikumar Mallikarjuna 2015-12-29 12:22:46 UTC
Patch submitted upstream: http://review.gluster.org/#/c/13100/

Comment 4 Vijaikumar Mallikarjuna 2015-12-30 11:07:27 UTC
upstream patch: http://review.gluster.org/#/c/13100/
release-3.7 patch: http://review.gluster.org/13108
downstream patch: https://code.engineering.redhat.com/gerrit/#/c/64638/

Comment 5 Vijaikumar Mallikarjuna 2015-12-30 11:10:27 UTC
*** Bug 1286191 has been marked as a duplicate of this bug. ***

Comment 6 Anil Shah 2016-01-07 06:07:41 UTC
[root@rhs001 /]# gluster v add-brick  testvol replica 2  10.70.47.143:/rhs/brick5/b01 10.70.47.145:/rhs/brick5/b02 10.70.47.2:/rhs/brick5/b03 10.70.47.3:/rhs/brick5/b04
volume add-brick: success
=========================================================

[root@rhs001 /]# getfattr -d -m. -e hex /rhs/brick5/b01/
.glusterfs/ test/       .trashcan/  
[root@rhs001 /]# getfattr -d -m. -e hex /rhs/brick5/b01/test/
getfattr: Removing leading '/' from absolute path names
# file: rhs/brick5/b01/test/
security.selinux=0x73797374656d5f753a6f626a6563745f723a756e6c6162656c65645f743a733000
trusted.gfid=0x24d8895471c348e89368f48a2c5d377e
trusted.glusterfs.dht=0x00000000000000000000000000000000
trusted.glusterfs.quota.00000000-0000-0000-0000-000000000001.contri.6=0x000000000000000000000000000000000000000000000001
trusted.glusterfs.quota.limit-set.6=0x0000000080000000ffffffffffffffff
trusted.glusterfs.quota.size.6=0x000000000000000000000000000000000000000000000001

==========================================================

[root@rhs002 /]# getfattr -d -m. -e hex /rhs/brick5/b02/
.glusterfs/ test/       .trashcan/  
[root@rhs002 /]# getfattr -d -m. -e hex /rhs/brick5/b02/test/
getfattr: Removing leading '/' from absolute path names
# file: rhs/brick5/b02/test/
security.selinux=0x73797374656d5f753a6f626a6563745f723a756e6c6162656c65645f743a733000
trusted.gfid=0x24d8895471c348e89368f48a2c5d377e
trusted.glusterfs.dht=0x00000000000000000000000000000000
trusted.glusterfs.quota.00000000-0000-0000-0000-000000000001.contri.6=0x000000000000000000000000000000000000000000000001
trusted.glusterfs.quota.limit-set.6=0x0000000080000000ffffffffffffffff
trusted.glusterfs.quota.size.6=0x000000000000000000000000000000000000000000000001


Bug verified on build glusterfs-3.7.5-14.el7rhgs.x86_64

Comment 8 errata-xmlrpc 2016-03-01 06:05:50 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/RHBA-2016-0193.html