From 046be3978f10f6c101d57ddd108fb8d2bbcd1036 Mon Sep 17 00:00:00 2001 From: Sahid Orentino Ferdjaoui Date: Thu, 19 Sep 2024 13:25:13 +0200 Subject: [PATCH] ml2/ovs: improve log message for ports without VLAN tags/net-id during OVS restore Previously, ports without VLAN or net-id tags were ignored during the restoration of the local VLAN map from OVS, but no log message was generated to indicate this. As in normal condition this should not happen, this commit adds a log entry to provide visibility when such ports are encountered. No functional changes, just improved logging. Change-Id: I286ac7a54a997bce3894de490c6d4a7baeb0c87f Signed-off-by: Sahid Orentino Ferdjaoui --- .../ml2/drivers/openvswitch/agent/ovs_neutron_agent.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py b/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py index a6b6dc3bdba..373359c6538 100644 --- a/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py +++ b/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py @@ -480,6 +480,9 @@ class OVSNeutronAgent(l2population_rpc.L2populationRpcCallBackTunnelMixin, except KeyError: continue if not local_vlan: + LOG.warning("While restoring the local VLAN map from OVS, " + "port %s was listed without a tag.", + port.port_name) continue net_uuid = local_vlan_map.get('net_uuid') segmentation_id = local_vlan_map.get('segmentation_id') @@ -490,6 +493,10 @@ class OVSNeutronAgent(l2population_rpc.L2populationRpcCallBackTunnelMixin, local_vlan != ovs_const.DEAD_VLAN_TAG): self.available_local_vlans.remove(local_vlan) self._local_vlan_hints[key] = local_vlan + else: + LOG.warning("While restoring the local VLAN map from OVS, " + "port %s was listed without a network " + "associated.", port.port_name) def _reset_tunnel_ofports(self): self.tun_br_ofports = {n_const.TYPE_GENEVE: {},