Merge "Make oslo.reports an optional dependency"
This commit is contained in:
commit
b148cabdb2
@ -12,6 +12,16 @@ and more. The eventlet backdoor facility provides an interactive shell
|
||||
interface for any eventlet based process, allowing an administrator to
|
||||
telnet to a pre-defined port and execute a variety of commands.
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
The GMR feature is optional and requires the oslo.reports_ package to be
|
||||
installed. For example, using pip::
|
||||
|
||||
pip install 'oslo.reports>=1.18.0'
|
||||
|
||||
.. _oslo.reports: https://opendev.org/openstack/oslo.reports
|
||||
|
||||
Generating a GMR
|
||||
----------------
|
||||
|
||||
|
@ -20,7 +20,11 @@
|
||||
import sys
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_reports import guru_meditation_report as gmr
|
||||
from oslo_log import log
|
||||
try:
|
||||
from oslo_reports import guru_meditation_report as gmr
|
||||
except ImportError:
|
||||
gmr = None
|
||||
|
||||
from ironic.common import profiler
|
||||
from ironic.common import service as ironic_service
|
||||
@ -29,12 +33,18 @@ from ironic import version
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
|
||||
def main():
|
||||
# Parse config file and command line options, then start logging
|
||||
ironic_service.prepare_service(sys.argv)
|
||||
|
||||
if gmr is not None:
|
||||
gmr.TextGuruMeditation.setup_autorun(version)
|
||||
else:
|
||||
LOG.debug('Guru meditation reporting is disabled '
|
||||
'because oslo.reports is not installed')
|
||||
|
||||
profiler.setup('ironic_api', CONF.host)
|
||||
|
||||
|
@ -23,7 +23,10 @@ import sys
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log
|
||||
from oslo_reports import guru_meditation_report as gmr
|
||||
try:
|
||||
from oslo_reports import guru_meditation_report as gmr
|
||||
except ImportError:
|
||||
gmr = None
|
||||
from oslo_service import service
|
||||
|
||||
from ironic.common import profiler
|
||||
@ -83,7 +86,11 @@ def main():
|
||||
# Parse config file and command line options, then start logging
|
||||
ironic_service.prepare_service(sys.argv)
|
||||
|
||||
if gmr is not None:
|
||||
gmr.TextGuruMeditation.setup_autorun(version)
|
||||
else:
|
||||
LOG.debug('Guru meditation reporting is disabled '
|
||||
'because oslo.reports is not installed')
|
||||
|
||||
mgr = rpc_service.RPCService(CONF.host,
|
||||
'ironic.conductor.manager',
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
The guru meditation reporting functionality is now optional and the
|
||||
``oslo.reports`` package is no longer a part of requirements. Install it
|
||||
manually if you need this feature.
|
@ -25,7 +25,6 @@ oslo.i18n>=3.15.3 # Apache-2.0
|
||||
oslo.log>=3.36.0 # Apache-2.0
|
||||
oslo.middleware>=3.31.0 # Apache-2.0
|
||||
oslo.policy>=1.30.0 # Apache-2.0
|
||||
oslo.reports>=1.18.0 # Apache-2.0
|
||||
oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0
|
||||
oslo.service!=1.28.1,>=1.24.0 # Apache-2.0
|
||||
oslo.upgradecheck>=0.1.0 # Apache-2.0
|
||||
|
Loading…
Reference in New Issue
Block a user