← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1445674] [NEW] Fix kwargs['migration'] KeyError in @errors_out_migration

 

Public bug reported:

This is similar to bug #1423952.
We need to handle that 'migration' can be in args or kwargs.
It should follow the same fix for bug 1423952.

This fixes the KeyError in the decorator by normalizing the args/kwargs
list into a single dict that we can pull the migration from.

2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/nova/exception.py", line 88, in wrapped
2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher     payload)
2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 85, in __exit__
2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/nova/exception.py", line 71, in wrapped
2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher     return f(self, context, *args, **kw)
2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 328, in decorated_function
2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher     LOG.warning(msg, e, instance_uuid=instance_uuid)
2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 85, in __exit__
2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 299, in decorated_function
2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher     return function(self, context, *args, **kwargs)
2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 378, in decorated_function
2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher     return function(self, context, *args, **kwargs)
2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 276, in decorated_function
2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher     migration = kwargs['migration']
2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher KeyError: 'migration'
2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher

** Affects: nova
     Importance: Undecided
     Assignee: Christine Wang (ijuwang)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => Christine Wang (ijuwang)

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

Title:
  Fix kwargs['migration'] KeyError in @errors_out_migration

Status in OpenStack Compute (Nova):
  New

Bug description:
  This is similar to bug #1423952.
  We need to handle that 'migration' can be in args or kwargs.
  It should follow the same fix for bug 1423952.

  This fixes the KeyError in the decorator by normalizing the args/kwargs
  list into a single dict that we can pull the migration from.

  2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/nova/exception.py", line 88, in wrapped
  2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher     payload)
  2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 85, in __exit__
  2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/nova/exception.py", line 71, in wrapped
  2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher     return f(self, context, *args, **kw)
  2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 328, in decorated_function
  2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher     LOG.warning(msg, e, instance_uuid=instance_uuid)
  2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 85, in __exit__
  2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 299, in decorated_function
  2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher     return function(self, context, *args, **kwargs)
  2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 378, in decorated_function
  2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher     return function(self, context, *args, **kwargs)
  2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 276, in decorated_function
  2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher     migration = kwargs['migration']
  2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher KeyError: 'migration'
  2015-04-17 04:53:26.418 23056 TRACE oslo_messaging.rpc.dispatcher

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


Follow ups

References