summaryrefslogtreecommitdiff
path: root/nova/servicegroup
diff options
context:
space:
mode:
authorSean Dague <sean@dague.net>2015-05-07 07:42:35 -0400
committerSean Dague <sean@dague.net>2015-05-07 20:14:31 -0400
commit3bc171202163a3810fdc9bdb3bad600487625443 (patch)
treee9f257c02401ac7e87fa5d2264681b567ac0e5c4 /nova/servicegroup
parent8121b2397c531fc1479ad90eb296c58efa025944 (diff)
downloadnova-3bc171202163a3810fdc9bdb3bad600487625443.tar.gz
don't report service group connection events as errors in dbdriver
During the upgrade of the API surface with running computes we're going to see disconnects and reconnects for the service group API (as conductor is gone). This is not an ERROR, but a normally expected thing. Change the connect to an INFO Change the disconnect to a WARNING (if it happens a lot someone should look into it). In both cases try to be a lot more specific, because 'model server' is really vague and not a term we use in ops facing documentation. Change-Id: I55417a5b91282c69432bb2ab64441c5cea474d31
Diffstat (limited to 'nova/servicegroup')
-rw-r--r--nova/servicegroup/drivers/db.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/nova/servicegroup/drivers/db.py b/nova/servicegroup/drivers/db.py
index b204b40f9b..7e65c6c2dd 100644
--- a/nova/servicegroup/drivers/db.py
+++ b/nova/servicegroup/drivers/db.py
@@ -15,10 +15,11 @@
from oslo_config import cfg
from oslo_log import log as logging
+import oslo_messaging as messaging
from oslo_utils import timeutils
import six
-from nova.i18n import _, _LE
+from nova.i18n import _, _LI, _LW
from nova.servicegroup import api
from nova.servicegroup.drivers import base
@@ -85,10 +86,14 @@ class DbDriver(base.Driver):
# TODO(termie): make this pattern be more elegant.
if getattr(service, 'model_disconnected', False):
service.model_disconnected = False
- LOG.error(_LE('Recovered model server connection!'))
+ LOG.info(
+ _LI('Recovered connection to nova-conductor '
+ 'for reporting service status.'))
- # TODO(vish): this should probably only catch connection errors
- except Exception:
+ # because we are communicating over conductor, a failure to
+ # connect is going to be a messaging failure, not a db error.
+ except messaging.MessagingTimeout:
if not getattr(service, 'model_disconnected', False):
service.model_disconnected = True
- LOG.exception(_LE('model server went away'))
+ LOG.warn(_LW('Lost connection to nova-conductor '
+ 'for reporting service status.'))