Merge "Add GMR to cinder wsgi"

This commit is contained in:
Zuul 2024-06-25 00:55:36 +00:00 committed by Gerrit Code Review
commit 248436d1b5
3 changed files with 15 additions and 1 deletions

View File

@ -18,6 +18,8 @@ warnings.simplefilter('once', DeprecationWarning)
from oslo_config import cfg
from oslo_log import log as logging
from oslo_reports import guru_meditation_report as gmr
from oslo_reports import opts as gmr_opts
from oslo_service import wsgi
from cinder import objects # noqa
@ -36,11 +38,17 @@ CONF = cfg.CONF
def initialize_application():
objects.register_all()
gmr_opts.set_defaults(CONF)
CONF(sys.argv[1:], project='cinder',
version=version.version_string())
logging.setup(CONF, "cinder")
config.set_middleware_defaults()
# NOTE(amorin): Do not register signal handers because it does not work
# in wsgi applications
gmr.TextGuruMeditation.setup_autorun(
version, conf=CONF, setup_signal=False)
coordination.COORDINATOR.start()
rpc.init(CONF)

View File

@ -0,0 +1,6 @@
---
other:
- |
Enabled Guru Meditation Reports on Cinder wsgi.
When running Cinder under WSGI, we might want to have Guru Meditation
Reports as well as when running outside of WSGI.

View File

@ -22,7 +22,7 @@ oslo.messaging>=14.1.0 # Apache-2.0
oslo.middleware>=4.1.1 # Apache-2.0
oslo.policy>=3.8.1 # Apache-2.0
oslo.privsep>=2.6.2 # Apache-2.0
oslo.reports>=2.2.0 # Apache-2.0
oslo.reports>=3.2.0 # Apache-2.0
oslo.rootwrap>=6.2.0 # Apache-2.0
oslo.serialization>=4.2.0 # Apache-2.0
oslo.service>=2.8.0 # Apache-2.0