From 99b778cbe179104af602b6eedebd31695bec16ae Mon Sep 17 00:00:00 2001 From: Dan Lambright Date: Mon, 13 Apr 2015 02:42:12 +0100 Subject: glusterd: support for tier volumes 'detach start' and 'detach commit' Back port of http://review.gluster.org/10108 These commands work in a manner analagous to rebalancing when removing a brick. The existing migration daemon detects "detach start" and switches to moving data off the hot tier. While in this state all lookups are directed to the cold tier. gluster v detach-tier start gluster v detach-tier commit The status and stop cli commands shall be submitted separately. >Change-Id: I24fda5cc3ba74f5fb8aa9a3234ad51f18b80a8a0 >BUG: 1205540 >Signed-off-by: Dan Lambright >Signed-off-by: root >Signed-off-by: Dan Lambright >Reviewed-on: http://review.gluster.org/10108 >Reviewed-by: Kaleb KEITHLEY Change-Id: I212d748d077fb5870ee84b316c653acbafbea3f7 BUG: 1220047 Signed-off-by: Mohammed Rafi KC Reviewed-on: http://review.gluster.org/10708 Reviewed-by: Dan Lambright Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- tests/basic/tier/tier.t | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'tests') diff --git a/tests/basic/tier/tier.t b/tests/basic/tier/tier.t index 6097ad6e7d6..fe15395cf4b 100755 --- a/tests/basic/tier/tier.t +++ b/tests/basic/tier/tier.t @@ -36,7 +36,7 @@ function file_on_fast_tier { function confirm_tier_removed { $CLI system getspec $V0 | grep $1 - if [ $? == 0 ] ; then + if [ $? == 0 ]; then echo "1" else echo "0" @@ -52,6 +52,11 @@ function confirm_vol_stopped { fi } +LAST_BRICK=1 +CACHE_BRICK=2 +DEMOTE_TIMEOUT=12 +PROMOTE_TIMEOUT=5 +MIGRATION_TIMEOUT=10 cleanup @@ -108,21 +113,18 @@ sleep 5 EXPECT_WITHIN $PROMOTE_TIMEOUT "0" file_on_fast_tier d1/data2.txt EXPECT_WITHIN $PROMOTE_TIMEOUT "0" file_on_fast_tier d1/data3.txt -# Test rebalance commands -TEST $CLI volume rebalance $V0 tier status -TEST $CLI volume rebalance $V0 stop - # stop gluster, when it comes back info file should have tiered volume killall glusterd TEST glusterd -# TODO: Remove force. Gracefully migrate data off hot tier. -# Rebalance+promotion/demotion is under construction. +# Test rebalance commands +TEST $CLI volume rebalance $V0 tier status + +TEST $CLI volume detach-tier $V0 start -TEST $CLI volume detach-tier $V0 +TEST $CLI volume detach-tier $V0 commit -# temporarily comment out -#TEST ! [ -e $M0/d1/data.txt ] +EXPECT "0" file_on_slow_tier d1/data.txt EXPECT "0" confirm_tier_removed ${V0}${CACHE_BRICK_FIRST} -- cgit