From 7cf52bb5325ac73b7afa3212cb84d29831e3724a Mon Sep 17 00:00:00 2001 From: Michal Arbet Date: Thu, 12 Nov 2020 13:43:24 +0100 Subject: [PATCH] Fix migration failed due TypeError of new_vlan_tag There could be a situation, when there are ports with port_tags None created in OS infra. Under normal circumstances, it would take some error to the log and go further. But only because there is a "new_vlan_tags must be string" in that log, it is throwing out typeError and dropping the execution of code and the migration is ending by code 500. And this is all done without a message from the log, which is extremely bad. This patch is fixing this behaviour, and flow goes on. Change-Id: Id4ba8d32e6b2301f25c12f83a0708b62aa5b9d6d Closes-Bug: #1903989 --- .../plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 0496e920d33..74b5c679552 100644 --- a/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py +++ b/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py @@ -1787,7 +1787,7 @@ class OVSNeutronAgent(l2population_rpc.L2populationRpcCallBackTunnelMixin, LOG.info( "Port '%(port_name)s' has lost " "its vlan tag '%(vlan_tag)d'! " - "Current vlan tag on this port is '%(new_vlan_tag)d'.", + "Current vlan tag on this port is '%(new_vlan_tag)s'.", {'port_name': port.port_name, 'vlan_tag': lvm.vlan, 'new_vlan_tag': port_tags[port.port_name]}