From dca3cdfae936ae20fcbac392cfde45c7f4d87e45 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Fri, 24 Apr 2015 13:49:02 +0900 Subject: [PATCH] OVS-DVR: Improve an error log about csnat port Use a single LOG.error per message rather than per lines. Also, print both of old and new subnets. Change-Id: I162d3d178fec8b84b66fdfd5a037c2d858c47e30 --- .../plugins/openvswitch/agent/ovs_dvr_neutron_agent.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/neutron/plugins/openvswitch/agent/ovs_dvr_neutron_agent.py b/neutron/plugins/openvswitch/agent/ovs_dvr_neutron_agent.py index 80a7d92c8..43f4ac5e7 100644 --- a/neutron/plugins/openvswitch/agent/ovs_dvr_neutron_agent.py +++ b/neutron/plugins/openvswitch/agent/ovs_dvr_neutron_agent.py @@ -600,9 +600,13 @@ class OVSDVRNeutronAgent(object): # dvr routed subnet ovsport = self.local_ports[port.vif_id] subs = list(ovsport.get_subnets()) - LOG.error(_LE("Centralized-SNAT port %s already seen on "), - port.vif_id) - LOG.error(_LE("a different subnet %s"), subs[0]) + LOG.error(_LE("Centralized-SNAT port %(port)s on subnet " + "%(port_subnet)s already seen on a different " + "subnet %(orig_subnet)s"), { + "port": port.vif_id, + "port_subnet": fixed_ips[0]['subnet_id'], + "orig_subnet": subs[0], + }) return # since centralized-SNAT (CSNAT) port must have only one fixed # IP, directly use fixed_ips[0] -- 2.45.2