Browse Source

Return request-id to APIs that don't respond with a body

Request-IDs help track actions initiated via the API.
With this patch, we can supply the request ID in the
following APIs:
- POST {resource}/action APIs for actions such as
  'reset-state', 'force-delete', 'shrink',
  'extend', 'manage', 'deny_access', 'addProjectAccess',
  'removeProjectAccess', 'promote', 'resync', 'unmanage',
  'revert', 'migration_start', 'migration_complete',
  'migration_cancel'
- POST /share_unmanage/{id}
- DELETE /{resource}/{id} APIs for
  shares, share networks, share groups, share replicas,
  security services, share servers, share snapshots,
  extra specs, messages, quota sets, share-group-snapshots,
  group specs, share-group-types, share types

Change-Id: I64ed14b5a44d6e1b37cfc9321b25bdf4e0aabea5
Closes-Bug: #1815532
(cherry picked from commit 52db0754fe)
tags/7.2.0
Goutham Pacha Ravi 3 months ago
parent
commit
d06801153d

+ 1
- 1
manila/api/openstack/wsgi.py View File

@@ -863,7 +863,7 @@ class Resource(wsgi.Application):
863 863
             for hdr, val in response.headers.items():
864 864
                 val = utils.convert_str(val)
865 865
                 response.headers[hdr] = val
866
-
866
+            _set_request_id_header(request, response.headers)
867 867
             if not request.api_version_request.is_null():
868 868
                 response.headers[API_VERSION_REQUEST_HEADER] = (
869 869
                     request.api_version_request.get_string())

+ 4
- 0
releasenotes/notes/bug-1815532-supply-request-id-in-all-apis-74419bc1b1feea1e.yaml View File

@@ -0,0 +1,4 @@
1
+---
2
+fixes:
3
+  - APIs that were not returning a request ID ('x-compute-request-id') in the
4
+    response headers have been fixed.

Loading…
Cancel
Save