From 7dc718d1d750ce416af62a98c450c70f41ec60d6 Mon Sep 17 00:00:00 2001 From: Kevin Benton Date: Wed, 2 Dec 2015 15:35:00 -0800 Subject: [PATCH] Make port binding message on dead agents clear The previous message was misleading because it made it sound like port binding was being attempted even though the agent is dead. However, the actual logic is that binding will be completely skipped if the agent is dead. This patch updates the message to make that clear and also provides the port ID as part of the warning so operators without debugging enabled can see which ports failed. Change-Id: Ic5031ad8fb06062e9d12b87430d89fc37eb6cde0 Closes-Bug: #1522192 --- neutron/plugins/ml2/drivers/mech_agent.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/neutron/plugins/ml2/drivers/mech_agent.py b/neutron/plugins/ml2/drivers/mech_agent.py index 03fd8dc0db9..d98d29bcb73 100644 --- a/neutron/plugins/ml2/drivers/mech_agent.py +++ b/neutron/plugins/ml2/drivers/mech_agent.py @@ -73,8 +73,9 @@ class AgentMechanismDriverBase(api.MechanismDriver): LOG.debug("Bound using segment: %s", segment) return else: - LOG.warning(_LW("Attempting to bind with dead agent: %s"), - agent) + LOG.warning(_LW("Refusing to bind port %(pid)s to dead agent: " + "%(agent)s"), + {'pid': context.current['id'], 'agent': agent}) @abc.abstractmethod def try_to_bind_segment_for_agent(self, context, segment, agent):