From 4e619fbef8671697bfec8e752818944c9f96cd72 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Tue, 6 Nov 2012 20:12:00 -0800 Subject: [PATCH] Fix 401 from auth_token middleware The openssl popen call to verify the token returns an error code of 2 when a file doesn't exist. Normally this is caught and the relevant file is downloaded, but monkeypatching os causes this error code to be eaten and cinder to return a 401. Note that this is likely a race condition that depends on exactly when greenthreads are switching that is causing the return code from Popen to get overwritten. It is possible that this is exposing an underlying bug in eventlet but the workaround is simply to make sure that we don't monkeypatch os. Fixes bug 1075838 Change-Id: I69ba75136e32e95c6fdf108f0c4fe21a5e3bdbe6 --- bin/cinder-all | 2 +- bin/cinder-api | 2 +- bin/cinder-scheduler | 2 +- bin/cinder-volume | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/cinder-all b/bin/cinder-all index e3c74eff8..17cd5db78 100755 --- a/bin/cinder-all +++ b/bin/cinder-all @@ -28,7 +28,7 @@ continue attempting to launch the rest of the services. """ import eventlet -eventlet.monkey_patch() +eventlet.monkey_patch(os=False) import os import sys diff --git a/bin/cinder-api b/bin/cinder-api index 33d389fac..375c504a9 100755 --- a/bin/cinder-api +++ b/bin/cinder-api @@ -20,7 +20,7 @@ """Starter script for Cinder OS API.""" import eventlet -eventlet.monkey_patch() +eventlet.monkey_patch(os=False) import os import sys diff --git a/bin/cinder-scheduler b/bin/cinder-scheduler index 33015b3ca..e473ab716 100755 --- a/bin/cinder-scheduler +++ b/bin/cinder-scheduler @@ -20,7 +20,7 @@ """Starter script for Cinder Scheduler.""" import eventlet -eventlet.monkey_patch() +eventlet.monkey_patch(os=False) import gettext import os diff --git a/bin/cinder-volume b/bin/cinder-volume index 47db9518a..8fa613413 100755 --- a/bin/cinder-volume +++ b/bin/cinder-volume @@ -20,7 +20,7 @@ """Starter script for Cinder Volume.""" import eventlet -eventlet.monkey_patch() +eventlet.monkey_patch(os=False) import os import sys -- 2.45.2