← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1317912] [NEW] VMware: get_info() fails if properties are missing

 

Public bug reported:

The properties that we retrieve from VirtualMachineConfigSummary are
optional and if they are missing get_info() throws an exception
(tracebacks below). We should use default values  when the properties
are not available.


stack/common/vmware/vim.py:126

2014-05-06 21:52:44.485 421 DEBUG nova.openstack.common.vmware.vim [-]
No faults found in RetrievePropertiesEx API response.
_retrieve_properties_ex_fault_checker /usr/lib/python2.7/dist-
packages/nova/ope

nstack/common/vmware/vim.py:153

2014-05-06 21:52:44.486 421 DEBUG nova.openstack.common.vmware.vim [-]
Invocation of RetrievePropertiesEx on (propertyCollector){

   value = "propertyCollector"

   _type = "PropertyCollector"

 } completed successfully. vim_request_handler /usr/lib/python2.7/dist-
packages/nova/openstack/common/vmware/vim.py:187

2014-05-06 21:52:44.487 421 DEBUG nova.openstack.common.vmware.api [-]
Function _invoke_api returned successfully after 0 retries. _func
/usr/lib/python2.7/dist-packages/nova/openstack/common/vmware/api.py:88

2014-05-06 21:52:44.491 421 ERROR nova.openstack.common.threadgroup [-]
int() argument must be a string or a number, not 'NoneType'

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
Traceback (most recent call last):

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
File "/usr/lib/python2.7/dist-
packages/nova/openstack/common/threadgroup.py", line 117, in wait

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
x.wait()

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
File "/usr/lib/python2.7/dist-
packages/nova/openstack/common/threadgroup.py", line 49, in wait

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
return self.thread.wait()

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line
168, in wait

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
return self._exit_event.wait()

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
File "/usr/lib/python2.7/dist-packages/eventlet/event.py", line 116, in
wait

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
return hubs.get_hub().switch()

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 187,
in switch

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
return self.greenlet.switch()

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line
194, in main

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
result = function(*args, **kwargs)

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
File "/usr/lib/python2.7/dist-
packages/nova/openstack/common/service.py", line 65, in run_service

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
service.start()

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
File "/usr/lib/python2.7/dist-packages/nova/service.py", line 154, in
start

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
self.manager.init_host()

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line
792, in init_host

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
self._init_instance(context, instance)

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line
700, in _init_instance

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
drv_state = self._get_power_state(context, instance)

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line
808, in _get_power_state

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
return self.driver.get_info(instance)["state"]

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
File "/usr/lib/python2.7/dist-packages/nova/virt/vmwareapi/driver.py",
line 737, in get_info

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
return _vmops.get_info(instance)

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
File "/usr/lib/python2.7/dist-packages/nova/virt/vmwareapi/vmops.py",
line 1493, in get_info

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
max_mem = int(query['summary.config.memorySizeMB']) * 1024

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
TypeError: int() argument must be a string or a number, not 'NoneType'

2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup

2014-05-06 21:52:44.496 421 DEBUG amqp [-] Closed channel #1 _do_close
/usr/lib/python2.7/dist-packages/amqp/channel.py:88

2014-05-06 21:52:44.902 421 INFO nova.openstack.common.vmware.api [-]
Logging out and terminating the current session with ID = 526ac461-2770
-40fa-a53e-7fe742d2499a.

2014-05-06 21:52:44.903 421 DEBUG nova.openstack.common.vmware.vim [-]
Invoking Logout on (sessionManager){

   value = "SessionManager"

** Affects: nova
     Importance: Low
     Assignee: Radoslav Gerganov (rgerganov)
         Status: New


** Tags: vmware

** Changed in: nova
   Importance: Undecided => Low

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1317912

Title:
  VMware: get_info() fails if properties are missing

Status in OpenStack Compute (Nova):
  New

Bug description:
  The properties that we retrieve from VirtualMachineConfigSummary are
  optional and if they are missing get_info() throws an exception
  (tracebacks below). We should use default values  when the properties
  are not available.

  
  stack/common/vmware/vim.py:126

  2014-05-06 21:52:44.485 421 DEBUG nova.openstack.common.vmware.vim [-]
  No faults found in RetrievePropertiesEx API response.
  _retrieve_properties_ex_fault_checker /usr/lib/python2.7/dist-
  packages/nova/ope

  nstack/common/vmware/vim.py:153

  2014-05-06 21:52:44.486 421 DEBUG nova.openstack.common.vmware.vim [-]
  Invocation of RetrievePropertiesEx on (propertyCollector){

     value = "propertyCollector"

     _type = "PropertyCollector"

   } completed successfully. vim_request_handler /usr/lib/python2.7
  /dist-packages/nova/openstack/common/vmware/vim.py:187

  2014-05-06 21:52:44.487 421 DEBUG nova.openstack.common.vmware.api [-]
  Function _invoke_api returned successfully after 0 retries. _func
  /usr/lib/python2.7/dist-
  packages/nova/openstack/common/vmware/api.py:88

  2014-05-06 21:52:44.491 421 ERROR nova.openstack.common.threadgroup
  [-] int() argument must be a string or a number, not 'NoneType'

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  Traceback (most recent call last):

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  File "/usr/lib/python2.7/dist-
  packages/nova/openstack/common/threadgroup.py", line 117, in wait

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  x.wait()

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  File "/usr/lib/python2.7/dist-
  packages/nova/openstack/common/threadgroup.py", line 49, in wait

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  return self.thread.wait()

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line
  168, in wait

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  return self._exit_event.wait()

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  File "/usr/lib/python2.7/dist-packages/eventlet/event.py", line 116,
  in wait

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  return hubs.get_hub().switch()

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line
  187, in switch

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  return self.greenlet.switch()

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line
  194, in main

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  result = function(*args, **kwargs)

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  File "/usr/lib/python2.7/dist-
  packages/nova/openstack/common/service.py", line 65, in run_service

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  service.start()

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  File "/usr/lib/python2.7/dist-packages/nova/service.py", line 154, in
  start

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  self.manager.init_host()

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line
  792, in init_host

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  self._init_instance(context, instance)

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line
  700, in _init_instance

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  drv_state = self._get_power_state(context, instance)

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line
  808, in _get_power_state

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  return self.driver.get_info(instance)["state"]

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  File "/usr/lib/python2.7/dist-packages/nova/virt/vmwareapi/driver.py",
  line 737, in get_info

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  return _vmops.get_info(instance)

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  File "/usr/lib/python2.7/dist-packages/nova/virt/vmwareapi/vmops.py",
  line 1493, in get_info

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  max_mem = int(query['summary.config.memorySizeMB']) * 1024

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup
  TypeError: int() argument must be a string or a number, not 'NoneType'

  2014-05-06 21:52:44.491 421 TRACE nova.openstack.common.threadgroup

  2014-05-06 21:52:44.496 421 DEBUG amqp [-] Closed channel #1 _do_close
  /usr/lib/python2.7/dist-packages/amqp/channel.py:88

  2014-05-06 21:52:44.902 421 INFO nova.openstack.common.vmware.api [-]
  Logging out and terminating the current session with ID =
  526ac461-2770-40fa-a53e-7fe742d2499a.

  2014-05-06 21:52:44.903 421 DEBUG nova.openstack.common.vmware.vim [-]
  Invoking Logout on (sessionManager){

     value = "SessionManager"

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1317912/+subscriptions


Follow ups

References