diff options
author | Dan Lambright <dlambrig@redhat.com> | 2015-03-30 14:27:44 -0400 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2015-04-08 07:28:21 +0000 |
commit | a8260044291cb6eee44974d8c52caa9f4cfb3993 (patch) | |
tree | 3b9b0f83bd6ae869a26a75dafdc988196a62d049 /tests/basic/tier | |
parent | f0cd1d73c63001740cd7691a77df7631c9b8e8dc (diff) |
glusterd: Support distributed replicated volumes on hot tier
We did not set up the graph properly for hot tiers with replicated
subvolumes. Also add check that the file has not already been moved
by another replicated brick on the same node.
Change-Id: I9adef565ab60f6774810962d912168b77a6032fa
BUG: 1206517
Signed-off-by: Dan Lambright <dlambrig@redhat.com>
Reviewed-on: http://review.gluster.org/10054
Reviewed-by: Joseph Fernandes <josferna@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'tests/basic/tier')
-rwxr-xr-x | tests/basic/tier/tier.t | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/tests/basic/tier/tier.t b/tests/basic/tier/tier.t index 58846412358..d1e1041f87c 100755 --- a/tests/basic/tier/tier.t +++ b/tests/basic/tier/tier.t @@ -3,6 +3,12 @@ . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc +LAST_BRICK=3 +CACHE_BRICK_FIRST=4 +CACHE_BRICK_LAST=5 +DEMOTE_TIMEOUT=12 +PROMOTE_TIMEOUT=5 + function file_on_slow_tier { s=$(md5sum $1) for i in `seq 0 $LAST_BRICK`; do @@ -19,8 +25,9 @@ function file_on_fast_tier { local ret="1" s1=$(md5sum $1) - s2=$(md5sum $B0/${V0}${CACHE_BRICK}/$1) - if [ -e $B0/${V0}${CACHE_BRICK}/$1 ] && ! [ "$s1" == "$s2" ]; then + s2=$(md5sum $B0/${V0}${CACHE_BRICK_FIRST}/$1) + + if [ -e $B0/${V0}${CACHE_BRICK_FIRST}/$1 ] && ! [ "$s1" == "$s2" ]; then echo "0" else echo "1" @@ -45,17 +52,14 @@ function confirm_vol_stopped { fi } -LAST_BRICK=1 -CACHE_BRICK=2 -DEMOTE_TIMEOUT=12 -PROMOTE_TIMEOUT=5 cleanup TEST glusterd TEST pidof glusterd -TEST $CLI volume create $V0 $H0:$B0/${V0}{0..$LAST_BRICK} -TEST $CLI volume attach-tier $V0 $H0:$B0/${V0}${CACHE_BRICK} + +TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{0..$LAST_BRICK} +TEST $CLI volume attach-tier $V0 replica 2 $H0:$B0/${V0}$CACHE_BRICK_FIRST $H0:$B0/${V0}$CACHE_BRICK_LAST TEST $CLI volume start $V0 TEST $CLI volume set $V0 features.ctr-enabled on TEST $GFS --volfile-id=/$V0 --volfile-server=$H0 $M0; @@ -120,7 +124,7 @@ TEST $CLI volume detach-tier $V0 # temporarily comment out #TEST ! [ -e $M0/d1/data.txt ] -EXPECT "0" confirm_tier_removed ${V0}${CACHE_BRICK} +EXPECT "0" confirm_tier_removed ${V0}${CACHE_BRICK_FIRST} EXPECT_WITHIN $REBALANCE_TIMEOUT "0" confirm_vol_stopped $V0 |