Initialize osprofiler in WSGI application

This patch adds missing initialization of OSProfiler
when Cinder API is running as WSGI application.

Change-Id: Ifaffa2d58eeadf5d47fafbdde5538d26bcd346a6
This commit is contained in:
Ilya Shakhat 2018-01-09 14:05:54 +01:00
parent 6dd3776723
commit 0003ee31f7
1 changed files with 4 additions and 0 deletions

View File

@ -29,7 +29,9 @@ i18n.enable_lazy()
# Need to register global_opts # Need to register global_opts
from cinder.common import config from cinder.common import config
from cinder.common import constants
from cinder import rpc from cinder import rpc
from cinder import service
from cinder import version from cinder import version
CONF = cfg.CONF CONF = cfg.CONF
@ -43,4 +45,6 @@ def initialize_application():
config.set_middleware_defaults() config.set_middleware_defaults()
rpc.init(CONF) rpc.init(CONF)
service.setup_profiler(constants.API_BINARY, CONF.host)
return wsgi.Loader(CONF).load_app(name='osapi_volume') return wsgi.Loader(CONF).load_app(name='osapi_volume')