diff --git a/cinder/wsgi/wsgi.py b/cinder/wsgi/wsgi.py index 1cc69a34fce..f8a2bac34f0 100644 --- a/cinder/wsgi/wsgi.py +++ b/cinder/wsgi/wsgi.py @@ -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) diff --git a/releasenotes/notes/gmr-ca97ba4602ce0831.yaml b/releasenotes/notes/gmr-ca97ba4602ce0831.yaml new file mode 100644 index 00000000000..6e093227ff8 --- /dev/null +++ b/releasenotes/notes/gmr-ca97ba4602ce0831.yaml @@ -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. diff --git a/requirements.txt b/requirements.txt index f0bd467b87c..7cf115e5966 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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