Commit be905bf9 authored by chenyunhui-1's avatar chenyunhui-1 Committed by YunhuiChen
Browse files

add failover test case

parent 531befc2
Showing with 20 additions and 9 deletions
+20 -9
......@@ -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)
......
......@@ -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
......
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment