glusterfs

Форк
0
/
1209752-volume-status-should-show-bitrot-scrub-info.t 
70 строк · 1.9 Кб
1
#!/bin/bash
2

3
## Test case for bitrot
4
## gluster volume status command should show status of bitrot daemon
5

6

7
. $(dirname $0)/../../include.rc
8
. $(dirname $0)/../../volume.rc
9
. $(dirname $0)/../../cluster.rc
10

11
cleanup;
12

13

14
## Start a 2 node virtual cluster
15
TEST launch_cluster 2;
16

17
## Peer probe server 2 from server 1 cli
18
TEST $CLI_1 peer probe $H2;
19

20
EXPECT_WITHIN $PROBE_TIMEOUT 1 peer_count
21

22
## Lets create and start the volume
23
TEST $CLI_1 volume create $V0 $H1:$B1/${V0}0 $H2:$B2/${V0}1
24
TEST $CLI_1 volume start $V0
25

26
## Enable bitrot on volume $V0
27
TEST $CLI_1 volume bitrot $V0 enable
28

29
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "2" get_bitd_count
30
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "2" get_scrubd_count
31

32
## From node 1 Gluster volume status command should show the status of bitrot
33
## daemon of all the nodes. there are 2 nodes in a cluster with having brick
34
## ${V0}1 and ${V0}2 . So there should be 2 bitrot daemon running.
35

36
bitd=$($CLI_1 volume status $V0 | grep "Bitrot Daemon" | grep -v grep | wc -l)
37
TEST [ "$bitd" -eq 2 ];
38

39

40

41
## From node 2 Gluster volume status command should show the status of Scrubber
42
## daemon of all the nodes. There are 2 nodes in a cluster with having brick
43
## ${V0}1 and ${V0}2 . So there should be 2 Scrubber daemon running.
44

45
scrub=$($CLI_2 volume status $V0 | grep "Scrubber Daemon" | grep -v grep | \
46
        wc -l)
47
TEST [ "$scrub" -eq 2 ];
48

49

50

51
## From node 1 Gluster volume status command should print status of only
52
## scrubber daemon. There should be total 2 scrubber daemon running, one daemon
53
## for each node
54

55
scrub=$($CLI_1 volume status $V0 scrub | grep "Scrubber Daemon" | \
56
        grep -v grep | wc -l)
57
TEST [ "$scrub" -eq 2 ];
58

59

60

61
## From node 2 Gluster volume status command should print status of only
62
## bitd daemon. There should be total 2 bitd daemon running, one daemon
63
## for each node
64

65
bitd=$($CLI_2 volume status $V0 bitd | grep "Bitrot Daemon" | \
66
       grep -v grep | wc -l)
67
TEST [ "$bitd" -eq 2 ];
68

69

70
cleanup;
71

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.