Reviewed: https://review.opendev.org/724930 Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=f1cc1bb2813acc5b361bd92823e778a5b6dbea52 Submitter: Zuul Branch: master
commit f1cc1bb2813acc5b361bd92823e778a5b6dbea52 Author: Flavio Fernandes <[email protected]> Date: Fri May 1 16:56:21 2020 -0400 [ovn]: Fix l3_plugin.add_router_interface to comply with RouterPluginBase OVNL3RouterPlugin inherits from L3_NAT_dbonly_mixin, which inherits from neutron.extensions.l3.RouterPluginBase As maintenance task expects OVNL3RouterPlugin to behave as RouterPluginBase, the add_router_interface should have the signature: add_router_interface(self, context, router_id, interface_info) Note: With this change, the default behavior of OVNL3RouterPlugin's _add_neutron_router_interface becomes idem-potent: multiple calls to add the same interface will not fail. Because of that, the unit test test_router_add_interface_dup_port no longer makes sense and is being removed. Closes-Bug: #1876148 Change-Id: I8010113b4d8c66ecbccf3126f322a8836d92e7ba Signed-off-by: Flavio Fernandes <[email protected]> ** 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/1876148 Title: OVNL3RouterPlugin should add_router_interface as in RouterPluginBase Status in neutron: Fix Released Bug description: The class OVNL3RouterPlugin in neutron/services/ovn_l3/plugin.py implements RouterPluginBase but its implementation of add_router_interface is using a parameter that is not part of RouterPluginBase. From neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/maintenance.py def _create_lrouter_port(self, context, port): router_id = port['device_id'] self._ovn_client._l3_plugin.add_router_interface( context, router_id, {'port_id': port['id']}, may_exist=True) where the param may_exist does not exist. That caused the failure below. By complying with RouterPluginBase's abstract methods, issues like this would have been discovered sooner. ``` Apr 30 08:52:00 dstackvm neutron-server[1508]: ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance File "/opt/stack/neutron/neutron/plugins/ml2/driver\ s/ovn/mech_driver/ovsdb/maintenance.py", line 401, in _create_lrouter_port Apr 30 08:52:00 dstackvm neutron-server[1508]: ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance context, router_id, {'port_id': port['id']}, may_\ exist=True) Apr 30 08:52:00 dstackvm neutron-server[1508]: ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance TypeError: add_router_interface() got an unexpected k\ eyword argument 'may_exist' ``` To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1876148/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

