← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1758031] Re: noauth should also use request_id generated from compute_req_id

 

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 <zhengzhenyu@xxxxxxxxxx>
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

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1758031

Title:
  noauth should also use request_id generated from compute_req_id

Status in OpenStack Compute (nova):
  Fix Released

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1758031/+subscriptions


References