]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Add exception catch in report_state for DBError
authorJay S. Bryant <jsbryant@us.ibm.com>
Mon, 22 Jun 2015 16:43:37 +0000 (11:43 -0500)
committerJay S. Bryant <jsbryant@us.ibm.com>
Mon, 22 Jun 2015 23:17:39 +0000 (18:17 -0500)
commit3e4caa552969dd298306b124bd2dc02e7a62c835
tree2e9e23ed4f66730d8abcf9d6b322f24e14825fe7
parent4b1dff0e5cf9d1c30d40cfabefabb29d3e8bf96b
Add exception catch in report_state for DBError

We discovered while testing Cinder in an HA
environment that transient DB errors can be
encountered that are not currently covered by
the exception catch in service.py report_state().
The uncaught exceptions were causing the thread
for report_state to prematurely exit and causing
services to no longer update the DB when, in fact,
they were still usable.

This change adds an exception catch for DBError
so that the thread can continue to function.

Change-Id: I95f79b8d6c8f5d7b3e44665306b500b8d2ce3c7c
Closes-bug: 1466991
cinder/service.py
cinder/tests/unit/test_service.py