Fix setting correct 'reside-on-chassis-redirect' in the maintenance task

Setting of the 'reside-on-chassis-redirect' was skipped for LRP ports of
the provider tenant networks in patch [1] but later patch [2] removed
this limitation from the ovn_client but not from the maintenance task.
Due to that this option wasn't updated after e.g. change of the
'enable_distributed_floating_ip' config option and connectivity to the
existing Floating IPs associated to the ports in vlan tenant networks
was broken.

This patch removes that limitation and this option is now updated for
all of the Logical_Router_Ports for vlan networks, not only for external
gateways.

[1] https://review.opendev.org/c/openstack/neutron/+/871252
[2] https://review.opendev.org/c/openstack/neutron/+/878450

Closes-bug: #2073987
Change-Id: I56e791847c8f4f3a07f543689bf22fde8160c9b7
This commit is contained in:
Slawek Kaplonski 2024-07-26 12:02:27 +02:00
parent 725f3cbd8e
commit 4b1bfb93e3
2 changed files with 1 additions and 6 deletions
neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb

@ -728,10 +728,7 @@ 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]})
# 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)]
vlan_net_ids = [vn['id'] for vn in vlan_nets]
router_ports = self._ovn_client._plugin.get_ports(
context, {'network_id': vlan_net_ids,
'device_owner': n_const.ROUTER_PORT_OWNERS})

@ -1678,8 +1678,6 @@ 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_type == const.TYPE_VLAN:
reside_redir_ch = self._get_reside_redir_for_gateway_port(
port['device_id'])