Ejemplo n.º 1
0
        vol_id, account_id, mnt_point, vol_iqn)

add_auth_group = assign_iniator_gp_to_LUN(STDURL, vol_id, account_id, 'ALL')
verify_add_auth_gp(add_auth_group, 'ALL')

logging.debug('getting iqn for volume %s', volumeDict['name'])
iqn = discover_iscsi_lun(VSM_IP, vol_iqn)
iqn = verify_iqn(iqn)
logging.debug('iqn for discovered iSCSI LUN... %s', iqn)

login_result = iscsi_login_logout(iqn, VSM_IP, 'login')
verify_iscsi_operation(login_result, volumeDict['name'], 'login')
time.sleep(2)
result = getDiskAllocatedToISCSI(VSM_IP, mnt_point)
iscsi_device = verify_getDiskAllocatedToISCSI(result, mnt_point)
result = execute_mkfs(iscsi_device, 'ext3')
verify_execute_mkfs(result)
mount_result = mount_iscsi(iscsi_device, volumeDict['name'])
verify_mount(mount_result)
#mount_dir = 'mount/%s' %(volumeDict['name'])
mount_dir = {'name': volumeDict['name'], 'mountPoint': volumeDict['name']}
logging.info('...executing vdbench....')
executeVdbenchFile(mount_dir, 'filesystem_iscsi')
time.sleep(20)
logging.info('verifying the IOPS before Node goes to reset...')
iops_datapath = poolName + '/' + accName + tsm_name + '/' + volumeDict['name']
verify_IOPS(NODE1_IP, PASSWD, iops_datapath)
logging.debug('going to move node to reset...')
getControllerInfo(NODE1_IP, PASSWD, 'reboot', 'reboot.txt')

logging.debug('verifying pool import at peer Node: %s', NODE2_IP)
Ejemplo n.º 2
0
         iops_vol_iqn = vol.get('iqnname')
 logging.info('Got IopsVolume ID = "%s" and Group ID = "%s" of "%s"', \
         iops_volid, iopsgroup_id, iops_volname)
 result = assign_iniator_gp_to_LUN(stdurl, iops_volid, accId, 'ALL')
 verify_add_auth_gp(result)
 logging.debug('getting iqn for volume %s', iops_volname)
 iqn = discover_iscsi_lun(tsm_ip, iops_vol_iqn)
 iqn = verify_iqn(iqn)
 logging.debug('iqn for discovered iSCSI LUN... %s', iqn)
 login_result = iscsi_login_logout(iqn, tsm_ip, 'login')
 verify_iscsi_login(login_result, iops_volname)
 time.sleep(5)
 mountpoint = accName + iops_volname
 result = getDiskAllocatedToISCSI(tsm_ip, mountpoint)
 device = verify_getDiskAllocatedToISCSI(result, mountpoint)
 mkfs_result = execute_mkfs(device, 'ext3')
 verify_execute_mkfs(mkfs_result)
 mount_result = mount_iscsi(device, iops_volname)
 verify_mount(mount_result)
 ##executing vd bench
 mount_dir = {'name': iops_volname, 'mountPoint': iops_volname}
 logging.info('...executing vdbench....')
 executeVdbenchFile(mount_dir, 'filesystem_iscsi')
 time.sleep(14)
 logging.info('verifying the Iops in volume')
 iops_datapath = poolName + '/' + accName + tsm_name + '/' + iops_volname
 cmd = 'reng stats access dataset %s qos | head -n 4 ; sleep 10 ;\
         echo "-----------------"; reng stats access dataset %s qos |\
         head -n 4' % (iops_datapath, iops_datapath)
 logging.debug('executing the command %s in controller', str(cmd))
 iops_res = getControllerInfo(node_ip, passwd, cmd, 'iopsoutput.txt')
# ...logged-in iscsi LUJN
time.sleep(2)

# getting the device assigned to newly logged-in iSCSI LUN
device = getDiskAllocatedToISCSI(VSM_IP, volMntPoint)
if device[0] == 'PASSED' and volMntPoint in str(device[1]):
    logging.debug('iscsi logged device... %s', device[1][volMntPoint])
    device = device[1][volMntPoint]
else:
    print 'Not able to get iSCSI logged-in device'
    logging.debug('Testcase AMSx-WLAx-NSWx-ISCSI-IORx-TC_CONTINUOUS_ISTGTCONTROL_REFRESH is '\
            'blocked, not able to get assigned device for iSCSI LUN')
    is_blocked(startTime, FOOTER_MSG, BLOCKED_MSG)

# writing ext4 in iSCSI logged-in device
mkfsResult = execute_mkfs(device, 'ext3')
if mkfsResult[0] == 'FAILED':
    print 'Not able to write filesystem'
    logging.debug('Testcase AMSx-WLAx-NSWx-ISCSI-IORx-TC_CONTINUOUS_ISTGTCONTROL_REFRESH is '\
            'blocked, not able to write filesystem on device %s', device)
    is_blocked(startTime, FOOTER_MSG, BLOCKED_MSG)

# mounting iSCSI LUN
mountResult = mount_iscsi(device, VOL_NAME)
if mountResult[0] == 'PASSED':
    CLIENT_MOUNT_PNT = mountResult[1]
    print 'volume is mounted successfully at %s' % (CLIENT_MOUNT_PNT)
else:
    print "Volume is not mounted"
    logging.error('Testcase AMSx-WLAx-NSWx-ISCSI-IORx-TC_CONTINUOUS_ISTGTCONTROL_REFRESH is blocked due to' \
            ': %s', mountResult)
Ejemplo n.º 4
0
discover = discover_iscsi_lun(tsmIP, iqnName)
if discover[0] == 'FAILED':
    endTime = ctime()
    logAndresult(testcase, 'FAILED', discover[1], startTime, endTime)
else:
    print discover[1]
    logging.debug('lun discovered : %s', discover[1])

ilogin = iscsi_login_logout(iqnName, tsmIP, 'login')
verify_iscsi_operation(ilogin, volname, 'login')
time.sleep(2)
result = getDiskAllocatedToISCSI(tsmIP, volume['mountPoint'])
device = verify_getDiskAllocatedToISCSI(result, volume['mountPoint'])
print device
fs = execute_mkfs(device, 'ext3')
if fs[0] == 'FAILED':
    endTime = ctime()
    logAndresult(testcase, 'FAILED', fs[1], startTime, endTime)
else:
    print 'filesystem has been written successfully'
    #logging.debug('filesystem has been written successfully')

mountOutput = mount_iscsi(device, volume['name'])
if mountOutput[0] == 'FAILED':
    endTime = ctime()
    logAndresult(testcase, 'FAILED', mountOutput[1], startTime, endTime)
else:
    logging.info('Successfully mounted ISCSI volume "%s"', volume['name'])
    print 'Successfully mounted ISCSI volume "%s"' % volume['name']