Description of problem: Impossible to connect OVN router to external network. When running this command "openstack router set routerA --external-gateway external" the following printed in neutron server log : 2020-05-25 15:36:17.590 81 ERROR neutron.plugins.ml2.managers [req-389a029a-e744-434c-9053-8121bce73e5a 151358a6c7774d28b059bdc9d5720935 bb58f19f4f9348258e42e2d6b7a1d1df - default default] Mechanism driver 'ovn' failed in create_port_postcommit: AttributeError: 'module' object has no attribute 'OVN_NEUTRON_OWNER_TO_PORT_TYPE' 2020-05-25 15:36:17.590 81 ERROR neutron.plugins.ml2.managers Traceback (most recent call last): 2020-05-25 15:36:17.590 81 ERROR neutron.plugins.ml2.managers File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/managers.py", line 455, in _call_on_drivers 2020-05-25 15:36:17.590 81 ERROR neutron.plugins.ml2.managers getattr(driver.obj, method_name)(context) 2020-05-25 15:36:17.590 81 ERROR neutron.plugins.ml2.managers File "/usr/lib/python2.7/site-packages/networking_ovn/ml2/mech_driver.py", line 477, in create_port_postcommit 2020-05-25 15:36:17.590 81 ERROR neutron.plugins.ml2.managers self._ovn_client.create_port(port) 2020-05-25 15:36:17.590 81 ERROR neutron.plugins.ml2.managers File "/usr/lib/python2.7/site-packages/networking_ovn/common/ovn_client.py", line 261, in create_port 2020-05-25 15:36:17.590 81 ERROR neutron.plugins.ml2.managers port_info = self._get_port_options(port) 2020-05-25 15:36:17.590 81 ERROR neutron.plugins.ml2.managers File "/usr/lib/python2.7/site-packages/networking_ovn/common/ovn_client.py", line 243, in _get_port_options 2020-05-25 15:36:17.590 81 ERROR neutron.plugins.ml2.managers port_type = ovn_const.OVN_NEUTRON_OWNER_TO_PORT_TYPE.get( 2020-05-25 15:36:17.590 81 ERROR neutron.plugins.ml2.managers AttributeError: 'module' object has no attribute 'OVN_NEUTRON_OWNER_TO_PORT_TYPE' 2020-05-25 15:36:17.590 81 ERROR neutron.plugins.ml2.managers 2020-05-25 15:36:17.592 81 ERROR neutron.plugins.ml2.plugin [req-389a029a-e744-434c-9053-8121bce73e5a 151358a6c7774d28b059bdc9d5720935 bb58f19f4f9348258e42e2d6b7a1d1df - default default] mechanism_manager.create_port_postcommit failed, deleting port 'f7aa2d30-874d-4058-ae80-b925722aff11': MechanismDriverError Version-Release number of selected component (if applicable): 13.0-RHEL-7/2020-05-19.2 python-networking-ovn-4.0.4-4.el7ost.noarch How reproducible: 100% Steps to Reproduce: On fresh Director install (OVN+DVR) run the following commands 1. Create external network: openstack network create --provider-network-type flat --provider-physical-network datacentre --external external 2. Create external subnet openstack subnet create --gateway 10.0.0.1 --dns-nameserver 10.0.0.1 --network external --subnet-range 10.0.0.0/24 --allocation-pool start=10.0.0.151,end=10.0.0.200 external-subnet 3. Create router openstack router create routerA 4. Try to connect router to the external network openstack router set routerA --external-gateway external Actual results: HttpException: 500: Server Error for url: http://10.0.0.108:9696/v2.0/routers/0ef1977b-2f8c-4fc7-a908-f49b45e1fc71, {"NeutronError": {"message": "Request Failed: internal server error while processing your request.", "type": "HTTPInternalServerError", "detail": ""}} Expected results: Router connected to external network Additional info: Note, the issue makes OVN almost unusable on z12-spin2 puddle (2020-05-19.2) More than 200 tempest tests failed on various OVN downstream CI jobs.
*** This bug has been marked as a duplicate of bug 1839717 ***