← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1563325] Re: KeyError: 'summary.guest.toolsStatus' in vmware driver

 

Reviewed:  https://review.openstack.org/359424
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=d3c7396d87681b82327c59c27fe14cf5e20c3ba5
Submitter: Jenkins
Branch:    master

commit d3c7396d87681b82327c59c27fe14cf5e20c3ba5
Author: Sivasathurappan Radhakrishnan <siva.radhakrishnan@xxxxxxxxx>
Date:   Tue Aug 23 20:47:06 2016 +0000

    Using get() method to prevent KeyError
    
    Using get() to access keys like "summary.guest.toolsStatus" and
    "summary.guest.toolrunningStatus" to avoid exception during hard reboot.
    This change would use a default values even if they don't exist in dict
    as we can have VMs where VM tools wouldn't be installed/running which leads
    to hard reboot
    
    Change-Id: I332867fe783d6d47b81d8a53153af140d4158217
    Closes-bug: #1563325


** Changed in: nova
       Status: In Progress => Fix Released

-- 
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/1563325

Title:
  KeyError: 'summary.guest.toolsStatus' in vmware driver

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  When I do a hard reboot of in vmware instances which do not have
  vmware tools , I get following error

  2016-03-29 21:11:02.463 8893 ERROR oslo_messaging.rpc.dispatcher [req-181921d8-7253-4bfc-b613-6fbae41824b4 4412e38ec9814b96a03e63097ec51f1a 8f75187cd29f4715881f450646fc6e08 - - -] Exception during message handling: 'summary.guest.toolsStatus'
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher     executor_callback))
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher     executor_callback)
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher     result = func(ctxt, **new_args)
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 6751, in reboot_instance
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher     reboot_type)
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/nova/exception.py", line 88, in wrapped
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher     payload)
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 85, in __exit__
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/nova/exception.py", line 71, in wrapped
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher     return f(self, context, *args, **kw)
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 327, in decorated_function
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher     LOG.warning(msg, e, instance_uuid=instance_uuid)
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 85, in __exit__
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 298, in decorated_function
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher     return function(self, context, *args, **kwargs)
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 377, in decorated_function
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher     return function(self, context, *args, **kwargs)
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 355, in decorated_function
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher     kwargs['instance'], e, sys.exc_info())
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 85, in __exit__
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 343, in decorated_function
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher     return function(self, context, *args, **kwargs)
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 3211, in reboot_instance
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher     self._set_instance_obj_error_state(context, instance)
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 85, in __exit__
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 3192, in reboot_instance
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher     bad_volumes_callback=bad_volumes_callback)
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/nova/virt/vmwareapi/driver.py", line 512, in reboot
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher     self._vmops.reboot(instance, network_info, reboot_type)
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/nova/virt/vmwareapi/vmops.py", line 894, in reboot
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher     tools_status = query['summary.guest.toolsStatus']
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher KeyError: 'summary.guest.toolsStatus'
  2016-03-29 21:11:02.463 8893 TRACE oslo_messaging.rpc.dispatcher
  2016-03-29 21:11:02.472 8893 DEBUG oslo_vmware.api [-] Task: (returnval){

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


References