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 <sahid.ferdjaoui@industrialdiscipline.com>
This commit is contained in:
Sahid Orentino Ferdjaoui 2024-09-19 13:25:13 +02:00
parent a0bb617148
commit 046be3978f

View File

@ -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: {},