summaryrefslogtreecommitdiffstats
path: root/tests/bugs/bug-973073.t
blob: 3ea54132a83ec6e63074c709ef92271b3882209e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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 $REBALANCE_TIMEOUT "0" remove_brick_completed

TEST $CLI volume remove-brick $V0 $H0:$B0/${V0}2 stop

TEST $CLI volume rebalance $V0 fix-layout start

EXPECT_WITHIN $REBALANCE_TIMEOUT "0" rebalance_completed

TEST mkdir $M0/dir 2>/dev/null;

EXPECT "0" get_layout $B0/${V0}2/dir
cleanup;