HIP-704 MultipathDevicesAreReady

================================================================================

Host Power Tools / HIP-704
volume provisioning fails when RescanIsNeeded

Type:              Bug                               Status:        Open                       Assignee: Arnon Yaari
Priority:          Minor                             Resolution:    Unresolved                 Reporter: Arnon Yaari
Affects Version/s:                                   Fix Version/s: 1.1
Components: volume provisioning                                                                Created: 2013-08-20 15:15
Labels:                                                                                        Updated: 2013-08-20 15:15

Issue Links:

Sub-Tasks:

Description:
This following trace happens when RescanIsNeeded is raised during provisioning, causing {{run_volume_provision}} to be run twice.

{noformat}
======================================================================
ERROR: TestCase_8perf.test_8perf
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\jenkins\workspace\powertools\tests\integration\test_performance.py", line 45, in setUp
    self._execute_8prov('1GB')
  Local variables:
    'self': <test_performance.TestCase_8perf.test_8perf>
  File "C:\jenkins\workspace\powertools\tests\integration\test_performance.py", line 57, in _execute_8prov
    run_volume_provision(args)
  Local variables:
    'self': <test_performance.TestCase_8perf.test_8perf>
    'args': {'--mount': u'E:\\', '<size>': 1*GB, '--yes': True, '--name': 'host-ci27.infinidat.com-vol-20130820-1327', '--pool': 'default', '--type': 'thick', '--system': '20011', '--filesystem': 'NTFS'}
    'run_volume_provision': <function run_volume_provision at 0x03282EF0>
    'size': '1GB'
  File "C:\jenkins\workspace\powertools\src\infi\vendata\powertools\cli\engine.py", line 20, in decorator
    return func(*args, **kwargs)
  Local variables:
    'args': ({'--mount': u'E:\\', '<size>': 1*GB, '--yes': True, '--name': 'host-ci27.infinidat.com-vol-20130820-1327', '--pool': 'default', '--type': 'thick', '--system': '20011', '--filesystem': 'NTFS'},)
    'RescanIsNeeded': <class 'infi.storagemodel.errors.RescanIsNeeded'>
    'func': <function run_volume_provision at 0x0327A430>
    'kwargs': {}
  File "C:\jenkins\workspace\powertools\src\infi\vendata\powertools\cli\engine.py", line 77, in run_volume_provision
    prepare_provision_arguments(arguments)
  Local variables:
    'get_workout': <function get_workout at 0x03377C70>
    'in_provisioning': <function in_provisioning at 0x03377D70>
    'arguments': {'--mount': u'E:\\', '<size>': 1*GB, '--yes': True, '--name': 'host-ci27.infinidat.com-vol-20130820-1327', '--pool': 'default', '--type': 'thick', '--system': '20011', '--filesystem': 'NTFS'}
  File "C:\jenkins\workspace\powertools\src\infi\vendata\powertools\cli\engine.py", line 71, in prepare_provision_arguments
    arguments["<size>"] = convert_size(arguments["<size>"])
  Local variables:
    '_autodetect_system': <function _autodetect_system at 0x0327AC70>
    'arguments': {'--mount': u'E:\\', '<size>': 1*GB, '--yes': True, '--name': 'host-ci27.infinidat.com-vol-20130820-1327', '--pool': 'default', '--type': 'thick', '--system': '20011', '--filesystem': 'NTFS'}
    '_validate_system': <function _validate_system at 0x032E21B0>
  File "C:\jenkins\workspace\powertools\src\infi\vendata\powertools\cli\validate.py", line 37, in convert_size
    return from_string(string.upper())
  Local variables:
    'msg': TypeError('expected string or buffer',)
    'from_string': <function from_string at 0x023C1B70>
    'string': 1*GB
AttributeError: 'Capacity' object has no attribute 'upper'
{noformat}

The size is being converted twice, but {{convert_size}} doesn't support this

Comments: