← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1722967] Re: init_handler argument error in ovs agent

 

Reviewed:  https://review.openstack.org/511428
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=3a962e5559c8ab12d529f6927802db9b669e09d4
Submitter: Zuul
Branch:    master

commit 3a962e5559c8ab12d529f6927802db9b669e09d4
Author: Jakub Libosvar <libosvar@xxxxxxxxxx>
Date:   Thu Oct 12 08:51:27 2017 +0000

    trunk: Fix init_handler() agent parameter
    
    Commit 40866acd02a5ecd7fc6705578a82ea79946549a2 stopped passing agent
    object as parameter as it's already referenced by `trigger' parameter.
    This leads to an error during notify_after_init() in agents' code and
    hence trunk handlers are never initialized. This patch replaces `agent'
    reference with `trigger' to correctly initialize handlers.
    
    Change-Id: I808980553056b9fec4e2700c1d5440e42091afbf
    Closes-bug: #1722967


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

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

Title:
  init_handler argument error in ovs agent

Status in neutron:
  Fix Released

Bug description:
  I start a DevStack environment with trunk port feature enabled. In the
  log of ovs agent, I see the following error message:

  neutron-openvswitch-agent[26247]: ERROR neutron_lib.callbacks.manager [None req-505cd81e-24d2-4aac-992f-e1614137c1ee None None] Error during notification for neutron.services.trunk.drivers.openvswitch.agent.driver.init_handler-8755440873883 Open vSwitch agent, after_init: TypeError: init_handler() got an unexpected keyword argument 'payload'
  neutron-openvswitch-agent[26247]: ERROR neutron_lib.callbacks.manager Traceback (most recent call last):
  neutron-openvswitch-agent[26247]: ERROR neutron_lib.callbacks.manager   File "/usr/local/lib/python2.7/dist-packages/neutron_lib/callbacks/manager.py", line 171, in _notify_loop
  neutron-openvswitch-agent[26247]: ERROR neutron_lib.callbacks.manager     callback(resource, event, trigger, **kwargs)
  neutron-openvswitch-agent[26247]: ERROR neutron_lib.callbacks.manager TypeError: init_handler() got an unexpected keyword argument 'payload'
  neutron-openvswitch-agent[26247]: ERROR neutron_lib.callbacks.manager

  I guess the reason is that this patch[1] introduces the following
  change:

  -    def register(self, resource, event, trigger, **kwargs):
  +    def register(self, resource, event, trigger, payload=None):

  but the init_handler function is still defined like this[2]:

  def init_handler(resource, event, trigger, agent=None):

  [1] https://github.com/openstack/neutron/commit/7a6fa742088563ad06597c2430a30a35cca7db42
  [2] https://github.com/openstack/neutron/blob/master/neutron/services/trunk/drivers/openvswitch/agent/driver.py

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


References