summaryrefslogtreecommitdiff
path: root/setup.cfg
diff options
context:
space:
mode:
authorJulien Danjou <julien@danjou.info>2016-06-01 10:07:41 +0200
committerJulien Danjou <julien@danjou.info>2016-06-01 10:07:41 +0200
commit2938f28ca7a75a46068d2cc03f46fa2e7f30aadc (patch)
tree8297dfde5c87007c1ca738adbb6656a6b61ea30c /setup.cfg
parentd1716100a992bdbf96793369cfc961af1c56b19a (diff)
downloadoslo-db-2938f28ca7a75a46068d2cc03f46fa2e7f30aadc.tar.gz
api: do not log a traceback if error is not expected
Currently, when using the retry decorator on a function that raises an error on the last retry, oslo.db always log the following: ERROR oslo_db.api [-] DB exceeded retry limit. ERROR oslo_db.api Traceback (most recent call last): ERROR oslo_db.api File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 138, in wrapper ERROR oslo_db.api return f(*args, **kwargs) ERROR oslo_db.api File "/opt/stack/gnocchi/gnocchi/indexer/sqlalchemy.py", line 686, in list_resources ERROR oslo_db.api raise indexer.InvalidPagination("Invalid sort keys") ERROR oslo_db.api InvalidPagination: Invalid pagination: `Invalid sort keys' Which is wrong, since in this case the `InvalidPagination' is totally unrelated to the retry code. This patch fixes that by only calling LOG.exception if the last try is really about an expected retry condition. Change-Id: Iacc6d3aeac41ddfff76f081428678e2e0688055a Closes-Bug: #1587637
Diffstat (limited to 'setup.cfg')
0 files changed, 0 insertions, 0 deletions