Hello, Daniel (CC'd) and I were debugging an issue in openstack tripleo CI for OVN job. We are noticing an issue when ovn-controller deletes the patch ports in the external bridge specified in "ovn-bridge-mappings". The external bridge (br-ex) is configured with MTU 1450 as it has an vxlan port. (TripleO CI setup configures the MTU).
When ovn-controller deletes the patch port in br-ex, ovs-vswitchd is changing the MTU of br-ex to 1500 and this is causing problem. We are able to reproduce the issue by the below commands. This issue is seen only once. If we re-add the patch ports to br1, br2 we don't see the issue. We can reproduce the issue either if we delete the bridges and recreate again or restart ovs-vswitchd. *********** ovs-vsctl add-br br1 sudo ip link set br1 mtu 1450 ovs-vsctl add-port br1 br1-p1 ovs-vsctl set Interface br1-p1 type=patch ovs-vsctl set Interface br1-p1 options:peer=br2-p1 sleep 1 ovs-vsctl add-br br2 sudo ip link set br2 mtu 1450 ovs-vsctl add-port br2 br2-p1 ovs-vsctl set Interface br2-p1 type=patch ovs-vsctl set Interface br2-p1 options:peer=br1-p1 ip a ovs-vsctl show ovs-vsctl del-port br1-p1 ip a s br1 ************ The below patch fixes the issue. I am not very sure if this is the right fix. I will submit the patch anyway. If someone has a better fix please override the patch. --- ofproto/ofproto.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 7541af0b2..9950897b8 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -2721,18 +2721,20 @@ init_ports(struct ofproto *p) } static bool -ofport_is_internal(const struct ofproto *p, const struct ofport *port) +ofport_is_internal_or_patch(const struct ofproto *p, const struct ofport *port) { return !strcmp(netdev_get_type(port->netdev), - ofproto_port_open_type(p->type, "internal")); + ofproto_port_open_type(p->type, "internal")) || + !strcmp(netdev_get_type(port->netdev), + ofproto_port_open_type(p->type, "patch")); } -/* If 'port' is internal and if the user didn't explicitly specify an mtu - * through the database, we have to override it. */ +/* If 'port' is internal or patch and if the user didn't explicitly specify an + * mtu through the database, we have to override it. */ static bool ofport_is_mtu_overridden(const struct ofproto *p, const struct ofport *port) { - return ofport_is_internal(p, port) + return ofport_is_internal_or_patch(p, port) && !netdev_mtu_is_user_config(port->netdev); } -- _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev