← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1876148] [NEW] OVNL3RouterPlugin should use class RouterPluginBase

 

Public bug reported:

The class OVNL3RouterPlugin in neutron/services/ovn_l3/plugin.py
implements RouterPluginBase but yet is not declaring it such via Inheritance.

This issue was found when trying to invoke

    add_router_interface(self, context, router_id, interface_info=None)

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'
```

** Affects: neutron
     Importance: Undecided
     Assignee: Flavio Fernandes (ffernand)
         Status: New

** Changed in: neutron
     Assignee: (unassigned) => Flavio Fernandes (ffernand)

** Summary changed:

- OVNL3RouterPlugin should use class L3(extensions.APIExtensionDescriptor)
+ OVNL3RouterPlugin should use class RouterPluginBase

** Description changed:

- 
  The class OVNL3RouterPlugin in neutron/services/ovn_l3/plugin.py
- implements L3 but yet is not declaring it such via Inheritance.
+ implements RouterPluginBase but yet is not declaring it such via Inheritance.
  
  This issue was found when trying to invoke
  
-     add_router_interface(self, context, router_id, interface_info=None)
+     add_router_interface(self, context, router_id, interface_info=None)
  
  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)
+     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 L3's abstract methods, issues like this would have been
- discovered sooner.
- 
+ 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'
  ```

-- 
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 use class RouterPluginBase

Status in neutron:
  New

Bug description:
  The class OVNL3RouterPlugin in neutron/services/ovn_l3/plugin.py
  implements RouterPluginBase but yet is not declaring it such via Inheritance.

  This issue was found when trying to invoke

      add_router_interface(self, context, router_id,
  interface_info=None)

  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


Follow ups