diff options
author | Sean Dague <sean@dague.net> | 2017-05-26 06:46:00 -0400 |
---|---|---|
committer | Sean Dague <sean@dague.net> | 2017-06-05 10:15:20 -0400 |
commit | 9189d9be88a7a236336a193371c140c943087b7e (patch) | |
tree | 98100ed2301fc8dc8a98a1ddcafccb67cd89d239 /nova/image | |
parent | 6b383444963f65079d01bfec6c1c18ada51c9e64 (diff) | |
download | nova-9189d9be88a7a236336a193371c140c943087b7e.tar.gz |
Send request_id on glance calls
This changes the constructor so that glance calls will carry forward
the request_id to the glance service. ``global_id`` is a magic
property on new oslo.context which is either set to the
global_request_id sent into Nova, or the local request id if it's not
set.
Fix some unit tests to handle this new parameter when mocking
glanceclient calls.
oslo spec I65de8261746b25d45e105394f4eeb95b9cb3bd42
Change-Id: I16f9dda3c904c4a2578fa6a691fed646a41f6793
Diffstat (limited to 'nova/image')
-rw-r--r-- | nova/image/glance.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/nova/image/glance.py b/nova/image/glance.py index 8616836402..5620fc1566 100644 --- a/nova/image/glance.py +++ b/nova/image/glance.py @@ -91,6 +91,7 @@ def _glanceclient_from_endpoint(context, endpoint, version): # NOTE(sdague): even if we aren't using keystone, it doesn't # hurt to send these headers. params['identity_headers'] = generate_identity_headers(context) + params['global_request_id'] = context.global_id if endpoint.startswith('https://'): # https specific params params['insecure'] = CONF.glance.api_insecure |