Support file watcher to trigger GMR report
Allow generating GMR report upon file trigger in addition to a signal. The feature has been available in oslo.reports since 1.11.0[1] but it can't be used in heat without proper initialization. [1] d23e0a65b23dc77d0104075d2313de6ca22b5cae Change-Id: I28621f85348b47534b08a8652cd7cce348942428
This commit is contained in:
parent
2551c56756
commit
e3def058ca
@ -27,6 +27,7 @@ from oslo_config import cfg
|
|||||||
import oslo_i18n as i18n
|
import oslo_i18n as i18n
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from oslo_reports import guru_meditation_report as gmr
|
from oslo_reports import guru_meditation_report as gmr
|
||||||
|
from oslo_reports import opts as gmr_opts
|
||||||
from oslo_service import systemd
|
from oslo_service import systemd
|
||||||
|
|
||||||
from heat.common import config
|
from heat.common import config
|
||||||
@ -59,7 +60,8 @@ def launch_api(setup_logging=True):
|
|||||||
LOG.info('Starting Heat REST API on %(host)s:%(port)s',
|
LOG.info('Starting Heat REST API on %(host)s:%(port)s',
|
||||||
{'host': host, 'port': port})
|
{'host': host, 'port': port})
|
||||||
profiler.setup(CONF.prog, host)
|
profiler.setup(CONF.prog, host)
|
||||||
gmr.TextGuruMeditation.setup_autorun(version)
|
gmr_opts.set_defaults(CONF)
|
||||||
|
gmr.TextGuruMeditation.setup_autorun(version, conf=CONF)
|
||||||
server = wsgi.Server(CONF.prog, CONF.heat_api)
|
server = wsgi.Server(CONF.prog, CONF.heat_api)
|
||||||
server.start(app, default_port=port)
|
server.start(app, default_port=port)
|
||||||
return server
|
return server
|
||||||
|
@ -29,6 +29,7 @@ from oslo_config import cfg
|
|||||||
import oslo_i18n as i18n
|
import oslo_i18n as i18n
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from oslo_reports import guru_meditation_report as gmr
|
from oslo_reports import guru_meditation_report as gmr
|
||||||
|
from oslo_reports import opts as gmr_opts
|
||||||
from oslo_service import systemd
|
from oslo_service import systemd
|
||||||
|
|
||||||
from heat.common import config
|
from heat.common import config
|
||||||
@ -63,7 +64,8 @@ def launch_cfn_api(setup_logging=True):
|
|||||||
LOG.info('Starting Heat API on %(host)s:%(port)s',
|
LOG.info('Starting Heat API on %(host)s:%(port)s',
|
||||||
{'host': host, 'port': port})
|
{'host': host, 'port': port})
|
||||||
profiler.setup(CONF.prog, host)
|
profiler.setup(CONF.prog, host)
|
||||||
gmr.TextGuruMeditation.setup_autorun(version)
|
gmr_opts.set_defaults(CONF)
|
||||||
|
gmr.TextGuruMeditation.setup_autorun(version, conf=CONF)
|
||||||
server = wsgi.Server(CONF.prog, CONF.heat_api_cfn)
|
server = wsgi.Server(CONF.prog, CONF.heat_api_cfn)
|
||||||
server.start(app, default_port=port)
|
server.start(app, default_port=port)
|
||||||
return server
|
return server
|
||||||
|
@ -30,6 +30,7 @@ from oslo_config import cfg
|
|||||||
import oslo_i18n as i18n
|
import oslo_i18n as i18n
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from oslo_reports import guru_meditation_report as gmr
|
from oslo_reports import guru_meditation_report as gmr
|
||||||
|
from oslo_reports import opts as gmr_opts
|
||||||
from oslo_service import service
|
from oslo_service import service
|
||||||
|
|
||||||
from heat.common import config
|
from heat.common import config
|
||||||
@ -69,7 +70,8 @@ def launch_engine(setup_logging=True):
|
|||||||
from heat.engine import service as engine # noqa
|
from heat.engine import service as engine # noqa
|
||||||
|
|
||||||
profiler.setup(CONF.prog, CONF.host)
|
profiler.setup(CONF.prog, CONF.host)
|
||||||
gmr.TextGuruMeditation.setup_autorun(version)
|
gmr_opts.set_defaults(CONF)
|
||||||
|
gmr.TextGuruMeditation.setup_autorun(version, conf=CONF)
|
||||||
srv = engine.EngineService(CONF.host, rpc_api.ENGINE_TOPIC)
|
srv = engine.EngineService(CONF.host, rpc_api.ENGINE_TOPIC)
|
||||||
workers = CONF.num_engine_workers
|
workers = CONF.num_engine_workers
|
||||||
if not workers:
|
if not workers:
|
||||||
|
Loading…
Reference in New Issue
Block a user