summaryrefslogtreecommitdiffstats
path: root/tests/basic/tier/tier.t
diff options
context:
space:
mode:
authorDan Lambright <dlambrig@redhat.com>2015-04-13 02:42:12 +0100
committerKaleb KEITHLEY <kkeithle@redhat.com>2015-04-22 07:51:03 -0700
commit86b02afab780e559e82399b9e96381d8df594ed6 (patch)
treee59242b087191dfb6af7b302b18a59206a9cd17c /tests/basic/tier/tier.t
parentabbc525dd3cbe142753c5b44a2717c1ed6b26723 (diff)
glusterd: support for tier volumes 'detach start' and 'detach commit'
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 <vol> start gluster v detach-tier <vol> commit The status and stop cli commands shall be submitted separately. Change-Id: I24fda5cc3ba74f5fb8aa9a3234ad51f18b80a8a0 BUG: 1205540 Signed-off-by: Dan Lambright <dlambrig@redhat.com> Signed-off-by: root <root@localhost.localdomain> Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/10108 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: NetBSD Build System
Diffstat (limited to 'tests/basic/tier/tier.t')
-rwxr-xr-xtests/basic/tier/tier.t22
1 files changed, 12 insertions, 10 deletions
diff --git a/tests/basic/tier/tier.t b/tests/basic/tier/tier.t
index d1e1041f87c..f1174e60fed 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}