vmware-nsx/neutron/openstack/common
Akihiro Motoki 11d6ccbb67 Import request_id middleware bug fix from oslo
There is a bug in request-id middleware that a subsequent API request will
overwrite a request-id of a previous request when multiple API calls are
processed in parallel in request_id middleware.
This commit imports the fix in oslo.

cherry-picked from oslo-incubator d7bd9dc37ac3d6bc171cd2e290c772633ad20a32
Closes-Bug: #1289696
----
Don't store the request ID value in middleware as class variable

The original version of the request_id middleware generates a request ID during
process_request() and stores the value in a variable, so it can be attached as
header in process_request(). This is pretty dangerous, since subsequent
requests will overwrite this value, and the wrong request ID may be attached to
some responses. This is particularly apparent when requests arrive in parallel.

This change replaces process_request() and process_response() with an override
of __call__(). This allows the generated req_id to be used in the response
header without needing to save it as a class-level variable.
----

Change-Id: Ic20047f604394f1ce4900c3b6a00595223804cba
2014-03-26 23:35:55 +09:00
..
cache Sync oslo cache with oslo-incubator 2014-02-24 09:40:41 +01:00
db Sync latest oslo.db code into neutron 2014-02-11 18:04:01 +04:00
fixture Update lockutils and fixture in openstack.common 2014-01-09 15:59:10 +04:00
middleware Import request_id middleware bug fix from oslo 2014-03-26 23:35:55 +09:00
notifier Rename Quantum to Neutron 2013-07-06 15:02:43 -04:00
rpc Adds multiple RPC worker processes to neutron server 2014-03-04 00:50:20 +00:00
__init__.py Sync excutils from oslo 2014-03-19 13:01:06 +04:00
context.py Rename Quantum to Neutron 2013-07-06 15:02:43 -04:00
eventlet_backdoor.py Update RPC code from oslo 2014-01-15 04:26:57 -08:00
excutils.py Sync excutils from oslo 2014-03-19 13:01:06 +04:00
fileutils.py Update RPC code from oslo 2014-01-15 04:26:57 -08:00
gettextutils.py Sync excutils from oslo 2014-03-19 13:01:06 +04:00
importutils.py Update RPC code from oslo 2014-01-15 04:26:57 -08:00
jsonutils.py Update RPC code from oslo 2014-01-15 04:26:57 -08:00
local.py Update RPC code from oslo 2014-01-15 04:26:57 -08:00
lockutils.py Update lockutils and fixture in openstack.common 2014-01-09 15:59:10 +04:00
log_handler.py Add user-supplied arguments in log_handler 2014-02-26 19:18:59 +08:00
log.py Update RPC code from oslo 2014-01-15 04:26:57 -08:00
loopingcall.py Update RPC code from oslo 2014-01-15 04:26:57 -08:00
network_utils.py Remove dependent module py3kcompat 2014-02-17 15:14:56 +08:00
periodic_task.py Update RPC code from oslo 2014-01-15 04:26:57 -08:00
policy.py Rename Quantum to Neutron 2013-07-06 15:02:43 -04:00
processutils.py Update RPC code from oslo 2014-01-15 04:26:57 -08:00
service.py Update RPC code from oslo 2014-01-15 04:26:57 -08:00
sslutils.py Update RPC code from oslo 2014-01-15 04:26:57 -08:00
threadgroup.py Update RPC code from oslo 2014-01-15 04:26:57 -08:00
timeutils.py Update RPC code from oslo 2014-01-15 04:26:57 -08:00
uuidutils.py Update RPC code from oslo 2014-01-15 04:26:57 -08:00
versionutils.py Update RPC code from oslo 2014-01-15 04:26:57 -08:00