From 0aa154b5ce9dc8da73309fb212843a2b69b68696 Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Tue, 3 Oct 2023 21:20:34 +0000 Subject: [PATCH] Fix the ``log.setup`` method call with "fix_eventlet=False" Since [1], present in oslo.log 5.3.0, the ``log.setup`` method is unpatching the evenlet thread module. That is causing several problems in some Neutron services, in particular the keepalived-state-change service. Within this oslo.log version, the patch [2] is provided to call this method without unpatching any eventlet module. This patch is also bumping the minimum required version of oslo.log to 5.3.0, in order to call the ``log.setup`` method with the kwarg "fix_eventlet=False". [1]https://review.opendev.org/c/openstack/oslo.log/+/852443 [2]I4bbcfe7db6d75188e61b9084cb02b2dd2aaa0c76 Closes-Bug: #2037239 Change-Id: Iea77d20bec330b692e3e8c9e38b3a62e2047b4f4 --- neutron/cmd/ovn/neutron_ovn_db_sync_util.py | 2 +- neutron/common/config.py | 2 +- requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/neutron/cmd/ovn/neutron_ovn_db_sync_util.py b/neutron/cmd/ovn/neutron_ovn_db_sync_util.py index 25d49acc22a..1ca0c46880b 100644 --- a/neutron/cmd/ovn/neutron_ovn_db_sync_util.py +++ b/neutron/cmd/ovn/neutron_ovn_db_sync_util.py @@ -170,7 +170,7 @@ def main(): LOG.error('Error parsing the configuration values. Please verify.') return - logging.setup(conf, 'neutron_ovn_db_sync_util') + logging.setup(conf, 'neutron_ovn_db_sync_util', fix_eventlet=False) LOG.info('Started Neutron OVN db sync') mode = ovn_conf.get_ovn_neutron_sync_mode() # Migrate mode will run as repair mode in the synchronizer diff --git a/neutron/common/config.py b/neutron/common/config.py index 84b8f5fbc79..65697dabc62 100644 --- a/neutron/common/config.py +++ b/neutron/common/config.py @@ -115,7 +115,7 @@ def setup_logging(): # that Neutron needs. logging.set_defaults(default_log_levels=logging.get_default_log_levels() + EXTRA_LOG_LEVEL_DEFAULTS) - logging.setup(cfg.CONF, product_name) + logging.setup(cfg.CONF, product_name, fix_eventlet=False) LOG.info("Logging enabled!") LOG.info("%(prog)s version %(version)s", {'prog': sys.argv[0], diff --git a/requirements.txt b/requirements.txt index cb72debe32d..115c5141707 100644 --- a/requirements.txt +++ b/requirements.txt @@ -34,7 +34,7 @@ oslo.config>=9.0.0 # Apache-2.0 oslo.context>=2.22.0 # Apache-2.0 oslo.db>=4.44.0 # Apache-2.0 oslo.i18n>=3.20.0 # Apache-2.0 -oslo.log>=4.5.0 # Apache-2.0 +oslo.log>=5.3.0 # Apache-2.0 oslo.messaging>=7.0.0 # Apache-2.0 oslo.middleware>=3.31.0 # Apache-2.0 oslo.policy>=3.12.0 # Apache-2.0