[Expired for neutron because there has been no activity for 60 days.]

** Changed in: neutron
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2031085

Title:
  error in callback mechanism

Status in neutron:
  Expired

Bug description:
  Version: train
  Deatils:
    when create or delete trunk, agent do not receive notification. neutron 
server error log output:
  Error during notification for 
neutron.services.trunk.rpc.backend.ServerSideRpcBackend.process_event-8351463 
trunk, after_create: AttributeError: 'ServerSideRpcBackend' object has no 
attribute '_stub'
  Traceback (most recent call last):
    File "/usr/lib/python3.7/site-packages/neutron_lib/callbacks/manager.py", 
line 199, in _notify_loop
    callback(resource, event, trigger, **kwargs)
  File 
"/usr/lib/python3.7/site-packages/neutron/services/trunk/rpc/backend.py", line 
58, in process_event
    events.AFTER_CREATE: self._stub.trunk_created,
  AttributeError: 'ServerSideRpcBackend' object has no attribute '_stub'

  Root reason: ServerSideRpcBackend decorated by
  neutron_lib.callbacks.registry.has_registry_receivers and replace
  __new__ method, when create ServerSideRpcBackend instance and throw
  exception in __init__,  the replacement __new__ method does not know
  and already registerd callbacks.

  Example:

  from neutron_lib.callbacks import registry

  class BClass(object):
      def __init__(self):
          raise IOError()

  @registry.has_registry_receivers
  class AClass(object):

      def __init__(self):
          self.b = BClass()
          self.a = 1

      @registry.receives("test", ["after_create"])
      def test(self):
          pass

  if __name__ == '__main__':
      try:
          a = AClass()
      except BaseException:
          print('error')
      print(registry._CALLBACK_MANAGER._callbacks)

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2031085/+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