diff options
author | Venky Shankar <vshankar@redhat.com> | 2013-02-21 22:10:27 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-04-05 14:40:53 -0700 |
commit | 24ee79345fc7346ef78b8adf54008ae77524026b (patch) | |
tree | 55129f2b72e766fba2b7c04d9bcb1b283cf2de05 /tests/bugs/bug-765380.t | |
parent | 6a7d28c0f8c107baf376eceb9fc05d9e80bf74e5 (diff) |
storage/posix: introduce node-uuid-pathinfo
enabling this option has an effect on pathinfo xattr
request returning <node-uuid>:<path> instead of the
default - which is <hostname>:<path>.
Change-Id: Ice1b38abf8e5df1568bab6d79ec0d53dfa520332
BUG: 765380
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/4567
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'tests/bugs/bug-765380.t')
-rw-r--r-- | tests/bugs/bug-765380.t | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/bugs/bug-765380.t b/tests/bugs/bug-765380.t new file mode 100644 index 00000000000..a9784b93d0c --- /dev/null +++ b/tests/bugs/bug-765380.t @@ -0,0 +1,39 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc + +cleanup; + +TEST glusterd +TEST pidof glusterd + +REPLICA=2 + +TEST $CLI volume create $V0 replica $REPLICA $H0:$B0/${V0}00 $H0:$B0/${V0}01 $H0:$B0/${V0}10 $H0:$B0/${V0}11 +TEST $CLI volume start $V0 + +## Mount FUSE with caching disabled +TEST glusterfs --entry-timeout=0 --attribute-timeout=0 -s $H0 --volfile-id $V0 $M0; + +function count_hostname_or_uuid_from_pathinfo() +{ + pathinfo=`getfattr -m . -n trusted.glusterfs.pathinfo $M0/f00f` + echo $pathinfo | grep -o $1 | wc -l +} + +touch $M0/f00f + +EXPECT $REPLICA count_hostname_or_uuid_from_pathinfo $H0 + +# turn on node-uuid-pathinfo option +TEST $CLI volume set $V0 node-uuid-pathinfo on + +# do not expext hostname as part of the pathinfo string +EXPECT 0 count_hostname_or_uuid_from_pathinfo $H0 + +uuid=`grep UUID /var/lib/glusterd/glusterd.info | cut -f2 -d=` + +# ... but expect the uuid $REPLICA times +EXPECT $REPLICA count_hostname_or_uuid_from_pathinfo $uuid + +cleanup; |