From d06801153d7879de74055cd789001e5109040192 Mon Sep 17 00:00:00 2001 From: Goutham Pacha Ravi Date: Fri, 15 Feb 2019 14:14:15 -0800 Subject: [PATCH] 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 52db0754fe29df2d56ec642cdab75f11b21e85c0) --- manila/api/openstack/wsgi.py | 2 +- ...815532-supply-request-id-in-all-apis-74419bc1b1feea1e.yaml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/bug-1815532-supply-request-id-in-all-apis-74419bc1b1feea1e.yaml diff --git a/manila/api/openstack/wsgi.py b/manila/api/openstack/wsgi.py index 9f9846f6ac..5a106db8d2 100644 --- a/manila/api/openstack/wsgi.py +++ b/manila/api/openstack/wsgi.py @@ -863,7 +863,7 @@ class Resource(wsgi.Application): for hdr, val in response.headers.items(): val = utils.convert_str(val) response.headers[hdr] = val - + _set_request_id_header(request, response.headers) if not request.api_version_request.is_null(): response.headers[API_VERSION_REQUEST_HEADER] = ( request.api_version_request.get_string()) diff --git a/releasenotes/notes/bug-1815532-supply-request-id-in-all-apis-74419bc1b1feea1e.yaml b/releasenotes/notes/bug-1815532-supply-request-id-in-all-apis-74419bc1b1feea1e.yaml new file mode 100644 index 0000000000..e705202c24 --- /dev/null +++ b/releasenotes/notes/bug-1815532-supply-request-id-in-all-apis-74419bc1b1feea1e.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - APIs that were not returning a request ID ('x-compute-request-id') in the + response headers have been fixed.