forked from opencurve/curve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
curve_failover_robot.txt
584 lines (523 loc) · 16.3 KB
/
curve_failover_robot.txt
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
*** Settings ***
Library Resources/keywords/base_operate.py
Library Resources/test/curve_base_test.py
Library Resources/swig/swig_operate.py
Library Collections
#Library RequestsLibrary
Library Process
#Library SSHLibrary
Library Resources/keywords/mythread.py
Library Resources/keywords/fault_inject.py
Library Resources/keywords/deploy.py
Library Resources/keywords/test_curve_stability_nbd.py
Suite Setup init failover cluster
Suite Teardown clean failover env
*** Variables ***
${fio_vdsize} 10
${vdbench_vdsize} 10
${vm_iops_limit} 8000
${chunk_num} 0
*** Test Cases ***
#test up all cs
# [Tags] P8 base first release
# up all cs
# [Teardown] file clean none
inject one chunkserver down/up
[Tags] P1 base first release failover
${num} evaluate int(1)
${host} test kill chunkserver num ${num}
sleep 5
check nbd iops
check data consistency
# check copies consistency
sleep 5
test start chunkserver num ${num} ${host}
sleep 5
check nbd iops
check data consistency
# check copies consistency
[Teardown] start host cs process ${host}
inject two chunkserver down/up
[Tags] P1 base first release failover
${num} evaluate int(2)
${host} test kill chunkserver num ${num}
sleep 5
check nbd iops
check data consistency
# check copies consistency
sleep 5
test start chunkserver num ${num} ${host}
sleep 5
check nbd iops
check data consistency
# check copies consistency
[Teardown] start host cs process ${host}
inject host all chunkserver down/up
[Tags] P1 base first release failover
${host} test stop chunkserver host
sleep 10
check nbd iops
check data consistency
# check copies consistency
sleep 5
test start chunkserver host ${host}
sleep 5
check nbd iops
check data consistency
# check copies consistency
[Teardown] start host cs process ${host}
inject restart one chunkserver
[Tags] P1 base first release failover
${num} evaluate int(1)
test restart chunkserver num ${num}
sleep 5
check nbd iops
check data consistency
# check copies consistency
[Teardown] wait cluster healthy ${vm_iops_limit}
inject restart two chunkserver
[Tags] P1 base first release failover
${num} evaluate int(2)
test restart chunkserver num ${num}
sleep 5
check nbd iops
check data consistency
# check copies consistency
[Teardown] wait cluster healthy ${vm_iops_limit}
inject reboot nebd
[Tags] P1 base first release failover
test reboot nebd
sleep 5
check nbd iops
check data consistency
[Teardown] wait cluster healthy ${vm_iops_limit}
inject kill one mds
[Tags] P1 base first release failover
${num} evaluate int(1)
test kill mds ${num}
check nbd iops
sleep 3
test start mds
check nbd iops
check data consistency
[Teardown] test start mds
inject kill two mds
[Tags] P1 base first release failover
${num} evaluate int(2)
test kill mds ${num}
check nbd iops
sleep 3
test start mds
sleep 3
check nbd iops
check data consistency
[Teardown] test start mds
inject round restart mds
[Tags] P1 base first release failover
test round restart mds
sleep 3
check nbd iops
check data consistency
[Teardown] test start mds
inject loop restart one mds
[Tags] P1 base first release failover
${mds_ip} evaluate str("10.182.26.25")
:FOR ${i} IN RANGE 10
kill mds process ${mds_ip}
start mds process ${mds_ip}
sleep 3
check nbd iops
END
check data consistency
[Teardown] test start mds
inject kill one etcd
[Tags] P1 base first release failover
${host} test kill etcd
sleep 5
check nbd iops
sleep 3
test start etcd
test start mds
test start snap
# sleep 3
check nbd iops
check data consistency
# check copies consistency
[Teardown] start etcd process ${host}
test round restart etcd
[Tags] P1 base first release failover
test round restart etcd
sleep 3
check nbd iops
check data consistency
test start mds
test start snap
[Teardown] test start etcd
inject loop restart one etcd
[Tags] P1 base first release failover
${etcd_ip} evaluate str("10.182.26.16")
:FOR ${i} IN RANGE 10
kill etcd process ${etcd_ip}
start etcd process ${etcd_ip}
sleep 2
check nbd iops
END
check data consistency
test start mds
test start snap
[Teardown] test start etcd
inject chunkserver cpu stress 95%
[Tags] P1 base first release failover
${cpu_stress} evaluate int(95)
${ssh} test chunkserver cpu stress ${cpu_stress}
sleep 5
${limit_iops} evaluate int(2000)
check nbd iops ${limit_iops}
del cpu stress ${ssh}
check nbd iops ${vm_iops_limit}
check data consistency
# check copies consistency
[Teardown] del cpu stress ${ssh}
inject mds cpu stress 95%
[Tags] P1 base first release failover
${cpu_stress} evaluate int(95)
${ssh} test mds cpu stress ${cpu_stress}
sleep 5
${limit_iops} evaluate int(2000)
check nbd iops ${limit_iops}
del cpu stress ${ssh}
check nbd iops ${vm_iops_limit}
check data consistency
# check copies consistency
[Teardown] del cpu stress ${ssh}
inject client cpu stress 95%
[Tags] P1 base first release failover
${cpu_stress} evaluate int(95)
${ssh} test client cpu stress ${cpu_stress}
sleep 5
${limit_iops} evaluate int(2000)
check nbd iops ${limit_iops}
del cpu stress ${ssh}
check nbd iops ${vm_iops_limit}
check data consistency
# check copies consistency
[Teardown] del cpu stress ${ssh}
inject chunkserver mem stress 95%
[Tags] P1 base first release failover
${cpu_stress} evaluate int(95)
${ssh} test chunkserver mem stress ${cpu_stress}
sleep 10
check nbd iops ${vm_iops_limit}
del mem stress ${ssh}
check data consistency
# check copies consistency
[Teardown] del mem stress ${ssh}
inject mds mem stress 95%
[Tags] P1 base first release failover
${cpu_stress} evaluate int(95)
${ssh} test mds mem stress ${cpu_stress}
sleep 10
check nbd iops ${vm_iops_limit}
del mem stress ${ssh}
check data consistency
# check copies consistency
[Teardown] del mem stress ${ssh}
inject client mem stress 95%
[Tags] P1 base first release failover
${cpu_stress} evaluate int(95)
${ssh} test client mem stress ${cpu_stress}
sleep 10
check nbd iops ${vm_iops_limit}
del mem stress ${ssh}
check data consistency
# check copies consistency
[Teardown] del mem stress ${ssh}
test chunkserver network stress
[Tags] P1 base first release failover
${ip} test chunkserver network stress
sleep 10
check nbd iops ${vm_iops_limit}
check data consistency
# stop network stress ${ip}
[Teardown] stop network stress ${ip}
test mds network stress
[Tags] P1 base first release failover
${ip} test mds network stress
sleep 10
check nbd iops ${vm_iops_limit}
check data consistency
# stop network stress ${ip}
[Teardown] stop network stress ${ip}
test client network stress
[Tags] P1 base first release failover
${ip} test client network stress
sleep 10
check nbd iops ${vm_iops_limit}
check data consistency
# stop network stress ${ip}
[Teardown] stop network stress ${ip}
test chunkserver clock offset 2min
[Tags] P1 base first release failover no-need
${offset} evaluate int(2)
${ssh} test chunkserver clock offset ${offset}
check nbd iops ${vm_iops_limit}
check data consistency
[Teardown] del clock offset ${ssh} ${offset}
test mds clock offset 2min
[Tags] P1 base first release failover no-need
${offset} evaluate int(2)
${ssh} test mds clock offset ${offset}
check nbd iops ${vm_iops_limit}
check data consistency
# check copies consistency
[Teardown] del clock offset ${ssh} ${offset}
test chunkserver loss package 5%
[Tags] P1 base first release failover
${percent} evaluate int(5)
test cs loss package ${percent}
check nbd iops
test start mds
test start snap
check data consistency
# check copies consistency
# [Teardown] wait cluster healthy ${vm_iops_limit}
test chunkserver delay package 50ms
[Tags] P1 base first release failover
${ms} evaluate int(50)
test cs delay package ${ms}
sleep 5
check nbd iops
check data consistency
# check copies consistency
test start mds
test start snap
sleep 5
[Teardown] wait cluster healthy ${vm_iops_limit}
test out/in chunkserver recover
[Tags] P1 base first release failover longtime
${host} ${cs_copyset_num} test outcs recover copyset
check nbd iops
check data consistency
# check copies consistency
${copyset_num} Convert To Integer ${cs_copyset_num}
test upcs recover copyset ${host} ${copyset_num}
sleep 5
check nbd iops
check data consistency
# check copies consistency
[Teardown] wait cluster healthy ${vm_iops_limit}
test suspend delete and up recover chunkserver
[Tags] P1 base first release failover longtime no-need
test suspend delete recover copyset
# check nbd iops
check data consistency
# check copies consistency
[Teardown] wait cluster healthy ${vm_iops_limit}
test stop all cs not recover
[Tags] P1 base first release failover
stop all cs not recover
sleep 5
check nbd iops
check data consistency
# check copies consistency
[Teardown] wait cluster healthy ${vm_iops_limit}
test pendding host all cs
[Tags] P1 base first release failover longtime no-need
pendding all cs recover
sleep 5
check nbd iops
check data consistency
# check copies consistency
[Teardown] check chunkserver online
test pendding host all cs online
[Tags] P1 base first release failover longtime
pendding all cs recover online
sleep 5
check nbd iops
check data consistency
# check copies consistency
[Teardown] check chunkserver online
test mds loss package 5%
[Tags] P1 base first release failover
${percent} evaluate int(5)
test mds loss package ${percent}
sleep 60
check nbd iops
check data consistency
# check copies consistency
test start mds
test start snap
[Teardown] wait cluster healthy ${vm_iops_limit}
test ipmitool restart mds node
[Tags] P1 base first release failover ipmitool
test ipmitool restart mds
sleep 60
check nbd iops
check data consistency
test start mds
test start snap
[Teardown] wait cluster healthy ${vm_iops_limit}
test ipmitool restart chunkserver node
[Tags] P1 base first release failover ipmitool
test ipmitool restart chunkserver
sleep 60
check nbd iops
check data consistency
[Teardown] check chunkserver online
stop map unmap thread
[Tags] P1 base first release failover
stop map unmap
# [Teardown] wait cluster healthy ${vm_iops_limit}
stop snapshot test
[Tags] P1 base first release failover
stop snapshot test
test lazy clone fail flatten and snapshot
[Tags] P1 base first release failover
test lazy clone flatten snapshot fail
test mds delay package 50ms
[Tags] P1 base first release failover
${ms} evaluate int(50)
test mds delay package ${ms}
test start mds
test start etcd
test start snap
sleep 120
check nbd iops
check data consistency
# check copies consistency
[Teardown] wait cluster healthy ${vm_iops_limit}
inject kill diff host chunkserver
[Tags] P1 base first release failover
test kill diff host chunkserver
wait health ok
check nbd iops
check data consistency
# check copies consistency
[Teardown] wait cluster healthy ${vm_iops_limit}
test ipmitool restart client node
[Tags] P1 base first release failover ipmitool
test ipmitool restart client
sleep 60
run rwio
sleep 5
check nbd iops
check data consistency
test start mds
test start snap
test start nginx
[Teardown] wait cluster healthy ${vm_iops_limit}
inject kill all mds
[Tags] P1 base first release failover
${num} evaluate int(3)
test kill mds ${num}
test start mds
sleep 3
check nbd iops
check data consistency
[Teardown] test start mds
inject kill two etcd
[Tags] P1 base first release failover
${num} evaluate int(2)
test kill etcd ${num}
sleep 5
# check nbd iops
sleep 3
test start etcd
test start mds
test start snap
sleep 3
check nbd iops
check data consistency
# check copies consistency
[Teardown] test start etcd
inject all chunkserver down
[Tags] P1 base first release failover
test stop all chunkserver
test start all chunkserver
wait health ok
sleep 10
check nbd iops
check data consistency
# check copies consistency
[Teardown] wait cluster healthy ${vm_iops_limit}
inject all chunkserver down 10min
[Tags] P1 base first release failover
test stop all chunkserver
sleep 600
test start all chunkserver
wait health ok
sleep 10
check nbd iops
check data consistency
# check copies consistency
[Teardown] wait cluster healthy ${vm_iops_limit}
check all data consistency
[Tags] P1 base first release failover
recover disk
stop rwio
check io error
stop scheduler
check copies consistency
test clone vol
[Tags] P1 base first release failover snapshot no-need
test clone iovol consistency
test cancel vol snapshot
[Tags] P1 base first release failover snapshot no-need
test cancel snapshot
test one volume perf
[Tags] P1 base first release longtime perf no-need
remove vm key
attach new vol 200 200
stop rwio
perf test
inject cluster stress test
[Tags] P1 base first release longtime stress perf no-need
init vm
remove vm key
attach new vol 20 20
stop rwio
stress test
*** Keywords ***
init failover cluster
clean nbd
destroy test env
${begin_num} get all chunk num
${begin_num} Convert To Integer ${begin_num}
Set Global Variable ${chunk_num} ${begin_num}
init abnormal test env
check chunkserver online
init rw cloud disk
begin snapshot test
begin kill snapshotserver
loop map unmap file
init abnormal test env
clean env
# destroy etcd
# destroy mds
# destroy snapshotclone server
# stop nebd
# drop all chunkserver dat
use ansible deploy
# install deb
# add config
# start abnormal test services
# create pool
# start nebd
init rw cloud disk
map nbd
stop rwio
init recover disk ${fio_vdsize}
run rwio
clean kernel log
clean curve
Run Keyword If All Tests Passed clean nbd
Run Keyword If All Tests Passed delete nbd
sleep 10
Run Keyword If All Tests Passed clear RecycleBin
Run Keyword If All Tests Passed recycle chunk
clean failover env
clean curve
sleep 60
${final_num} get all chunk num
${final_num} Convert To Integer ${final_num}
should be equal ${final_num} ${chunk_num}