Skip to content

Commit 0ee646a

Browse files
authored
Merge pull request #32 from stackhpc/upstream/yoga-2023-03-06
Synchronise yoga with upstream
2 parents 15439ac + f5815bc commit 0ee646a

File tree

12 files changed

+73
-8
lines changed

12 files changed

+73
-8
lines changed

doc/source/ovn/migration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Perform the following steps in the undercloud
136136
* VALIDATE_MIGRATION - Create migration resources to validate the
137137
migration. The migration script, before starting the migration, boot a
138138
server and validates that the server is reachable after the migration.
139-
Default: True.
139+
Default: False
140140

141141
* SERVER_USER_NAME - User name to use for logging into the migration
142142
instances.

etc/oslo-config-generator/neutron.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ namespace = oslo.service.service
2525
namespace = oslo.service.sslutils
2626
namespace = oslo.service.wsgi
2727
namespace = keystonemiddleware.auth_token
28+
namespace = osprofiler

neutron/agent/ovn/metadata/agent.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,10 @@ def _ensure_datapath_checksum(self, namespace):
421421
def _get_port_ips(self, port):
422422
# Retrieve IPs from the port mac column which is in form
423423
# ["<port_mac> <ip1> <ip2> ... <ipN>"]
424+
if not port.mac:
425+
LOG.warning("Port %s MAC column is empty, cannot retrieve IP "
426+
"addresses", port.uuid)
427+
return []
424428
mac_field_attrs = port.mac[0].split()
425429
ips = mac_field_attrs[1:]
426430
if not ips:

neutron/common/ovn/constants.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@
168168
'119': 'domain_search_list',
169169
'252': 'wpad',
170170
'210': 'path_prefix',
171-
'150': 'tftp_server_address'},
171+
'150': 'tftp_server_address',
172+
'255': 'next_server'},
172173
6: {'server-id': 'server_id',
173174
'dns-server': 'dns_server',
174175
'domain-search': 'domain_search',

neutron/common/ovn/utils.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from neutron_lib.api.definitions import l3
2222
from neutron_lib.api.definitions import port_security as psec
2323
from neutron_lib.api.definitions import portbindings
24+
from neutron_lib.api.definitions import provider_net
2425
from neutron_lib.api import validators
2526
from neutron_lib import constants as const
2627
from neutron_lib import context as n_context
@@ -618,6 +619,10 @@ def is_gateway_chassis_invalid(chassis_name, gw_chassis,
618619

619620

620621
def is_provider_network(network):
622+
return network.get(provider_net.PHYSICAL_NETWORK, False)
623+
624+
625+
def is_external_network(network):
621626
return network.get(external_net.EXTERNAL, False)
622627

623628

neutron/db/l3_hamode_db.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ class L3_HA_NAT_db_mixin(l3_dvr_db.L3_NAT_with_dvr_db_mixin,
6969
router_az_db.RouterAvailabilityZoneMixin):
7070
"""Mixin class to add high availability capability to routers."""
7171

72+
router_device_owners = (
73+
l3_dvr_db.L3_NAT_with_dvr_db_mixin.router_device_owners +
74+
(constants.DEVICE_OWNER_ROUTER_HA_INTF, ))
75+
7276
def _verify_configuration(self):
7377
self.ha_cidr = cfg.CONF.l3_ha_net_cidr
7478
try:

neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/maintenance.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,10 @@ def check_vlan_distributed_ports(self):
833833
# Get router ports belonging to VLAN networks
834834
vlan_nets = self._ovn_client._plugin.get_networks(
835835
context, {pnet.NETWORK_TYPE: [n_const.TYPE_VLAN]})
836-
vlan_net_ids = [vn['id'] for vn in vlan_nets]
836+
# FIXME(ltomasbo): Once Bugzilla 2162756 is fixed the
837+
# is_provider_network check should be removed
838+
vlan_net_ids = [vn['id'] for vn in vlan_nets
839+
if not utils.is_provider_network(vn)]
837840
router_ports = self._ovn_client._plugin.get_ports(
838841
context, {'network_id': vlan_net_ids,
839842
'device_owner': n_const.ROUTER_PORT_OWNERS})

neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ def _get_nets_and_ipv6_ra_confs_for_router_port(self, context, port):
12501250
# leak the RAs generated for the tenant networks via the
12511251
# provider network
12521252
ipv6_ra_configs['send_periodic'] = 'true'
1253-
if is_gw_port and utils.is_provider_network(net):
1253+
if is_gw_port and utils.is_external_network(net):
12541254
ipv6_ra_configs['send_periodic'] = 'false'
12551255
ipv6_ra_configs['mtu'] = str(net['mtu'])
12561256

@@ -1562,9 +1562,12 @@ def _gen_router_port_options(self, port, network=None):
15621562
# logical router port is centralized in the chassis hosting the
15631563
# distributed gateway port.
15641564
# https://github.com/openvswitch/ovs/commit/85706c34d53d4810f54bec1de662392a3c06a996
1565+
# FIXME(ltomasbo): Once Bugzilla 2162756 is fixed the
1566+
# is_provider_network check should be removed
15651567
if network.get(pnet.NETWORK_TYPE) == const.TYPE_VLAN:
15661568
options[ovn_const.LRP_OPTIONS_RESIDE_REDIR_CH] = (
1567-
'false' if ovn_conf.is_ovn_distributed_floating_ip()
1569+
'false' if (ovn_conf.is_ovn_distributed_floating_ip() and
1570+
not utils.is_provider_network(network))
15681571
else 'true')
15691572

15701573
is_gw_port = const.DEVICE_OWNER_ROUTER_GW == port.get(
@@ -1979,8 +1982,9 @@ def update_network(self, context, network, original_network=None):
19791982
for subnet in subnets:
19801983
self.update_subnet(context, subnet, network, txn)
19811984

1982-
if utils.is_provider_network(network):
1983-
# make sure to use admin context as this is a providernet
1985+
if utils.is_external_network(network):
1986+
# make sure to use admin context as this is a external
1987+
# network
19841988
self.set_gateway_mtu(n_context.get_admin_context(),
19851989
network, txn)
19861990

neutron/tests/unit/db/test_l3_hamode_db.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,18 @@ def test_update_router_ha_interface_port_ip_not_allow(self):
667667
self.admin_ctx, ports[0]['id'],
668668
port)
669669

670+
def test_delete_router_ha_interface_port(self):
671+
router = self._create_router()
672+
network = self.plugin.get_ha_network(self.admin_ctx,
673+
router['tenant_id'])
674+
binding = self.plugin.add_ha_port(
675+
self.admin_ctx, router['id'], network.network_id,
676+
router['tenant_id'])
677+
678+
self.assertRaises(n_exc.ServicePortInUse,
679+
self.core_plugin.delete_port,
680+
self.admin_ctx, binding.port_id)
681+
670682
def test_create_ha_network_tenant_binding_raises_duplicate(self):
671683
router = self._create_router()
672684
network = self.plugin.get_ha_network(self.admin_ctx,
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
fixes:
3+
- |
4+
[`bug 2003455 <https://bugs.launchpad.net/neutron/+bug/2003455>`_]
5+
It is added an extra checking to ensure the "reside-on-redirect-chassis"
6+
is set to true for the logical router port associated to vlan provider
7+
network despite having the "ovn_distributed_floating_ip" enabled or not.
8+
This is needed as there is an OVN bug
9+
(https://bugzilla.redhat.com/show_bug.cgi?id=2162756) making it not work
10+
as expected. Until that is fixed, we need these workaround
11+
that makes the traffic centrallized, but not tunneled, through the node
12+
with the gateway port, thus avoiding MTU issues.
13+
issues:
14+
- |
15+
Until the OVN bug (https://bugzilla.redhat.com/show_bug.cgi?id=2162756)
16+
is fixed, setting the "reside-on-redirect-chassis" to true for the logical
17+
router port associated to vlan provider network is needed. This workaround
18+
makes the traffic centrallized, but not tunneled, through the node
19+
with the gateway port, thus avoiding MTU issues.

0 commit comments

Comments
 (0)