]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Make port binding message on dead agents clear
authorKevin Benton <blak111@gmail.com>
Wed, 2 Dec 2015 23:35:00 +0000 (15:35 -0800)
committerKevin Benton <blak111@gmail.com>
Wed, 2 Dec 2015 23:55:03 +0000 (15:55 -0800)
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

index 03fd8dc0db9e8998eeec93a2d0acac9c8da5cb98..d98d29bcb739ee8b305f111fa0abc574b312a078 100644 (file)
@@ -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):