]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Preserve request id in Cinder logs
authorSamuel Matzek <smatzek@us.ibm.com>
Wed, 18 Nov 2015 19:40:42 +0000 (13:40 -0600)
committerSamuel Matzek <smatzek@us.ibm.com>
Wed, 16 Dec 2015 18:04:57 +0000 (12:04 -0600)
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

cinder/context.py

index 8c43d98843553fa3cf5f5fe9020418df6a9f1ecc..e2f6279711606fa8514bc5ff685afe67c6b66769 100644 (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