def run_ft_libvirt_crash(parser):
    """
	test ft libivrt crash
	"""
    preprocess.preprocess(parser)
    process.kill_libvirt_process(parser)
    Assert.libvirt_running_in_hostOS(parser)
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
Beispiel #3
0
def run_master_monitor_crash(parser):
    """
	test master monitor crash
	"""
    preprocess.preprocess(parser)
    process.kill_master_monitor_process(parser)
    Assert.master_monitor_running(parser)
Beispiel #4
0
def run_L1_guestOS_crash(parser):
    """
	test level 1 fault tolerant VM crash
	"""
    preprocess.preprocess(parser)
    process.exec_L1_vm_crasher(parser)
    Assert.vm_running_in_hostOS(parser)
    Assert.detect_fail_vm_crash(parser)
    Assert.recovery_vm_reboot(parser)
Beispiel #5
0
def run_L1_hostOS_crash(parser):
	#preprocess
	preprocess.preprocess(parser)
	#process
	process.exec_crasher(parser)
	#assert
	Assert.detect_hostOS_crash(parser)
	Assert.do_recovery(parser)
	Assert.is_running_on_backup(parser)
Beispiel #6
0
def run_L1_ft_vm_crash(parser):
	"""
	test level 1 fault tolerant VM crash
	"""
	preprocess.preprocess(parser)
	process.kill_vm_process(parser)
	Assert.vm_running_in_hostOS(parser)
	Assert.detect_fail_vm_crash(parser)
	Assert.recovery_vm_p_restart(parser)
Beispiel #7
0
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)
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)
Beispiel #9
0
def run_L1_slaveOS_crash(parser):
    """
	general architecture hostOS crash
	"""
    #preprocess
    preprocess.preprocess(parser)
    #process
    process.exec_L1_slaveOS_shutdown(parser)
    #assert
    Assert.vm_running_in_backupOS(parser)
    Assert.vm_is_login_in_backupOS(parser)
    Assert.detect_BackupOS_crash(parser)
    Assert.hostOS_role_is_Master(parser)
    Assert.backupOS_role_is_Slave(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)
Beispiel #11
0
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
Beispiel #13
0
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
Beispiel #14
0
def run_L1_hostOS_network_isolation(parser):
    """
	general architecture hostOS crash
	"""
    #preprocess
    preprocess.preprocess(parser)
    print 401
    #process
    process.exec_L1_hostOS_network_isolation(parser)
    print 402
    #assert
    Assert.vm_running_in_backupOS(parser)
    print 403
    Assert.detect_hostOS_crash(parser)
    print 404
    Assert.hostOS_role_is_Slave_on_BackupOS(parser)
    print 405
    Assert.backupOS_role_is_Master_on_BackupOS(parser)
    print 406
Beispiel #15
0
def run_L1_primary_hardware_crash_singleVM_restart(parser):
    """
		test after node OS crash, vm will restart on another node or not and node's role will change or not
	"""
    #preprocess
    preprocess.preprocess(parser)
    print 401
    #process
    process.exec_L1_hostOS_shutdown(parser)
    print 402
    #assert
    Assert.detect_hostOS_crash(parser)
    print 403
    Assert.vm_running_in_backupOS(parser)
    print 404
    Assert.hostOS_role_is_Slave_on_BackupOS(parser)
    print 405
    Assert.backupOS_role_is_Master_on_BackupOS(parser)
    print 406
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
Beispiel #17
0
def run_L1_hostOS_crash(parser):
    """
	general architecture hostOS crash
	"""
    #preprocess
    preprocess.preprocess(parser)
    print 116
    #process
    process.exec_L1_hostOS_shutdown(parser)
    print 117
    #assert
    Assert.vm_running_in_backupOS(parser)
    print 118
    Assert.vm_is_login_in_backupOS(parser)
    print 119
    Assert.detect_hostOS_crash(parser)
    print 110
    Assert.hostOS_role_is_Slave_on_BackupOS(parser)
    print 111
    Assert.backupOS_role_is_Master_on_BackupOS(parser)
    print 112
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
Beispiel #19
0
def run_L1_a_hostOS_crash(parser):
    """
	test atca architecture hostOS crash
	"""

    #preprocess
    preprocess.preprocess(parser)
    print 206
    #process
    process.exec_L1_hostOS_crasher(parser)
    print 207
    #assert
    Assert.vm_running_in_backupOS(parser)
    print 208
    Assert.vm_is_login_in_backupOS(parser)
    print 209
    Assert.detect_fail_os_crash(parser)
    print 210
    Assert.recovery_vm_reboot(parser)
    print 211
    Assert.hostOS_status_is_running(parser)
    print 212
Beispiel #20
0
def run_test_log(parser):
    """
	test FTVMTA log feature
	"""
    preprocess.preprocess(parser)
    Assert.test(parser)
Beispiel #21
0
def run_L1_preprocess_test(parser):
	#print parser
	preprocess.preprocess(parser)
	#print "after preprocess"
Beispiel #22
0
def run_L1_preprocess_test(parser):
    #print parser
    preprocess.preprocess(parser)
    #print "after preprocess"