Add GMR to cinder wsgi
When running cinder under WSGI, we might want to have Guru Meditation Reports as well as when running outside of WSGI. Note that, under WSGI, the GMR can only be trigger via a "touch" on a file, the "signal" way is not working because apache is registering the signal handlers instead of cinder, so it's disabled. Change-Id: I28839e2a97c96b8d71d28dbeb9baa049423fa1c4 Signed-off-by: Arnaud Morin <arnaud.morin@ovhcloud.com>
This commit is contained in:
parent
b8cd101fe4
commit
92b9c25d82
@ -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)
|
||||
|
6
releasenotes/notes/gmr-ca97ba4602ce0831.yaml
Normal file
6
releasenotes/notes/gmr-ca97ba4602ce0831.yaml
Normal 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.
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user