From 9e13f518ea784a882b157b9b6fd8b2496ad43c65 Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Tue, 30 Jun 2020 10:20:28 +0200 Subject: [PATCH] Improve log message when port losts its vlan tag In some cases it may be useful to log new vlan tag which is found on the port when it losts old vlan tag which should is expected to be there. So this patch adds such value to the log message. TrivialFix Depends-On: https://review.opendev.org/735615 Change-Id: I231e624f460510decc6d2237040c8bef207e2e8e (cherry picked from commit 3ac63422eaebf6edfd581571406266a07a85b883) --- .../ml2/drivers/openvswitch/agent/ovs_neutron_agent.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 160ce5cc7ff..a0479f5675c 100644 --- a/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py +++ b/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py @@ -1534,9 +1534,11 @@ class OVSNeutronAgent(l2population_rpc.L2populationRpcCallBackTunnelMixin, ): LOG.info( "Port '%(port_name)s' has lost " - "its vlan tag '%(vlan_tag)d'!", + "its vlan tag '%(vlan_tag)d'! " + "Current vlan tag on this port is '%(new_vlan_tag)d'.", {'port_name': port.port_name, - 'vlan_tag': lvm.vlan} + 'vlan_tag': lvm.vlan, + 'new_vlan_tag': port_tags[port.port_name]} ) changed_ports.add(port.vif_id) if changed_ports: