diff options
author | Jeff Darcy <jdarcy@redhat.com> | 2013-03-19 14:06:39 -0400 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-03-21 15:04:31 -0700 |
commit | 76bc5d1b2d25a4f25f4cf458e43ec3e19c3efae6 (patch) | |
tree | 6b331f8f900633aa05d15d41a8f3808edc7d87ce /tests | |
parent | 790cbb82a12accc99312117bfa632227c8127f53 (diff) |
dht: make DHT xattr names configurable
This is necessary to support "DHT over DHT" configurations, so that the
upper and lower instances of DHT don't step all over each other. Why
would we even consider such a thing? Because it gives us the ability to
do data tiering and rack-aware placement, either by themselves or as
complements to other functionality such as erasure codes or
deduplication which save space but cost performance. By setting up the
top-level DHT to place data into one of several lower-level DHT pools
based on policy instead of pure elastic hashing, we get better
performance for 90% of accesses and better storage efficiency for 90% of
data, all for relatively low effort.
Change-Id: I72e65c29edfc80babf39f7a2a00090f4588c4070
BUG: 924265
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/4694
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/bugs/bug-924265.t | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/bugs/bug-924265.t b/tests/bugs/bug-924265.t new file mode 100755 index 00000000000..13491356dbc --- /dev/null +++ b/tests/bugs/bug-924265.t @@ -0,0 +1,35 @@ +#!/bin/bash + +# Test that setting cluster.dht-xattr-name works, and that DHT consistently +# uses the specified name instead of the default. + +. $(dirname $0)/../include.rc +. $(dirname $0)/../volume.rc + +# We only care about the exit code, so keep it quiet. +function silent_getfattr { + getfattr $* &> /dev/null +} + +cleanup + +TEST glusterd +TEST pidof glusterd + +mkdir -p $H0:$B0/${V0}0 + +# Create a volume and set the option. +TEST $CLI volume create $V0 $H0:$B0/${V0}0 +TEST $CLI volume set $V0 cluster.dht-xattr-name trusted.foo.bar + +# Start and mount the volume. +TEST $CLI volume start $V0 +EXPECT_WITHIN 15 'Started' volinfo_field $V0 'Status'; +TEST glusterfs --volfile-server=$H0 --volfile-id=$V0 $M0 + +# Create a directory and make sure it has the right xattr. +mkdir $M0/test +TEST ! silent_getfattr -n trusted.glusterfs.dht $B0/${V0}0/test +TEST silent_getfattr -n trusted.foo.bar $B0/${V0}0/test + +cleanup |