Bug 1287539 - xattrs on directories are unavailable on distributed replicated volume after adding new bricks
xattrs on directories are unavailable on distributed replicated volume after ...
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: distribute (Show other bugs)
mainline
x86_64 Linux
urgent Severity urgent
: ---
: ---
Assigned To: Susant Kumar Palai
: Triaged
Depends On:
Blocks: 1285167 1296108
  Show dependency treegraph
 
Reported: 2015-12-02 05:11 EST by Susant Kumar Palai
Modified: 2016-06-16 09:47 EDT (History)
12 users (show)

See Also:
Fixed In Version: glusterfs-3.8rc2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1285167
: 1296108 (view as bug list)
Environment:
Last Closed: 2016-06-16 09:47:58 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)

  None (edit)
Comment 1 Vijay Bellur 2015-12-02 05:11:52 EST
REVIEW: http://review.gluster.org/12845 (cluster/dht: Handle failure in getxattr) posted (#1) for review on master by Susant Palai (spalai@redhat.com)
Comment 2 Susant Kumar Palai 2015-12-02 05:38:54 EST
Description of problem:

Adding new bricks to a distributed replicated volume results in unavailability of xattrs on directories on distributed replicated volume where gluster is creating the dirs on the new bricks but not with the appropriate xattrs as xattrs on files are fine.

How reproducible:

1. Create test volume and start
gluster vol create test replica 2 server1:/brick01/bricksrv01/test server2:/brick01/bricksrv02/test ; gluster vol test start

2. Mount the volume via fuse
mkdir -p /mnt/gluster/test; mount -t glusterfs -o defaults,_netdev server1:test /mnt/gluster/test
 
3. Generate some dummy data
cd /mnt/gluster/test;mkdir dir{1..20};touch dir{1..20}/testfile

4. Set xattrs on files and directories
find . -exec setfattr -n user.swift.metadata -v dummyMetadataForTesting {} \;

5. Confirm xattrs are retrievable. xattrs should be retrievable for both files and directories find . -type f -exec getfattr -d -m. -e text {} \; find . -type d -exec getfattr -d -m. -e text {} \;

6. Add 2 new bricks to volume
gluster vol add-brick test replica 2 server3:/brick01/bricksrv03/test server4:/brick01/bricksrv04/test

7. Rebalance the volume.

8. Try and retrieve xattrs on files. This should succeed.
find . -type f -exec getfattr -d -m. -e text {} \;

9. Try and retrieve xattrs on dirs. All dirs should fail with "user.swift.metadata: No such attribute"
Find . -type d -exec getfattr -d -m. -e text {} \;

Actual results:

"user.swift.metadata: No such attribute" xattrs on directory after adding bricks.

Expected results:

Result with user.swift.metadata="dummyMetadataForTesting" xattrs as per file after adding bricks.
Comment 3 Vijay Bellur 2015-12-09 04:02:59 EST
REVIEW: http://review.gluster.org/12845 (cluster/dht: Handle failure in getxattr) posted (#2) for review on master by Susant Palai (spalai@redhat.com)
Comment 4 Vijay Bellur 2015-12-09 08:17:46 EST
REVIEW: http://review.gluster.org/12845 (cluster/dht: Handle failure in getxattr) posted (#3) for review on master by Susant Palai (spalai@redhat.com)
Comment 5 Vijay Bellur 2015-12-15 04:09:39 EST
REVIEW: http://review.gluster.org/12845 (cluster/dht: Handle failure in getxattr) posted (#4) for review on master by Susant Palai (spalai@redhat.com)
Comment 6 Vijay Bellur 2015-12-17 02:09:57 EST
COMMIT: http://review.gluster.org/12845 committed in master by Raghavendra G (rgowdapp@redhat.com) 
------
commit 692ccdbd4d11311a1967d62227666d2c473ea233
Author: Susant Palai <spalai@redhat.com>
Date:   Wed Dec 2 04:59:55 2015 -0500

    cluster/dht: Handle failure in getxattr
    
    Problem: Currently even if we have received xattrs from any one of
    the subvolume, we unwind with error in case the last subvol (which
    unwinds) received a negative response.
    
    To handle the case check if any of the subvolume has received
    a response and pass it down.
    
    Change-Id: Ia12a1f9671a6764f7550e6dc223324b1039fcc51
    BUG: 1287539
    Signed-off-by: Susant Palai <spalai@redhat.com>
    Reviewed-on: http://review.gluster.org/12845
    Tested-by: NetBSD Build System <jenkins@build.gluster.org>
    Tested-by: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Comment 7 Vijay Bellur 2015-12-21 01:48:47 EST
REVIEW: http://review.gluster.org/12880 (cluster/dht: Heal user xattrs) posted (#5) for review on master by Susant Palai (spalai@redhat.com)
Comment 8 Vijay Bellur 2015-12-22 01:47:50 EST
REVIEW: http://review.gluster.org/12880 (cluster/dht: Heal user xattrs) posted (#6) for review on master by Susant Palai (spalai@redhat.com)
Comment 9 Vijay Bellur 2015-12-28 01:50:50 EST
REVIEW: http://review.gluster.org/12880 (cluster/dht: Heal user xattrs) posted (#7) for review on master by Susant Palai (spalai@redhat.com)
Comment 10 Mike McCune 2016-03-28 19:36:13 EDT
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
Comment 11 Niels de Vos 2016-06-16 09:47:58 EDT
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.8.0, please open a new bug report.

glusterfs-3.8.0 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://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

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