From 2cf1f17ee5dc4957efbbc1f1f8f3781d7b9408d5 Mon Sep 17 00:00:00 2001 From: Samuel Matzek Date: Wed, 18 Nov 2015 13:40:42 -0600 Subject: [PATCH] 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 --- cinder/context.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cinder/context.py b/cinder/context.py index 8c43d9884..e2f627971 100644 --- a/cinder/context.py +++ b/cinder/context.py @@ -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 -- 2.45.2