Example #1
0
def execute():
    clear_result()
    MOUNT_ARRAY_BASIC_1.execute()
    ibofos_util.pci_detach(MOUNT_ARRAY_BASIC_1.ANY_DATA)
    time.sleep(0.5)
    print(cli.list_device())
    ibofos_util.pci_detach(MOUNT_ARRAY_BASIC_1.ANY_OTHER_DATA)

    out = cli.unmount_ibofos()
    print(out)

    cur_info = json.loads(cli.array_info(""))
    cur_state = cur_info['Response']['info']['situation']
    print(cur_state)
    if cur_state != 'FAULT':
        print("STOP State is not triggered, try again")
        return cur_info
    wait_time = 20
    for i in reversed(range(wait_time)):
        print("Wait to cancel rebuild " + str(i) + " seconds left")
        time.sleep(1)

    out = cli.unmount_ibofos()
    print(out)
    return out
def execute():
    clear_result()
    CREATE_ARRAY_BASIC_1.execute()
    ibofos_util.pci_detach(CREATE_ARRAY_BASIC_1.ANY_DATA)
    time.sleep(0.1)
    out = cli.mount_ibofos()
    return out
Example #3
0
def stop_during_io(read_or_write):
    global bringup_argument
    for sleep_time in range(5, 10):
        test_name = "STOP During IO" + str(sleep_time)
        common_test_lib.print_start(test_name)
        common_test_lib.bringup_multiple_volume(**bringup_argument)

        process = execute_fio_pipe(readwrite=read_or_write,
                                   offset=0,
                                   verify="0")
        time.sleep(sleep_time)

        ibofos_util.pci_detach(nvme_device_0)
        print("Device Detached!!!!!")
        time.sleep(sleep_time * 0.1)

        ibofos_util.pci_detach(nvme_device_1)
        print("Other Device Detached!!!!!")

        ret = process.wait()

        clear_env()

        #fio can failed by floating point 0 issue. it is natural.
        #if there is no hang issue, just pass.
        common_test_lib.print_result(test_name, True)
Example #4
0
def execute():
    clear_result()
    MOUNT_VOL_BASIC_1.execute()
    fio_proc = fio.start_fio(0, 20)
    fio.wait_fio(fio_proc)
    ibofos_util.pci_detach(DETACH_TARGET_DEV)
    time.sleep(0.1)

    fio_proc = fio.start_fio(0, 20)
    fio.wait_fio(fio_proc)

    rebuild_started = False
    wait_threshold = 60
    for i in range(0, wait_threshold):
        out = cli.get_ibofos_info()
        if out.find("REBUILDING") >= 0:
            print("rebuilding started")
            rebuild_started = True
            break
        time.sleep(1)

    if rebuild_started == True:
        fio_proc2 = fio.start_fio(0, 120)
        while True:
            out = cli.get_ibofos_info()
            if out.find("REBUILDING") == -1:
                print("rebuilding done")
                fio.wait_fio(fio_proc2)
                break
Example #5
0
def execute():
    clear_result()
    ibofos_util.pci_rescan()
    MOUNT_VOL_BASIC_1.execute()
    ibofos_util.pci_detach(DETACH_TARGET_DATA)
    ibofos_util.pci_detach(DETACH_TARGET_SPARE)
    time.sleep(0.1)
Example #6
0
def execute():
    clear_result()
    MOUNT_ARRAY_BASIC_1.execute()
    cli.create_volume("vol1", str(SIZE_20GB), "", "", "")
    cli.create_volume("vol2", str(SIZE_20GB), "", "", "")
    cli.create_volume("vol3", str(SIZE_20GB), "", "", "")
    cli.create_volume("vol4", str(SIZE_20GB), "", "", "")
    cli.create_volume("vol5", str(SIZE_20GB), "", "", "")
    cli.mount_volume("vol1", "", "")
    cli.mount_volume("vol2", "", "")
    cli.mount_volume("vol3", "", "")
    cli.mount_volume("vol4", "", "")
    cli.mount_volume("vol5", "", "")
    print ("five volumes are mounted")
    
    time.sleep(1)
    fio_proc = fio.start_fio(0, 20)
    time.sleep(5)

    ibofos_util.pci_detach(DETACH_TARGET_DEV_1)
    print ("first device has been detached")
    time.sleep(1)

    ibofos_util.pci_detach(DETACH_TARGET_DEV_2)
    print ("second device has been detached")
    time.sleep(1)

    out = cli.get_ibofos_info()
    print ("info : " + out)
    fio.stop_fio(fio_proc)
    return out
Example #7
0
def execute():
    clear_result()
    MOUNT_ARRAY_BASIC_1.execute()
    ibofos_util.pci_detach(MOUNT_ARRAY_BASIC_1.ANY_DATA)
    time.sleep(0.1)
    out = cli.unmount_ibofos()
    print(out)
    return out
Example #8
0
def execute():
    clear_result()
    CREATE_ARRAY_NO_SPARE.execute()
    ibofos_util.pci_detach(CREATE_ARRAY_NO_SPARE.DATA_DEV_1)
    time.sleep(0.1)
    out = cli.mount_ibofos()
    print (out)
    return out
def execute():
    clear_result()
    MOUNT_VOL_NO_SPARE.execute()
    fio_proc = fio.start_fio(0, 30)
    time.sleep(1)
    ibofos_util.pci_detach(DETACH_TARGET_DEV)
    time.sleep(1)
    out = cli.get_ibofos_info()
    fio.wait_fio(fio_proc)
    return out
Example #10
0
def execute():
    clear_result()
    DETACH_DEV_DATA_DURING_IO.execute()
    fio_proc = fio.start_fio(0, 60)
    time.sleep(1)
    ibofos_util.pci_detach(DETACH_ANOTHER_TARGET_DEV)
    time.sleep(1)
    out = cli.get_ibofos_info()
    fio.wait_fio(fio_proc)
    return out
Example #11
0
def execute():
    clear_result()
    CREATE_ARRAY_NO_SPARE.execute()
    ibofos.exit_ibofos()
    ibofos.start_ibofos()
    cli.scan_device()
    cli.load_array("")
    ibofos_util.pci_detach(CREATE_ARRAY_NO_SPARE.DATA_DEV_1)
    time.sleep(0.1)
    out = cli.mount_ibofos()
    return out
def execute():
    clear_result()
    MOUNT_ARRAY_BASIC_1.execute()
    spare = MOUNT_ARRAY_BASIC_1.SPARE
    ibofos_util.pci_detach(spare)
    time.sleep(0.1)
    cli.unmount_ibofos()
    ibofos.exit_ibofos()
    ibofos.start_ibofos()
    cli.scan_device()
    cli.load_array("")
    out = cli.mount_ibofos()
    return out
Example #13
0
def execute():
    clear_result()
    ibofos_util.pci_rescan()
    MOUNT_VOL_NO_SPARE.execute()
    ibofos_util.pci_detach("unvme-ns-0")
    print ("unvme-ns-0 has been detached")
    time.sleep(3)
    ibofos_util.pci_detach("unvme-ns-1")
    print ("unvme-ns-1 has been detached")
    time.sleep(3)
    cli.unmount_ibofos()
    out = ibofos.exit_ibofos()
    return out
Example #14
0
def execute():
    clear_result()
    MOUNT_VOL_BASIC_1.execute()
    fio_proc = fio.start_fio(0, 60)
    fio.wait_fio(fio_proc)
    ibofos_util.pci_detach(DETACH_TARGET_DEV)
    time.sleep(0.1)

    rebuild_started = False
    while True:
        out = cli.get_ibofos_info()
        if out.find("REBUILDING") == -1 and rebuild_started == True:
            print("rebuilding done")
            break
        elif rebuild_started == False and out.find("REBUILDING") >= 0:
            print("rebuilding started")
            rebuild_started = True
        time.sleep(1)
Example #15
0
def detaching_during_io(read_or_write):

    for sleep_time in range(5, 10):
        test_name = "Detaching During IO" + str(sleep_time)
        common_test_lib.print_start(test_name)
        common_test_lib.bringup_multiple_volume(**bringup_argument)
        verify_flag = "1"
        if ("read" in read_or_write):
            verify_flag = "0"
        process = execute_fio_pipe(readwrite=read_or_write,
                                   offset=0,
                                   verify=verify_flag)

        time.sleep(7 + sleep_time)

        ibofos_util.pci_detach(nvme_device_0)

        print("Device Detached!!!!!")

        ret = process.wait()

        clear_env()
        common_test_lib.print_result(test_name, ret == 0)
Example #16
0
def execute():
    clear_result()
    MOUNT_ARRAY_NO_SPARE_3.execute()
    ibofos_util.pci_detach(MOUNT_ARRAY_NO_SPARE_3.DATA_DEV_1)
    time.sleep(2)
    ibofos_util.pci_detach(MOUNT_ARRAY_NO_SPARE_3.DATA_DEV_2)
    time.sleep(2)
    ibofos_util.pci_detach(MOUNT_ARRAY_NO_SPARE_3.DATA_DEV_3)
    time.sleep(2)
    cli.array_info(MOUNT_ARRAY_NO_SPARE_3.ARRAYNAME)
    out = cli.add_device(SPARE_DEV, MOUNT_ARRAY_NO_SPARE_3.ARRAYNAME)
    return out
Example #17
0
def execute():
    clear_result()
    MOUNT_ARRAY_BASIC_1.execute()
    ibofos_util.pci_detach(MOUNT_ARRAY_BASIC_1.ANY_DATA)
    out = cli.unmount_ibofos()
    return out
def execute():
    clear_result()
    out = DETACH_DEV_DATA.execute()
    time.sleep(1)
    ibofos_util.pci_detach(DETACH_DEV_DATA.DETACH_ANOTHER_TARGET_DEV)
    time.sleep(0.1)
def execute():
    clear_result()
    MOUNT_VOL_NO_SPARE.execute()
    ibofos_util.pci_detach(DETACH_TARGET_DEV)
    time.sleep(0.1)