From de31ac421953997ad148aea87f7176b2a10f07c4 Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Tue, 11 Jun 2013 14:14:53 +0530 Subject: cluster/dht: In reconfig handle removed decommissioned nodes If no decommissioned nodes options are set in the options, then clear the conf->decommissioned_bricks. Change-Id: I426d2bcc874aab21b2eba0b16a580b9a26672ea2 Signed-off-by: shishir gowda BUG: 973073 Reviewed-on: http://review.gluster.org/5199 Reviewed-by: Amar Tumballi Reviewed-by: Vijay Bellur Tested-by: Gluster Build System Reviewed-by: Anand Avati --- tests/bugs/bug-973073.t | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 tests/bugs/bug-973073.t (limited to 'tests/bugs') diff --git a/tests/bugs/bug-973073.t b/tests/bugs/bug-973073.t new file mode 100755 index 00000000..83e2839c --- /dev/null +++ b/tests/bugs/bug-973073.t @@ -0,0 +1,48 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc +. $(dirname $0)/../dht.rc + +## Steps followed are one descibed in bugzilla + +cleanup; + +function get_layout() +{ + layout1=`getfattr -n trusted.glusterfs.dht -e hex $1 2>&1` + + if [ $? -ne 0 ] + then + echo 1 + else + echo 0 + fi + +} + +BRICK_COUNT=3 + +TEST glusterd +TEST pidof glusterd + +TEST $CLI volume create $V0 $H0:$B0/${V0}0 $H0:$B0/${V0}1 $H0:$B0/${V0}2 +TEST $CLI volume start $V0 + +## Mount FUSE +TEST glusterfs -s $H0 --volfile-id $V0 $M0; + +TEST $CLI volume remove-brick $V0 $H0:$B0/${V0}2 start + +## remove-brick status == rebalance_status +EXPECT_WITHIN 30 "0" rebalance_completed + +TEST $CLI volume remove-brick $V0 $H0:$B0/${V0}2 stop + +TEST $CLI volume rebalance $V0 fix-layout start + +EXPECT_WITHIN 30 "0" rebalance_completed + +TEST mkdir $M0/dir 2>/dev/null; + +EXPECT "0" get_layout $B0/${V0}2/dir +cleanup; -- cgit