From e4de8d0dd3fed2145a309cf2ca7a487f73545af3 Mon Sep 17 00:00:00 2001 From: Alexandros Soumplis Date: Wed, 19 Feb 2020 14:02:25 +0200 Subject: [PATCH] Improve log message on exception for invalid tunnel type When a tunnel with an invalid or unsupported type is to be created an exception is raised but does not contain info for the offending host. Add the host info and tunnel ip address to the exception error message for better debugging Change-Id: Id989f20043c252ff61ab9a6ee227e8c9c7c5029b Closes-Bug: #1863888 --- neutron/plugins/ml2/drivers/type_tunnel.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/neutron/plugins/ml2/drivers/type_tunnel.py b/neutron/plugins/ml2/drivers/type_tunnel.py index 65f85fad0f5..f292458b88a 100644 --- a/neutron/plugins/ml2/drivers/type_tunnel.py +++ b/neutron/plugins/ml2/drivers/type_tunnel.py @@ -563,7 +563,11 @@ class TunnelRpcCallbackMixin(object): # Return the list of tunnels IP's to the agent return entry else: - msg = _("Network type value '%s' not supported") % tunnel_type + msg = (_("Network type value %(type)s not supported, " + "host: %(host)s with tunnel IP: %(ip)s") % + {'type': tunnel_type, + 'host': host or 'legacy mode (no host provided by agent)', + 'ip': tunnel_ip}) raise exc.InvalidInput(error_message=msg)