Correct initialization order for logging to use eventlet locks
oslo logging needs to be reconfigured after eventlet patching
This patch follows the approach suggested in change
I717ecfd1c0f9b791a57f69325365144692f1e0b6
Change-Id: I84cac685726bbcf1285c0f6d9172439aa186466a
Closes-Bug: 1420788
(cherry picked from commit 3db10d0682
)
This commit is contained in:
parent
0967058007
commit
d72e6faca0
|
@ -113,14 +113,6 @@ if __name__ == '__main__':
|
|||
version=pbr.version.VersionInfo('keystone').version_string(),
|
||||
default_config_files=config_files)
|
||||
|
||||
config.setup_logging()
|
||||
|
||||
# Log the options used when starting if we're in debug mode...
|
||||
if CONF.debug:
|
||||
CONF.log_opt_values(logging.getLogger(CONF.prog), logging.DEBUG)
|
||||
|
||||
paste_config = config.find_paste_config()
|
||||
|
||||
monkeypatch_thread = not CONF.standard_threads
|
||||
pydev_debug_url = utils.setup_remote_pydev_debug()
|
||||
if pydev_debug_url:
|
||||
|
@ -131,6 +123,17 @@ if __name__ == '__main__':
|
|||
monkeypatch_thread = False
|
||||
environment.use_eventlet(monkeypatch_thread)
|
||||
|
||||
# NOTE(amakarov): logging must be set up after eventlet patching, otherwise
|
||||
# logging handlers will be left with generic locks instead of using patched
|
||||
# eventlet semaphores.
|
||||
config.setup_logging()
|
||||
|
||||
# Log the options used when starting if we're in debug mode...
|
||||
if CONF.debug:
|
||||
CONF.log_opt_values(logging.getLogger(CONF.prog), logging.DEBUG)
|
||||
|
||||
paste_config = config.find_paste_config()
|
||||
|
||||
service.load_backends()
|
||||
|
||||
servers = []
|
||||
|
|
Loading…
Reference in New Issue