diff --git a/glance/cmd/api.py b/glance/cmd/api.py index 72fc150768..462273e0e5 100644 --- a/glance/cmd/api.py +++ b/glance/cmd/api.py @@ -39,6 +39,7 @@ if os.name == 'nt': else: eventlet.patcher.monkey_patch() +from oslo_reports import guru_meditation_report as gmr from oslo_utils import encodeutils # If ../glance/__init__.py exists, add ../ to Python search path, so that @@ -58,6 +59,7 @@ from glance.common import config from glance.common import exception from glance.common import wsgi from glance import notifier +from glance import version CONF = cfg.CONF CONF.import_group("profiler", "glance.common.wsgi") @@ -86,6 +88,7 @@ def main(): config.set_config_defaults() wsgi.set_eventlet_hub() logging.setup(CONF, 'glance') + gmr.TextGuruMeditation.setup_autorun(version) notifier.set_defaults() if CONF.profiler.enabled: diff --git a/glance/cmd/registry.py b/glance/cmd/registry.py index 85a13665ea..662e83da84 100644 --- a/glance/cmd/registry.py +++ b/glance/cmd/registry.py @@ -39,6 +39,7 @@ if os.name == 'nt': else: eventlet.patcher.monkey_patch() +from oslo_reports import guru_meditation_report as gmr from oslo_utils import encodeutils # If ../glance/__init__.py exists, add ../ to Python search path, so that @@ -56,6 +57,7 @@ import osprofiler.initializer from glance.common import config from glance.common import wsgi from glance import notifier +from glance import version CONF = cfg.CONF CONF.import_group("profiler", "glance.common.wsgi") @@ -69,6 +71,7 @@ def main(): config.set_config_defaults() wsgi.set_eventlet_hub() logging.setup(CONF, 'glance') + gmr.TextGuruMeditation.setup_autorun(version) notifier.set_defaults() if CONF.profiler.enabled: diff --git a/glance/version.py b/glance/version.py index 0172206cd3..5421c71fcd 100644 --- a/glance/version.py +++ b/glance/version.py @@ -16,3 +16,4 @@ import pbr.version version_info = pbr.version.VersionInfo('glance') +version_string = version_info.version_string diff --git a/lower-constraints.txt b/lower-constraints.txt index eed8354721..35a58c225a 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -72,6 +72,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.25.0 oslo.service==1.30.0 oslo.upgradecheck==0.1.0 diff --git a/requirements.txt b/requirements.txt index f3b84b67ad..837fd28079 100644 --- a/requirements.txt +++ b/requirements.txt @@ -41,6 +41,7 @@ oslo.i18n>=3.15.3 # Apache-2.0 oslo.log>=3.36.0 # Apache-2.0 oslo.messaging>=5.29.0,!=9.0.0 # Apache-2.0 oslo.middleware>=3.31.0 # Apache-2.0 +oslo.reports>=1.18.0 # Apache-2.0 oslo.policy>=1.30.0 # Apache-2.0 retrying!=1.3.0,>=1.2.3 # Apache-2.0