def run_L1_k_libv_vm_7_crash(parser): """ test after ftlibvirt recover, ftlibvirt will detect vm crash or not """ preprocess.preprocess(parser) for i in range(3): process.kill_libvirt_process(parser) print 110 Assert.libvirt_running_in_hostOS(parser) print 111 print "Start killing process" start_time = time.time() last_end = start_time time.sleep(50) for i in range(1 + 3 * i): print 112 process.kill_vm_process(parser) print 113 Assert.vm_running_in_hostOS(parser) print 114 Assert.vm_is_login_in_hostOS(parser) print 115 Assert.detect_fail_vm_crash(parser) print 116 Assert.recovery_vm_p_restart(parser) print 117 end_time = time.time() print "[%f] %dth time kill VM process, ellapsed time %f" % ( end_time - start_time, i, end_time - last_end) last_end = end_time
def run_L1_vm_ftstart(parser): """ test vm start """ #preprocess preprocess.preprocess(parser) #process process.vm_ftstart(parser) #assert Assert.vm_running_in_hostOS(parser) Assert.vm_is_login_in_hostOS(parser)
def run_L1_k_libv_vm_crash(parser): """ test after ftlibvirt recover, ftlibvirt will detect vm crash or not """ preprocess.preprocess(parser) process.kill_libvirt_process(parser) Assert.libvirt_running_in_hostOS(parser) time.sleep(50) process.kill_vm_process(parser) Assert.vm_running_in_hostOS(parser) Assert.vm_is_login_in_hostOS(parser) Assert.detect_fail_vm_crash(parser) Assert.recovery_vm_p_restart(parser)
def run_HA3_primary_guestOS_crash(parser): preprocess.run_preprocess(parser) print 110 process.exec_primary_vm_guestOS_crasher(parser) print 111 Assert.vm_running_in_hostOS(parser) print 112 Assert.vm_is_login_in_hostOS(parser) print 113 #Assert.detect_fail_os_crash(parser) print 114 #Assert.recovery_vm_reboot(parser) print 115 Assert.detect_primary_vm_guestOS_hang_info(parser)
def run_vm_start(parser): """ test vm start """ #preprocess print 111 preprocess.preprocess(parser) #process print 112 process.vm_start(parser) #assert print 113 Assert.vm_running_in_hostOS(parser) print 114 Assert.vm_is_login_in_hostOS(parser) print 115
def run_L1_ft_vm_crash(parser): """ test level 1 fault tolerant VM crash """ print 110 preprocess.preprocess(parser) print 111 process.kill_vm_process(parser) print 112 Assert.vm_running_in_hostOS(parser) print 113 Assert.vm_is_login_in_hostOS(parser) print 114 #Assert.detect_fail_vm_crash(parser) print 115 #Assert.recovery_vm_p_restart(parser) print 116
def run_L1_guestOS_crash(parser): """ test level 1 fault tolerant guestOS crash """ preprocess.preprocess(parser) print 110 process.exec_L1_vm_crasher(parser) print 111 Assert.vm_running_in_hostOS(parser) print 112 Assert.vm_is_login_in_hostOS(parser) print 113 #Assert.detect_fail_os_crash(parser) print 114 #Assert.recovery_vm_reboot(parser) print 115
def run_L1_backupOS_crash(parser): """ general architecture hostOS crash """ #preprocess print 301 preprocess.preprocess(parser) #process print 302 process.exec_L1_backupOS_shutdown(parser) #assert print 303 Assert.vm_running_in_hostOS(parser) print 304 Assert.vm_is_login_in_hostOS(parser) print 305 Assert.detect_BackupOS_crash(parser) print 306 Assert.backupOS_role_is_Slave_on_MasterOS(parser) print 307
def run_L1_backupOS_network_isolation(parser): """ general architecture hostOS crash """ #preprocess preprocess.preprocess(parser) print 11 #process process.exec_L1_backupOS_network_isolation(parser) print 12 #assert Assert.vm_running_in_hostOS(parser) print 1 Assert.vm_is_login_in_hostOS(parser) print 2 Assert.detect_hostOS_crash(parser) print 3 Assert.backupOS_role_is_Slave_on_MasterOS(parser) print 4 Assert.hostOS_role_is_Master(parser) print 5
def run_test1(parser): preprocess.run_preprocess(parser) process.host_vm_ftstart(parser) Assert.vm_running_in_hostOS(parser) Assert.vm_is_login_in_hostOS(parser)