[OVN] Router ports gateway_mtu option should not always be set
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Medium
|
Elvira García Ruiz |
Bug Description
High level description:
If a neutron router is connected to a provider network 'A' and private geneve networks. If the mtu of private networks (1442 in normal cases) is lesser than that of provider network (1500), then there is no need for neutron ml2ovn to set options:
Impact:
This is important because the gateway_mtu option makes OVS use the check_pkt_larger() function, which is not necessary in most cases and is currently not hardware-
Step-by-step reproduction steps:
1. Modify ml2_conf.ini: Add ovn_emit_
2. Wire up the networks in a router:
$ openstack network create net1
$ openstack subnet create --subnet-range 192.168.100.0/24 --network net1 subnet1
$ openstack router create r1
$ openstack router add subnet r1 subnet1
$ openstack router set --external-gateway public r1
3. Check MTUs for each network:
By default, net1 will be 1442 and private will be 1500, so mtu_gateway shouldn't be set
4. Check if gateway_mtu was set on the Logical_Router_Port associated to the gateway
$ ovn-nbctl list Logical_Router_port | less
In this case, it shouldn't be set.
Expected results:
gateway_mtu is set in the Gateway LRP options for r1 only if provider MTU < private MTU.
Actual results:
gateway_mtu is always set if ovn_emit_
more info at [0]
Changed in neutron: | |
assignee: | nobody → Elvira García Ruiz (elviragr) |
description: | updated |
tags: | added: ovn |
Changed in neutron: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in neutron: | |
status: | Confirmed → In Progress |
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/818443 /opendev. org/openstack/ neutron/ commit/ 0725533a6fa6a42 d361e518b027f69 da8e1e1ec5
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 0725533a6fa6a42 d361e518b027f69 da8e1e1ec5
Author: Elvira García <email address hidden>
Date: Thu Nov 18 18:08:13 2021 +0100
[OVN] Fix gateway_mtu option should not always be set
OVN Driver currently fixes gateway_mtu MTU to the provider MTU value
without considering if the private networks in the associated router
have greater MTU values than the provider. This is unnecesary and
adds extra actions for each packet. This patch fixes that, as now
gateway_mtu is only set in case the provider MTU is smaller than the
private MTU.
The changes in create_router_port and delete_router_port were necessary
as there could be a use case when the user first sets the gateway
router and later adds subnets from networks with greater MTU, so this
parameter needs to be checked after adding a subnet.
Closes-Bug: #1951559
Signed-off-by: Elvira García <email address hidden> 7303d5641df79ea 919ba7c170d
Change-Id: If56f1a3dcdc8c5