Use oslo.reports for better debugging

oslo.reports [1] helps generate Guru Meditation reports [2] that
would be helpful for debugging Searchlight.

[1] https://github.com/openstack/oslo.reports
[2] https://en.wikipedia.org/wiki/Guru_Meditation

Change-Id: I36e519c54fa6930be9b71756de52953d609887ec
Signed-off-by: Trinh Nguyen <dangtrinhnt@gmail.com>
This commit is contained in:
Trinh Nguyen 2019-01-26 10:50:52 +09:00
parent e1df7779bc
commit b91394e2a9
5 changed files with 9 additions and 1 deletions

View File

@ -65,6 +65,7 @@ oslo.log==3.36.0
oslo.messaging==5.29.0
oslo.middleware==3.31.0
oslo.policy==1.30.0
oslo.reports==1.18.0
oslo.serialization==2.18.0
oslo.service==1.33.0
oslo.upgradecheck==0.1.0

View File

@ -34,6 +34,7 @@ six>=1.10.0 # MIT
oslo.i18n>=3.15.3 # Apache-2.0
oslo.log>=3.36.0 # Apache-2.0
oslo.reports>=1.18.0 # Apache-2.0
oslo.messaging>=5.29.0 # Apache-2.0
oslo.policy>=1.30.0 # Apache-2.0
oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0

View File

@ -25,6 +25,7 @@ import os
import sys
import eventlet
from oslo_reports import guru_meditation_report as gmr
from oslo_utils import encodeutils
@ -56,6 +57,7 @@ from searchlight.common import utils
from searchlight.common import wsgi
from searchlight import notifier
from searchlight import service_policies
from searchlight import version
CONF = cfg.CONF
CONF.import_group("profiler", "searchlight.common.wsgi")
@ -77,6 +79,7 @@ def configure_wsgi():
config.parse_args()
config.set_config_defaults()
logging.setup(CONF, 'searchlight')
gmr.TextGuruMeditation.setup_autorun(version)
utils.register_plugin_opts()
# Fail fast if service policy files aren't found

View File

@ -21,8 +21,10 @@ from oslo_config import cfg
import oslo_i18n
from oslo_log import log
import oslo_messaging
from oslo_reports import guru_meditation_report as gmr
from searchlight.common import utils
from searchlight import version
CONF = cfg.CONF
@ -38,7 +40,7 @@ def prepare_service(argv=None):
oslo_i18n.enable_lazy()
log.set_defaults(_DEFAULT_LOG_LEVELS)
log.register_options(CONF)
gmr.TextGuruMeditation.setup_autorun(version)
utils.register_plugin_opts()
if argv is None:

View File

@ -16,3 +16,4 @@
import pbr.version
version_info = pbr.version.VersionInfo('searchlight')
version_string = version_info.version_string