[OVN] Set up routing on public bridge like OVS did
This fixes various reported and unreported issues with the new
behaviour.
Removes code repetition as well to pay off some technical debt.
Closes-Bug: #1930360
Change-Id: I726c532e96ca434520838ae8a35d5b88b6dd337b
diff --git a/lib/neutron_plugins/services/l3 b/lib/neutron_plugins/services/l3
index 5d339a0..b6bc028 100644
--- a/lib/neutron_plugins/services/l3
+++ b/lib/neutron_plugins/services/l3
@@ -343,8 +343,8 @@
# Configure the external network as the default router gateway
openstack --os-cloud devstack-admin --os-region "$REGION_NAME" router set --external-gateway $EXT_NET_ID $ROUTER_ID
- # This logic is specific to using the l3-agent for layer 3
- if is_service_enabled q-l3 || is_service_enabled neutron-l3; then
+ # This logic is specific to using OVN or the l3-agent for layer 3
+ if ([[ $Q_AGENT == "ovn" ]] && [[ "$OVN_L3_CREATE_PUBLIC_NETWORK" == "True" ]] && is_service_enabled q-svc neutron-server) || is_service_enabled q-l3 neutron-l3; then
# Configure and enable public bridge
local ext_gw_interface="none"
if is_neutron_ovs_base_plugin; then
@@ -393,7 +393,7 @@
fi
# This logic is specific to using OVN or the l3-agent for layer 3
- if ([[ $Q_AGENT == "ovn" ]] && is_service_enabled q-svc neutron-server) || is_service_enabled q-l3 neutron-l3; then
+ if ([[ $Q_AGENT == "ovn" ]] && [[ "$OVN_L3_CREATE_PUBLIC_NETWORK" == "True" ]] && is_service_enabled q-svc neutron-server) || is_service_enabled q-l3 neutron-l3; then
# if the Linux host considers itself to be a router then it will
# ignore all router advertisements
# Ensure IPv6 RAs are accepted on interfaces with a default route.