File: 005

package info (click to toggle)
sheepdog 0.8.3-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,364 kB
  • ctags: 3,951
  • sloc: ansic: 30,552; sh: 3,573; perl: 2,924; asm: 453; makefile: 391; python: 192
file content (39 lines) | stat: -rwxr-xr-x 663 bytes parent folder | download | duplicates (3)
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
#!/bin/bash

# Test cluster membership by killing and adding nodes

. ./common

for i in 0 1; do
    _start_sheep $i
done

_wait_for_sheep 2
# start Sheepdog with two nodes
_cluster_format -c 1

for i in 2 3 4; do
    _wait_for_sheep 2 $((i - 2))
    _kill_sheep $((i - 2))
    _wait_for_sheep 1 $((i - 1))

    _start_sheep $i
done

_wait_for_sheep 2 4

$DOG cluster shutdown -p 7004
_wait_for_sheep_stop

nr=0
for i in 0 1 2 3 4; do
    _start_sheep $i
    nr=$(($nr + 1))
    _wait_for_sheep $nr 0
done

_wait_for_sheep 5
echo check whether all nodes have the same cluster info
for i in 0 1 2 3 4; do
    $DOG cluster info -p 700$i | _filter_cluster_info
done