← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1527092] [NEW] wrap_exception missed param info

 

Public bug reported:

in nova/compute/manager.py, wrap_exception is to sent a notification
including the function's param info when the function raised any
exception, such as _post_live_migration as below.

    @wrap_exception()
    @wrap_instance_fault
    def _post_live_migration(self, ctxt, instance,
                            dest, block_migration=False, migrate_data=None):


However, in some case, the payload of the notification whose event type is the fucntion's name may miss the function's param info.
You can reproduce it by make nova/compute/manager.py:_post_live_migration raise excepiton anyway.

nova/exception.py:wrap_exception(notifier=None, get_notifier=None)
                    
                        payload.update({'args': cleansed})        >>>>>>> the args info may miss some param info

                        # If f has multiple decorators, they must use
                        # functools.wraps to ensure the name is
                        # propagated.
                        event_type = f.__name__

                        (notifier or get_notifier()).error(context,
                                                           event_type,
                                                           payload)

** Affects: nova
     Importance: Undecided
         Status: New

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

Title:
  wrap_exception missed param info

Status in OpenStack Compute (nova):
  New

Bug description:
  in nova/compute/manager.py, wrap_exception is to sent a notification
  including the function's param info when the function raised any
  exception, such as _post_live_migration as below.

      @wrap_exception()
      @wrap_instance_fault
      def _post_live_migration(self, ctxt, instance,
                              dest, block_migration=False, migrate_data=None):

  
  However, in some case, the payload of the notification whose event type is the fucntion's name may miss the function's param info.
  You can reproduce it by make nova/compute/manager.py:_post_live_migration raise excepiton anyway.

  nova/exception.py:wrap_exception(notifier=None, get_notifier=None)
                      
                          payload.update({'args': cleansed})        >>>>>>> the args info may miss some param info

                          # If f has multiple decorators, they must use
                          # functools.wraps to ensure the name is
                          # propagated.
                          event_type = f.__name__

                          (notifier or get_notifier()).error(context,
                                                             event_type,
                                                             payload)

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


Follow ups