noauth should also use request_id generated from compute_req_id

Bug #1758031 reported by Zhenyu Zheng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Zhenyu Zheng

Bug Description

When using noauth midlleware, the context is generated here:
https://github.com/openstack/nova/blob/ef6f4e4c8ec82e2c9f9988fe2e04591ee01220e6/nova/api/openstack/auth.py#L56
as the openstack.request_id from req.environ, previously created in:
https://github.com/openstack/oslo.middleware/blob/master/oslo_middleware/request_id.py#L57
was not included in the initialize of the context obj, nova will generate a new request_id for context obj.

As the req.environ['openstack.request_id'] will latter returned to user as the 'x-openstack-request-id'
field in the response header, users may use this for searching etc. But the latter Nova workflow will
all use the context.request_id, which will lead to an inconsistency problem.

Tags: api
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/555266

Changed in nova:
assignee: nobody → Zhenyu Zheng (zhengzhenyu)
status: New → In Progress
Changed in nova:
assignee: Zhenyu Zheng (zhengzhenyu) → Matt Riedemann (mriedem)
Matt Riedemann (mriedem)
Changed in nova:
assignee: Matt Riedemann (mriedem) → Zhenyu Zheng (zhengzhenyu)
importance: Undecided → Low
tags: added: api
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/555266
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=dbca8153e3a724fc428655c99310c24b58e8e093
Submitter: Zuul
Branch: master

commit dbca8153e3a724fc428655c99310c24b58e8e093
Author: Kevin_Zheng <email address hidden>
Date: Thu Mar 22 19:32:13 2018 +0800

    Noauth should also use request_id from compute_req_id.py

    When using noauth midlleware, the context is generated here:
    https://github.com/openstack/nova/blob/ef6f4e4c8ec82e2c9f9988fe2e04591ee01220e6/nova/api/openstack/auth.py#L56
    as the openstack.request_id from req.environ, previously created in:
    https://github.com/openstack/oslo.middleware/blob/master/oslo_middleware/request_id.py#L57
    was not included in the initialize of the context obj,
    oslo_context.context.Context.__init__ will generate a new request_id for
    context obj.

    As the req.environ['openstack.request_id'] will later be returned to the
    user as the 'x-openstack-request-id' field in the response header, users
    may use this for searching etc. But the Nova workflow will all use the
    context.request_id, which will lead to an inconsistency problem.

    Change-Id: I047b5f66b33ac89b2b5e9170c12bc87d76d0946b
    Closes-Bug: #1758031

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 18.0.0.0b1

This issue was fixed in the openstack/nova 18.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.