blob: 22a8d557d28a2d4340ad9c999c17d51e02eae884 (
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
49
50
51
52
53
54
|
#!/bin/bash
. $(dirname $0)/../../include.rc
. $(dirname $0)/../../cluster.rc
cleanup
TEST launch_cluster 3;
TEST $CLI_1 peer probe $H2;
TEST $CLI_1 peer probe $H3;
EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count
TEST $CLI_1 volume create $V0 $H1:$B1/$V0 $H2:$B2/$V0
TEST $CLI_1 volume start $V0
kill_glusterd 2
#remove-brick should fail as the peer hosting the brick is down
TEST ! $CLI_1 volume remove-brick $V0 $H2:$B2/${V0} start
TEST start_glusterd 2
EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count
#volume status should work
TEST $CLI_2 volume status
TEST $CLI_1 volume remove-brick $V0 $H2:$B2/${V0} start
kill_glusterd 2
#remove-brick commit should fail as the peer hosting the brick is down
TEST ! $CLI_1 volume remove-brick $V0 $H2:$B2/${V0} commit
TEST start_glusterd 2
EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count
#volume status should work
TEST $CLI_2 volume status
TEST $CLI_1 volume remove-brick $V0 $H2:$B2/${V0} stop
kill_glusterd 3
EXPECT_WITHIN $PROBE_TIMEOUT 1 peer_count
TEST $CLI_1 volume remove-brick $V0 $H2:$B2/${V0} start
TEST start_glusterd 3
EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count
TEST $CLI_3 volume status
cleanup
|