From: Kevin Benton Date: Wed, 2 Dec 2015 23:35:00 +0000 (-0800) Subject: Make port binding message on dead agents clear X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=7dc718d1d750ce416af62a98c450c70f41ec60d6;p=openstack-build%2Fneutron-build.git 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 --- diff --git a/neutron/plugins/ml2/drivers/mech_agent.py b/neutron/plugins/ml2/drivers/mech_agent.py index 03fd8dc0d..d98d29bcb 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):