Merge "Ensure vlan network traffic is not centralized"
This commit is contained in:
commit
61121c79a1
@ -393,6 +393,8 @@ LSP_OPTIONS_MCAST_FLOOD = 'mcast_flood'
|
|||||||
LSP_OPTIONS_QOS_MIN_RATE = 'qos_min_rate'
|
LSP_OPTIONS_QOS_MIN_RATE = 'qos_min_rate'
|
||||||
|
|
||||||
LRP_OPTIONS_RESIDE_REDIR_CH = 'reside-on-redirect-chassis'
|
LRP_OPTIONS_RESIDE_REDIR_CH = 'reside-on-redirect-chassis'
|
||||||
|
LRP_OPTIONS_REDIRECT_TYPE = 'redirect-type'
|
||||||
|
BRIDGE_REDIRECT_TYPE = "bridged"
|
||||||
|
|
||||||
# Port Binding types
|
# Port Binding types
|
||||||
PB_TYPE_VIRTUAL = 'virtual'
|
PB_TYPE_VIRTUAL = 'virtual'
|
||||||
|
@ -725,10 +725,7 @@ class DBInconsistenciesPeriodics(SchemaAwarePeriodicsBase):
|
|||||||
# Get router ports belonging to VLAN networks
|
# Get router ports belonging to VLAN networks
|
||||||
vlan_nets = self._ovn_client._plugin.get_networks(
|
vlan_nets = self._ovn_client._plugin.get_networks(
|
||||||
context, {pnet.NETWORK_TYPE: [n_const.TYPE_VLAN]})
|
context, {pnet.NETWORK_TYPE: [n_const.TYPE_VLAN]})
|
||||||
# FIXME(ltomasbo): Once Bugzilla 2162756 is fixed the
|
vlan_net_ids = [vn['id'] for vn in vlan_nets]
|
||||||
# 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(
|
router_ports = self._ovn_client._plugin.get_ports(
|
||||||
context, {'network_id': vlan_net_ids,
|
context, {'network_id': vlan_net_ids,
|
||||||
'device_owner': n_const.ROUTER_PORT_OWNERS})
|
'device_owner': n_const.ROUTER_PORT_OWNERS})
|
||||||
|
@ -1573,21 +1573,29 @@ class OVNClient(object):
|
|||||||
if network is None:
|
if network is None:
|
||||||
network = self._plugin.get_network(admin_context,
|
network = self._plugin.get_network(admin_context,
|
||||||
port['network_id'])
|
port['network_id'])
|
||||||
|
|
||||||
# For VLAN type networks we need to set the
|
# For VLAN type networks we need to set the
|
||||||
# "reside-on-redirect-chassis" option so the routing for this
|
# "reside-on-redirect-chassis" option so the routing for this
|
||||||
# logical router port is centralized in the chassis hosting the
|
# logical router port is centralized in the chassis hosting the
|
||||||
# distributed gateway port.
|
# distributed gateway port.
|
||||||
# https://github.com/openvswitch/ovs/commit/85706c34d53d4810f54bec1de662392a3c06a996
|
# 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:
|
if network.get(pnet.NETWORK_TYPE) == const.TYPE_VLAN:
|
||||||
options[ovn_const.LRP_OPTIONS_RESIDE_REDIR_CH] = (
|
options[ovn_const.LRP_OPTIONS_RESIDE_REDIR_CH] = (
|
||||||
'false' if (ovn_conf.is_ovn_distributed_floating_ip() and
|
'false' if ovn_conf.is_ovn_distributed_floating_ip()
|
||||||
not utils.is_provider_network(network))
|
|
||||||
else 'true')
|
else 'true')
|
||||||
|
|
||||||
is_gw_port = const.DEVICE_OWNER_ROUTER_GW == port.get(
|
is_gw_port = const.DEVICE_OWNER_ROUTER_GW == port.get(
|
||||||
'device_owner')
|
'device_owner')
|
||||||
|
|
||||||
|
# NOTE(ltomasbo): For VLAN type networks connected through the gateway
|
||||||
|
# port there is a need to set the redirect-type option to bridge to
|
||||||
|
# ensure traffic is not centralized through the controller.
|
||||||
|
# For geneve based tenant networks it won't have any effect as it only
|
||||||
|
# applies to network with a localnet associated to it
|
||||||
|
if is_gw_port and ovn_conf.is_ovn_distributed_floating_ip():
|
||||||
|
options[ovn_const.LRP_OPTIONS_REDIRECT_TYPE] = (
|
||||||
|
ovn_const.BRIDGE_REDIRECT_TYPE)
|
||||||
|
|
||||||
if is_gw_port and ovn_conf.is_ovn_emit_need_to_frag_enabled():
|
if is_gw_port and ovn_conf.is_ovn_emit_need_to_frag_enabled():
|
||||||
try:
|
try:
|
||||||
router_ports = self._get_router_ports(admin_context,
|
router_ports = self._get_router_ports(admin_context,
|
||||||
|
9
releasenotes/notes/bug-2003455-dff0d0f00b5a18e2.yaml
Normal file
9
releasenotes/notes/bug-2003455-dff0d0f00b5a18e2.yaml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
[`bug 2003455 <https://bugs.launchpad.net/neutron/+bug/2003455>`_]
|
||||||
|
Previous commit (https://review.opendev.org/c/openstack/neutron/+/871252)
|
||||||
|
added a workaround to avoid vlan provider networks traffic to be tunneled
|
||||||
|
to the compute nodes but it was still centralized. Now the traffic is
|
||||||
|
distributed thanks to using the "redirect-type" flag on the ovn gateway
|
||||||
|
port.
|
Loading…
Reference in New Issue
Block a user