From 4c51fd4db5ab8f30a6e4711f48273a9052e9364e Mon Sep 17 00:00:00 2001 From: Aaron Rosen Date: Thu, 20 Mar 2014 21:13:48 -0700 Subject: [PATCH] Log received pool.status This patch adds a log statement so we can figure out what status the lbaas-agent is passing in. This way we can figure out what to prevent. Change-Id: I1a0f809140127ccb9596d83c97add03a853991a3 Closes-bug: #1295491 --- .../loadbalancer/drivers/common/agent_driver_base.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/neutron/services/loadbalancer/drivers/common/agent_driver_base.py b/neutron/services/loadbalancer/drivers/common/agent_driver_base.py index ac352fadd6..229024bae2 100644 --- a/neutron/services/loadbalancer/drivers/common/agent_driver_base.py +++ b/neutron/services/loadbalancer/drivers/common/agent_driver_base.py @@ -94,9 +94,11 @@ class LoadBalancerCallbacks(object): qry = context.session.query(loadbalancer_db.Pool) qry = qry.filter_by(id=pool_id) pool = qry.one() - if pool.status != constants.ACTIVE: - raise n_exc.Invalid(_('Expected active pool')) + raise n_exc.Invalid(_('Pool_id %(pool_id)s status ACTIVE ' + 'is expected but status is %(status)s') % + {'pool_id': pool_id, + 'status': pool.status}) retval = {} retval['pool'] = self.plugin._make_pool_dict(pool)