Bug 1042952

Summary: [RFE][oslo]: Middleware to ensure request ID for API response
Product: Red Hat OpenStack Reporter: RHOS Integration <rhos-integ>
Component: RFEsAssignee: RHOS Maint <rhos-maint>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: markmc, yeylon
Target Milestone: Upstream M2Keywords: FutureFeature
Target Release: 5.0 (RHEL 7)   
Hardware: Unspecified   
OS: Unspecified   
URL: https://blueprints.launchpad.net/oslo/+spec/middleware-request-id
Whiteboard: upstream_milestone_icehouse-2 upstream_status_implemented upstream_definition_approved
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-27 13:49:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description RHOS Integration 2013-12-13 16:46:39 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/oslo/+spec/middleware-request-id.

Description:

According to the thread of request-id [1],
there seems a need for a wsgi middleware which generates request-id
for each REST request and ensures it in a corresponding response.
The middlware is located outer-most of a wsgi pipeline,
catches all kind of exceptions and ensures request-id in a response.
It is the concept swift already has as catch_error middleware.

The feature of the proposed middleware is simple:
  * Catch all exceptions in wsgi pipeline
  * Generate request-id for each REST request
  * Set the generated request-id to request environment
  * Add X-OpenStack-Request-Id header to API response to return request-id
  * Expected to place outer-most (i.e., first) in wsgi pipeline

The initial implemetation proposed to neutron is available at
https://review.openstack.org/#/c/58270/
(The name of middleware is not good....)

[1] http://lists.openstack.org/pipermail/openstack-dev/2013-November/thread.html#20683
[2] http://lists.openstack.org/pipermail/openstack-dev/2013-December/021422.html


Specification URL (additional information):

None

Comment 2 Stephen Gordon 2014-01-23 20:50:42 UTC
Moving to POST based on upstream status (Implemented).