Preserve request id in Cinder logs

Several Cinder volume drivers make calls to get the admin context.
When the admin context is retrieved the user context and its request
ID is lost and all subsequent log entries have different request IDs.

The fix is to pass the overwrite parameter in Cinder's RequestContext
__init__ method to the parent oslo class.

Partial-Bug: #1511406

Change-Id: I8972b46f15518f22dc9bb340d7c1ba08be1fa2bc
This commit is contained in:
Samuel Matzek 2015-11-18 13:40:42 -06:00
parent e8efa5b364
commit 2cf1f17ee5

View File

@ -75,7 +75,8 @@ class RequestContext(context.RequestContext):
user_domain=user_domain,
project_domain=project_domain,
is_admin=is_admin,
request_id=request_id)
request_id=request_id,
overwrite=overwrite)
self.roles = roles or []
self.project_name = project_name
self.read_deleted = read_deleted