blob: 2b3b3040228b5560572da7e42f7f095489cecf0d (
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)/../../volume.rc
. $(dirname $0)/../../afr.rc
TESTS_EXPECTED_IN_LOOP=21
function reset_cluster
{
cleanup
TEST glusterd
TEST pidof glusterd
}
function check_iot_option
{
local enabled=$1
local is_loaded_in_graph=$2
EXPECT "$enabled" volume_get_field $V0 client-io-threads
IOT_STRING="volume\ $V0-io-threads"
grep "$IOT_STRING" $GLUSTERD_WORKDIR/vols/$V0/trusted-$V0.tcp-fuse.vol
TEST ret=$?
EXPECT_NOT "$is_loaded_in_graph" echo $ret
}
reset_cluster
TEST $CLI volume create $V0 $H0:$B0/${V0}{0,1}
check_iot_option on 1
reset_cluster
TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{0,1}
check_iot_option off 0
reset_cluster
TEST $CLI volume create $V0 $H0:$B0/${V0}0
TEST $CLI volume add-brick $V0 replica 2 $H0:$B0/${V0}1
check_iot_option off 0
TEST $CLI volume remove-brick $V0 replica 1 $H0:$B0/${V0}1 force
check_iot_option on 1
reset_cluster
TEST $CLI volume create $V0 replica 3 $H0:$B0/${V0}{0..5}
TEST $CLI volume set $V0 client-io-threads on
check_iot_option on 1
TEST $CLI volume remove-brick $V0 replica 2 $H0:$B0/${V0}2 $H0:$B0/${V0}5 force
check_iot_option on 1
cleanup
|