Remove improper LOG.exception() calls in placement

The PUT /allocations Placement API handler was improperly calling
LOG.exception() when two normal-operation events were occurring:

1) When a concurrent attempt to allocate against the same resource
providers had occurred

2) When, due to another process consuming resources concurrently
resulted in capacity being exceeded on one or more of the requested
providers

Neither of the above scenarios is a software error and so the
LOG.exception() calls have been removed.

Change-Id: I569b28313e52d979ac9be5bea88c021a0664d851
Fixes-bug: #1705487
This commit is contained in:
Jay Pipes 2017-07-20 11:58:09 -04:00
parent 3abbfa54c2
commit 8fbb8ba8de

@ -257,11 +257,9 @@ def _set_allocations(req, schema):
"%(rp_uuid)s: %(error)s") %
{'rp_uuid': resource_provider_uuid, 'error': exc})
except exception.InvalidInventory as exc:
LOG.exception("Bad inventory")
raise webob.exc.HTTPConflict(
_('Unable to allocate inventory: %(error)s') % {'error': exc})
except exception.ConcurrentUpdateDetected as exc:
LOG.exception("Concurrent Update")
raise webob.exc.HTTPConflict(
_('Inventory changed while attempting to allocate: %(error)s') %
{'error': exc})