From 63a2a65bbe9ab2ec054f47f581b505dfeb441307 Mon Sep 17 00:00:00 2001 From: Oleg Bondarev Date: Mon, 2 Aug 2021 16:49:51 +0300 Subject: [PATCH] Skip DVR binding for ports with invalid OFPORT Invalid OFPORT (-1) causes ofctl errors and timeouts if set it as output in a flow rule. Closes-Bug: #1938685 Change-Id: Ib8be66c3068309832e08066af4e0b75c30e8163a --- .../ml2/drivers/openvswitch/agent/ovs_dvr_neutron_agent.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_dvr_neutron_agent.py b/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_dvr_neutron_agent.py index aac83300ee6..be0d5349932 100644 --- a/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_dvr_neutron_agent.py +++ b/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_dvr_neutron_agent.py @@ -646,9 +646,10 @@ class OVSDVRNeutronAgent(object): "%(ofport)s, rebinding.", {'vif': port.vif_id, 'ofport': port.ofport}) self.unbind_port_from_dvr(port, local_vlan_map) - if port.ofport in (ovs_lib.INVALID_OFPORT, - ovs_lib.UNASSIGNED_OFPORT): - return + + if port.ofport in (ovs_lib.INVALID_OFPORT, + ovs_lib.UNASSIGNED_OFPORT): + return if device_owner == n_const.DEVICE_OWNER_DVR_INTERFACE: self._bind_distributed_router_interface_port(port,