Public bug reported:

The wrap_exception decorator, which pulls the wrapped method arguments
and sends a notification if there is an exception raised from the
method, is not pulling the full list of arguments.  This is because of a
combination of relying on safe_utils.getcallargs which doesn't pull
arguments when the called method uses *args or **kwargs and not using
get_wrapped_function to get the call args for the decorated method.
What is currently happening is getcallargs is passed a decorated method
and pulls the argument list for the decorator, and most decorators are
defined with *args and **kwargs.  Instead get_wrapped_function should be
called first and the result should be passed to getcallargs.

** Affects: nova
     Importance: Low
     Assignee: Andrew Laski (alaski)
         Status: In Progress

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

Title:
  wrap_exception decorator does not grab arguments properly for
  decorated methods

Status in OpenStack Compute (nova):
  In Progress

Bug description:
  The wrap_exception decorator, which pulls the wrapped method arguments
  and sends a notification if there is an exception raised from the
  method, is not pulling the full list of arguments.  This is because of
  a combination of relying on safe_utils.getcallargs which doesn't pull
  arguments when the called method uses *args or **kwargs and not using
  get_wrapped_function to get the call args for the decorated method.
  What is currently happening is getcallargs is passed a decorated
  method and pulls the argument list for the decorator, and most
  decorators are defined with *args and **kwargs.  Instead
  get_wrapped_function should be called first and the result should be
  passed to getcallargs.

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to