From 7f039d860535bb7035b5c2b726575f27112a5254 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Thu, 7 May 2015 19:56:01 -0400 Subject: [PATCH] downgrade log messages for memcache server (dis)connect events The connect and disconnect events for the service group memcache server were being logged at ERROR level, this changes them to INFO for connect and WARN for disconnect. It does not narrow the exception catch because the class of errors this can expose are not clear, and we don't test any of this in full stack testing. Change-Id: I5dd96cf90a9ffa3c05fee9e7a8e2c70fc6ac1140 --- nova/servicegroup/drivers/mc.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nova/servicegroup/drivers/mc.py b/nova/servicegroup/drivers/mc.py index 43d1b52f0e6e..145354d5b215 100644 --- a/nova/servicegroup/drivers/mc.py +++ b/nova/servicegroup/drivers/mc.py @@ -21,7 +21,7 @@ from oslo_config import cfg from oslo_log import log as logging from oslo_utils import timeutils -from nova.i18n import _, _LE +from nova.i18n import _, _LI, _LW from nova.openstack.common import memorycache from nova.servicegroup import api from nova.servicegroup.drivers import base @@ -83,10 +83,13 @@ class MemcachedDriver(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 memcache server ' + 'for reporting service status.')) # TODO(vish): this should probably only catch connection errors except Exception: if not getattr(service, 'model_disconnected', False): service.model_disconnected = True - LOG.exception(_LE('model server went away')) + LOG.warn(_LW('Lost connection to memcache server ' + 'for reporting service status.'))