diff options
author | Luis Tomas Bolivar <ltomasbo@redhat.com> | 2023-01-20 12:16:06 +0100 |
---|---|---|
committer | Luis Tomas Bolivar <ltomasbo@redhat.com> | 2023-02-28 08:19:44 +0100 |
commit | acb809eea422f417d4bfb2d46918839d7d379e4c (patch) | |
tree | 1b436bf5e59b0a692063e020c586d7c5a62ec434 /neutron/plugins | |
parent | 8aea97157450af8dcf1b36b20c67dc1b439f2023 (diff) | |
download | neutron-acb809eea422f417d4bfb2d46918839d7d379e4c.tar.gz |
[OVN] Ensure traffic for provider vlan networks is not tunneled
This patch adds an extra checking to ensure the
"reside-on-redirect-chassis" is set to true for the logical
router port associated to vlan provider network despite having
the "ovn_distributed_floating_ip" enabled or not. This is needed
as there is an OVN bug [1] making it not work as expected.
Note setting this to true has implications as the traffic will be
centrallized (but not tunneled) through the node with the gateway
port.
The expected behavior of this flag, once [1] is fixed is:
- reside-on-redirect-chassis flag to False: means traffic goes
tunneled to the controller with the gateway port. Means it requires
extra MTU reduction to work.
- reside-on-redirect-chassis flag to True: means traffic is not
tunneled to the controller with the gateway port, but the traffic is
centralized through the controller with the gateway port. Thus it
does not require extra MTU reduction.
- reside-on-redirect-chassis to False, but with ovn-chassis-mac-mappings
configured: means the traffic is fully distributed and it is not being
tunneled, nor sent, through the controller with the gateway port. This
is the preferred option as it does not require MTU reduction and it
avoids the extra hop. However it is not working as expected, therefore
the fallback to set reside-on-redirect-chassis to True.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=2162756
Closes-Bug: #2003455
Change-Id: I662cb30c842e54bb9f7dabac5519283aa7c7f8d0
Diffstat (limited to 'neutron/plugins')
-rw-r--r-- | neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/maintenance.py | 5 | ||||
-rw-r--r-- | neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py | 12 |
2 files changed, 12 insertions, 5 deletions
diff --git a/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/maintenance.py b/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/maintenance.py index dd4292abf6..84a205a84b 100644 --- a/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/maintenance.py +++ b/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/maintenance.py @@ -725,7 +725,10 @@ class DBInconsistenciesPeriodics(SchemaAwarePeriodicsBase): # Get router ports belonging to VLAN networks vlan_nets = self._ovn_client._plugin.get_networks( context, {pnet.NETWORK_TYPE: [n_const.TYPE_VLAN]}) - vlan_net_ids = [vn['id'] for vn in vlan_nets] + # FIXME(ltomasbo): Once Bugzilla 2162756 is fixed the + # is_provider_network check should be removed + vlan_net_ids = [vn['id'] for vn in vlan_nets + if not utils.is_provider_network(vn)] router_ports = self._ovn_client._plugin.get_ports( context, {'network_id': vlan_net_ids, 'device_owner': n_const.ROUTER_PORT_OWNERS}) diff --git a/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py b/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py index cab0b25937..1aa80f58cb 100644 --- a/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py +++ b/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py @@ -1252,7 +1252,7 @@ class OVNClient(object): # leak the RAs generated for the tenant networks via the # provider network ipv6_ra_configs['send_periodic'] = 'true' - if is_gw_port and utils.is_provider_network(net): + if is_gw_port and utils.is_external_network(net): ipv6_ra_configs['send_periodic'] = 'false' ipv6_ra_configs['mtu'] = str(net['mtu']) @@ -1578,9 +1578,12 @@ class OVNClient(object): # logical router port is centralized in the chassis hosting the # distributed gateway port. # https://github.com/openvswitch/ovs/commit/85706c34d53d4810f54bec1de662392a3c06a996 + # FIXME(ltomasbo): Once Bugzilla 2162756 is fixed the + # is_provider_network check should be removed if network.get(pnet.NETWORK_TYPE) == const.TYPE_VLAN: options[ovn_const.LRP_OPTIONS_RESIDE_REDIR_CH] = ( - 'false' if ovn_conf.is_ovn_distributed_floating_ip() + 'false' if (ovn_conf.is_ovn_distributed_floating_ip() and + not utils.is_provider_network(network)) else 'true') is_gw_port = const.DEVICE_OWNER_ROUTER_GW == port.get( @@ -1995,8 +1998,9 @@ class OVNClient(object): for subnet in subnets: self.update_subnet(context, subnet, network, txn) - if utils.is_provider_network(network): - # make sure to use admin context as this is a providernet + if utils.is_external_network(network): + # make sure to use admin context as this is a external + # network self.set_gateway_mtu(n_context.get_admin_context(), network, txn) |