From 0003ee31f78d7861713a2bb7daacb9701b26a1b9 Mon Sep 17 00:00:00 2001 From: Ilya Shakhat Date: Tue, 9 Jan 2018 14:05:54 +0100 Subject: [PATCH] Initialize osprofiler in WSGI application This patch adds missing initialization of OSProfiler when Cinder API is running as WSGI application. Change-Id: Ifaffa2d58eeadf5d47fafbdde5538d26bcd346a6 --- cinder/wsgi/wsgi.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cinder/wsgi/wsgi.py b/cinder/wsgi/wsgi.py index 7b2d71d71f6..987c545ccb5 100644 --- a/cinder/wsgi/wsgi.py +++ b/cinder/wsgi/wsgi.py @@ -29,7 +29,9 @@ i18n.enable_lazy() # Need to register global_opts from cinder.common import config +from cinder.common import constants from cinder import rpc +from cinder import service from cinder import version CONF = cfg.CONF @@ -43,4 +45,6 @@ def initialize_application(): config.set_middleware_defaults() rpc.init(CONF) + service.setup_profiler(constants.API_BINARY, CONF.host) + return wsgi.Loader(CONF).load_app(name='osapi_volume')