offline1.sim 1.4 KB
Newer Older
S
slguan 已提交
1 2
system sh/stop_dnodes.sh

S
slguan 已提交
3 4 5
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
S
slguan 已提交
6 7 8 9 10

system sh/cfg.sh -n dnode1 -c offlineThreshold -v 10
system sh/cfg.sh -n dnode2 -c offlineThreshold -v 10
system sh/cfg.sh -n dnode3 -c offlineThreshold -v 10

S
slguan 已提交
11 12 13 14
system sh/cfg.sh -n dnode1 -c balanceInterval -v 5
system sh/cfg.sh -n dnode2 -c balanceInterval -v 5
system sh/cfg.sh -n dnode3 -c balanceInterval -v 5

S
slguan 已提交
15 16 17 18 19 20 21 22 23
system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 4

system sh/cfg.sh -n dnode1 -c clog -v 1
system sh/cfg.sh -n dnode2 -c clog -v 1
system sh/cfg.sh -n dnode3 -c clog -v 1

print ========== step1
S
script  
slguan 已提交
24
system sh/exec_up.sh -n dnode1 -s start
S
slguan 已提交
25
sql connect
S
slguan 已提交
26
sql create dnode $hostname2
S
script  
slguan 已提交
27
system sh/exec_up.sh -n dnode2 -s start
S
slguan 已提交
28 29 30
sleep 3000

sql show dnodes
S
slguan 已提交
31 32 33 34
print dnode1 $data4_1
print dnode1 $data4_2

if $data4_1 != ready then
S
slguan 已提交
35 36
  return -1
endi
S
slguan 已提交
37
if $data4_2 != ready then
S
slguan 已提交
38 39 40 41
  return -1
endi

print ========== step2
S
script  
slguan 已提交
42
system sh/exec_up.sh -n dnode2 -s stop -x SIGINT
S
slguan 已提交
43
sleep 8000
S
slguan 已提交
44 45

sql show dnodes
S
slguan 已提交
46 47 48 49
print dnode1 $data4_1
print dnode1 $data4_2

if $data4_1 != ready then
S
slguan 已提交
50 51
  return -1
endi
S
slguan 已提交
52
if $data4_2 != offline then
S
slguan 已提交
53 54 55 56 57 58 59
  return -1
endi

print ========== step3
sleep 10000

sql show dnodes
S
slguan 已提交
60 61 62 63 64
print dnode1 $data4_1
print dnode1 $data4_2

if $data4_1 != ready then
  return -1
S
slguan 已提交
65
endi
S
slguan 已提交
66 67
if $data4_2 != null then
  return -1
S
slguan 已提交
68 69
endi