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
This commit is contained in:
parent
dc5a398ead
commit
3db10d0682
|
@ -130,10 +130,6 @@ if __name__ == '__main__':
|
|||
version=pbr.version.VersionInfo('keystone').version_string(),
|
||||
default_config_files=config_files)
|
||||
|
||||
config.setup_logging()
|
||||
|
||||
paste_config = config.find_paste_config()
|
||||
|
||||
monkeypatch_thread = not CONF.standard_threads
|
||||
pydev_debug_url = utils.setup_remote_pydev_debug()
|
||||
if pydev_debug_url:
|
||||
|
@ -144,6 +140,13 @@ 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()
|
||||
|
||||
paste_config = config.find_paste_config()
|
||||
|
||||
backends.load_backends()
|
||||
|
||||
admin_worker_count = _get_workers('admin_workers')
|
||||
|
|
Loading…
Reference in New Issue