diff options
author | Kaifeng Wang <kaifeng.w@gmail.com> | 2020-04-18 14:35:21 +0800 |
---|---|---|
committer | Kaifeng Wang <kaifeng.w@gmail.com> | 2020-04-20 09:00:03 +0800 |
commit | dcc049768bc30c093637705a81acae5eefbde833 (patch) | |
tree | 52dcb9cc0c6480fb14b88ff873210244f89df32c /ironic/cmd | |
parent | 7afd1698b991d2045e1080ec5ff1a0019571a431 (diff) | |
download | ironic-dcc049768bc30c093637705a81acae5eefbde833.tar.gz |
Fixes unusable Guru meditation report
GMR requires configuring a path for storing the report via [oslo_reports]log_dir,
this is empty by default, and currently there is no means to specify this option,
thus doesn't respond with SIGUSR2.
Though gmr is optional, test requirement is still required so that we can
generate proper configuration sample for it.
Story: 2007570
Task: 39467
Change-Id: I0f03e9d01a3c4e42a4fc8bf2d8ceb2d1a587056c
Diffstat (limited to 'ironic/cmd')
-rw-r--r-- | ironic/cmd/api.py | 2 | ||||
-rw-r--r-- | ironic/cmd/conductor.py | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ironic/cmd/api.py b/ironic/cmd/api.py index 1e8dbcdf6..38ec7bd1f 100644 --- a/ironic/cmd/api.py +++ b/ironic/cmd/api.py @@ -23,6 +23,7 @@ from oslo_config import cfg from oslo_log import log try: from oslo_reports import guru_meditation_report as gmr + from oslo_reports import opts as gmr_opts except ImportError: gmr = None @@ -41,6 +42,7 @@ def main(): ironic_service.prepare_service(sys.argv) if gmr is not None: + gmr_opts.set_defaults(CONF) gmr.TextGuruMeditation.setup_autorun(version) else: LOG.debug('Guru meditation reporting is disabled ' diff --git a/ironic/cmd/conductor.py b/ironic/cmd/conductor.py index d8fbcfec9..1f79f01fb 100644 --- a/ironic/cmd/conductor.py +++ b/ironic/cmd/conductor.py @@ -25,6 +25,7 @@ from oslo_config import cfg from oslo_log import log try: from oslo_reports import guru_meditation_report as gmr + from oslo_reports import opts as gmr_opts except ImportError: gmr = None from oslo_service import service @@ -87,7 +88,8 @@ def main(): ironic_service.prepare_service(sys.argv) if gmr is not None: - gmr.TextGuruMeditation.setup_autorun(version) + gmr_opts.set_defaults(CONF) + gmr.TextGuruMeditation.setup_autorun(version, conf=CONF) else: LOG.debug('Guru meditation reporting is disabled ' 'because oslo.reports is not installed') |