Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Curve
Commits
be905bf9
Commit
be905bf9
authored
4 years ago
by
chenyunhui-1
Committed by
YunhuiChen
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
add failover test case
parent
531befc2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
robot/Resources/keywords/fault_inject.py
+2
-2
robot/Resources/keywords/fault_inject.py
robot/Resources/keywords/test_curve_stability_nbd.py
+7
-6
robot/Resources/keywords/test_curve_stability_nbd.py
robot/curve_failover_robot.txt
+11
-1
robot/curve_failover_robot.txt
with
20 additions
and
9 deletions
+20
-9
robot/Resources/keywords/fault_inject.py
+
2
-
2
View file @
be905bf9
...
...
@@ -772,7 +772,7 @@ def get_all_chunk_num():
def
check_nbd_iops
(
limit_iops
=
3000
):
ssh
=
shell_operator
.
create_ssh_connect
(
config
.
client_list
[
0
],
1046
,
config
.
abnormal_user
)
ori_cmd
=
"iostat -d nb0
1
2 |grep nb0 | awk 'END {print $6}'"
ori_cmd
=
"iostat -d nb0
3
2 |grep nb0 | awk 'END {print $6}'"
rs
=
shell_operator
.
ssh_exec
(
ssh
,
ori_cmd
)
kb_wrtn
=
""
.
join
(
rs
[
1
]).
strip
()
iops
=
int
(
kb_wrtn
)
/
int
(
config
.
fio_iosize
)
...
...
@@ -1698,7 +1698,7 @@ def test_ipmitool_restart_chunkserver():
start_host_cs_process
(
chunkserver_host
)
def
test_ipmitool_restart_client
():
client_host
=
config
.
client_list
[
1
]
client_host
=
config
.
client_list
[
0
]
logger
.
info
(
"|------begin test client ipmitool cycle,host %s------|"
%
(
client_host
))
ssh
=
shell_operator
.
create_ssh_connect
(
client_host
,
1046
,
config
.
abnormal_user
)
ipmitool_cycle_restart_host
(
ssh
)
...
...
This diff is collapsed.
Click to expand it.
robot/Resources/keywords/test_curve_stability_nbd.py
+
7
-
6
View file @
be905bf9
...
...
@@ -396,12 +396,13 @@ def check_clone_vol_exist(clonevol_uuid):
return
False
def
diff_vol_consistency
(
vol_uuid
,
clone_uuid
):
if
config
.
snapshot_thrash
.
check_md5
==
True
:
context1
=
get_vol_md5
(
vol_uuid
)
context2
=
get_vol_md5
(
clone_uuid
)
if
context1
!=
context2
:
logger2
.
error
(
"check md5 consistency fail ,vol is %s,clone vol is %s"
%
(
vol_uuid
,
clone_uuid
))
assert
context1
==
context2
,
"vol and clone vol not same"
context1
=
get_vol_md5
(
vol_uuid
)
context2
=
get_vol_md5
(
clone_uuid
)
if
context1
!=
context2
:
logger2
.
error
(
"check md5 consistency fail ,vol is %s,clone vol is %s"
%
(
vol_uuid
,
clone_uuid
))
# if config.snapshot_thrash.check_md5 == True:
# have added clean chunk feature
assert
context1
==
context2
,
"vol and clone vol not same"
else
:
logger2
.
info
(
"do not get md5"
)
return
True
...
...
This diff is collapsed.
Click to expand it.
robot/curve_failover_robot.txt
+
11
-
1
View file @
be905bf9
...
...
@@ -430,6 +430,16 @@ inject kill diff host chunkserver
# 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
run rwio
sleep 60
check nbd iops
check data consistency
test start mds
[Teardown] wait cluster healthy ${vm_iops_limit}
inject kill all mds
[Tags] P1 base first release failover
${num} evaluate int(3)
...
...
@@ -534,7 +544,7 @@ init abnormal test env
init rw cloud disk
map nbd
stop rwio
write full disk ${fio_vdsize}
#
write full disk ${fio_vdsize}
run rwio
clean kernel log
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help