Skip to content

Commit

Permalink
Don't log traceback for redis ConnectionError exception
Browse files Browse the repository at this point in the history
In partition_handler, the redis connection timesout if there is no
activity for 90 seconds. We have catch all exception that logs the
traceback. Need to catch the ConnectionError exception and not log the
traceback for this case.

Change-Id: If2f391d5ddf3a04aed82b889b1d780de60c4da6b
Closes-Bug: #1578779
(cherry picked from commit 2539e2e)
  • Loading branch information
Sundaresan Rajangam committed May 11, 2016
1 parent 4f73445 commit 1ef7453
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/opserver/partition_handler.py
Expand Up @@ -417,11 +417,14 @@ def _run(self):

except gevent.GreenletExit:
break
except redis.exceptions.ConnectionError:
pass
except Exception as ex:
template = "Exception {0} in uve stream proc. Arguments:\n{1!r}"
messag = template.format(type(ex).__name__, ex.args)
self._logger.error("%s : traceback %s" % \
(messag, traceback.format_exc()))
finally:
lredis = None
if pb is not None:
pb.close()
Expand Down

0 comments on commit 1ef7453

Please sign in to comment.