]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
OVS-DVR: Improve an error log about csnat port
authorYAMAMOTO Takashi <yamamoto@valinux.co.jp>
Fri, 24 Apr 2015 04:49:02 +0000 (13:49 +0900)
committerYAMAMOTO Takashi <yamamoto@valinux.co.jp>
Fri, 15 May 2015 02:35:20 +0000 (11:35 +0900)
Use a single LOG.error per message rather than per lines.
Also, print both of old and new subnets.

Change-Id: I162d3d178fec8b84b66fdfd5a037c2d858c47e30

neutron/plugins/openvswitch/agent/ovs_dvr_neutron_agent.py

index 80a7d92c852bb0cebc82b698b2d9c31b81e34493..43f4ac5e7e0a8f438c81ccb93fcdd6affa8d48ac 100644 (file)
@@ -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]