summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Bobrov <bbobrov@mirantis.com>2015-02-12 15:55:24 +0300
committerBoris Bobrov <bbobrov@mirantis.com>2015-02-27 15:44:44 +0000
commit3db10d06828b39e7dbdb2938a581526a78d2957b (patch)
tree1e18003dadd5cfbce5d41946f9c3e740b646594d
parentdc5a398ead4a6bff8323b80a44468382e504d91e (diff)
downloadkeystone-3db10d06828b39e7dbdb2938a581526a78d2957b.tar.gz
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
-rwxr-xr-xbin/keystone-all11
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/keystone-all b/bin/keystone-all
index 89e5128d6..1e595a5af 100755
--- a/bin/keystone-all
+++ b/bin/keystone-all
@@ -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')