From 6831c0303e65e1e0013dd30e6e4c51abd6fb45d9 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sun, 13 Oct 2024 11:55:25 +0900 Subject: [PATCH] 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 aodh without proper initialization. [1] d23e0a65b23dc77d0104075d2313de6ca22b5cae Change-Id: I9ad70b40f233018072fb4405b1ea29b6d4d2bc1c --- aodh/service.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aodh/service.py b/aodh/service.py index ab1b425f6..ab808e756 100644 --- a/aodh/service.py +++ b/aodh/service.py @@ -22,6 +22,7 @@ import oslo_i18n from oslo_log import log from oslo_policy import opts as policy_opts from oslo_reports import guru_meditation_report as gmr +from oslo_reports import opts as gmr_opts from oslo_utils import importutils from aodh.conf import defaults @@ -110,7 +111,8 @@ def prepare_service(argv=None, config_files=None): # NOTE(tkajinam): guru cannot run with service under apache daemon, so when # aod-api running with mod_wsgi, the argv is [], we don't start guru. if argv: - gmr.TextGuruMeditation.setup_autorun(version) + gmr_opts.set_defaults(conf) + gmr.TextGuruMeditation.setup_autorun(version, conf=conf) profiler.setup(conf) messaging.setup()