Use oslo.middleware request_id¶
Make Nova be in line with the rest of OpenStack on request_id processing which means that global_request_id also works with Nova.
Nova has a copy/pasted version of oslo.middleware RequestId
middleware, because this is code that grew up in Nova using the return
X-Compute-Request-ID, then moved to oslo with
X-OpenStack-Request-ID. Nova never migrated to that middleware.
That middleware now has the logic to accept and validate inbound request_ids. We want this to be consistent through all of OpenStack, so for Nova to participate in global_request_id support as a callee, it needs to be on this middleware.
Adding this middleware will mean that Nova now returns the additional
X-OpenStack-Request-ID header. This requires a microversion per
As an application calling Nova I would like to be able to trace my requests with an application provided global_request_id, which is easy to search for in all service logs.
ComputeReqIdMiddleware to inherent from
Bump requirements to require oslo.middleware >= 3.27.0.
Bump microversion. This is a signaling microversion only, request_id generation and processing happens well before we have anything approaching microversion handling in the paste pipeline. It’s not feasible to make the header a microversion conditional as it would require complete rearchitecting of the request processing flow.
Don’t support global_request_id.
Data model impact¶
REST API impact¶
An additional HTTP Header
X-OpenStack-Request-ID will be returned
after this change. The value will be identical to the existing
There are no plans to ever remove the
Other end user impact¶
Other deployer impact¶
Primary assignee: sdague
Change Nova’s ComputeRequestIdMiddleware
Changes in oslo.middleware for compat headers which were landed in 3.27.0.
oslo.middleware tests that the value of any compat headers is identical to the
Tempest already tests for
X-Compute-Request-IDfrom Nova commands. We are thus transitively tested.
If folks insist a Tempest test for the new header could be added based on microversion, but it’s probably overkill.
api-ref doesn’t yet talk about any of these headers. That should be changed in the future, however given that it’s not currently documented (and will require some os-api-ref changes to be efficient to document that) this work should not be held up for it.
oslo request_id spec - https://specs.openstack.org/openstack/oslo-specs/specs/pike/global-req-id.html
Previous implementation for v3 - which seems to have been accidentally reverted in the v2.1 tear down - https://specs.openstack.org/openstack/nova-specs/specs/juno/implemented/cross-service-request-id.html