Bug 764778 (GLUSTER-3046)

Summary: getxattr for afr should returns realpath from all childs
Product: [Community] GlusterFS Reporter: Venky Shankar <vshankar>
Component: replicateAssignee: Venky Shankar <vshankar>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: mainlineCC: aavati, gluster-bugs, rabhat, vbellur
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: glusterfs-3.2.4, glusterfs-3.3.0qa14 Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Venky Shankar 2011-06-17 06:31:12 UTC
currently afr returns only a single pathinfo entry (as chosen by read_child child number). 

For HDFS we need realpath information about all replicas for map/reduce hints api call.

Comment 1 Anand Avati 2011-07-12 09:37:55 UTC
PATCH: http://patches.gluster.com/patch/7705 in master (afr/stripe: collect pathinfo xattrs from all childs)

Comment 2 Venky Shankar 2011-08-04 07:58:58 UTC
need same functionality for 3.{2,1} branch

Comment 3 Anand Avati 2011-08-24 10:41:41 UTC
CHANGE: http://review.gluster.com/237 (Change-Id: Iec8b609e66ef21f4fdd6ee2ff3060f0b71d47ca0) merged in release-3.2 by Vijay Bellur (vijay)

Comment 4 Raghavendra Bhat 2011-09-22 09:16:02 UTC
On master it is working. But in glusterfs-3.2.4qa2 it works for files, for directories getfattr of the attribute trusted.glusterfs.pathinfo says No such attribute.


getfattr -n trusted.glusterfs.pathinfo o/
o/: trusted.glusterfs.pathinfo: No such attribute
root@hyperspace:/mnt/client# getfattr -n trusted.glusterfs.pathinfo o/
o/: trusted.glusterfs.pathinfo: No such attribute
root@hyperspace:/mnt/client# getfattr -m . -n trusted.glusterfs.pathinfo o/
o/: trusted.glusterfs.pathinfo: No such attribute
root@hyperspace:/mnt/client# getfattr -m . -n trusted.glusterfs.pathinfo m
# file: m
trusted.glusterfs.pathinfo="(<REPLICATE:okpa-replicate-0> <POSIX:hyperspace:/mnt/sda8/export/m> <POSIX:hyperspace:/mnt/sda7/export/m>)

root@hyperspace:/mnt/client# getfattr -m . -n trusted.glusterfs.pathinfo o/*
getfattr: o/*: No such file or directory
root@hyperspace:/mnt/client# touch o/o
root@hyperspace:/mnt/client# getfattr -m . -n trusted.glusterfs.pathinfo o/*
# file: o/o
trusted.glusterfs.pathinfo="(<REPLICATE:okpa-replicate-0> <POSIX:hyperspace:/mnt/sda8/export/o/o> <POSIX:hyperspace:/mnt/sda7/export/o/o>)

root@hyperspace:/mnt/client# getfattr -m . -n trusted.glusterfs.pathinfo o
o: trusted.glusterfs.pathinfo: No such attribute

Comment 5 Raghavendra Bhat 2011-10-10 08:12:40 UTC
This is working fine now. Please reopen if found again.

mkdir okpa
root@hyperspace:/mnt/client# getfattr -m . -n trusted.glusterfs.pathinfo
Usage: getfattr [-hRLP] [-n name|-d] [-e en] [-m pattern] path...
Try `getfattr --help' for more information.
root@hyperspace:/mnt/client# getfattr -m . -n trusted.glusterfs.pathinfo okpa
# file: okpa
trusted.glusterfs.pathinfo="(mirror-dht-layout (mirror-client-0 2147483647 4294967295) (mirror-client-1 0 2147483646))

root@hyperspace:/mnt/client# touch l
root@hyperspace:/mnt/client# getfattr -m . -n trusted.glusterfs.pathinfo l
# file: l
trusted.glusterfs.pathinfo="(<DISTRIBUTE:mirror-dht> <POSIX:hyperspace:/mnt/sda8/export1/l>)

root@hyperspace:/mnt/client#