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.
Reviewed: https:/ /review. openstack. org/15541 github. com/openstack/ cinder/ commit/ 4e619fbef867169 7bfec8e75281894 4c9f96cd72
Committed: http://
Submitter: Jenkins
Branch: master
commit 4e619fbef867169 7bfec8e75281894 4c9f96cd72
Author: Vishvananda Ishaya <email address hidden>
Date: Tue Nov 6 20:12:00 2012 -0800
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: I69ba75136e32e9 5c6fdf108f0c4fe 21a5e3bdbe6