summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGoutham Pacha Ravi <gouthampravi@gmail.com>2019-02-15 14:14:15 -0800
committerTom Barron <tpb@dyncloud.net>2019-03-15 19:49:04 +0000
commitd06801153d7879de74055cd789001e5109040192 (patch)
tree39f2c71631f506fbf76019097d7ef7125b7f653a
parent2de32564396d252ed0e618ff4e928fe197baa78f (diff)
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)
Notes
Notes (review): Code-Review+2: Tom Barron <tpb@dyncloud.net> Workflow+1: Tom Barron <tpb@dyncloud.net> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Sat, 16 Mar 2019 03:40:04 +0000 Reviewed-on: https://review.openstack.org/638326 Project: openstack/manila Branch: refs/heads/stable/rocky
-rw-r--r--manila/api/openstack/wsgi.py2
-rw-r--r--releasenotes/notes/bug-1815532-supply-request-id-in-all-apis-74419bc1b1feea1e.yaml4
2 files changed, 5 insertions, 1 deletions
diff --git a/manila/api/openstack/wsgi.py b/manila/api/openstack/wsgi.py
index 9f9846f..5a106db 100644
--- a/manila/api/openstack/wsgi.py
+++ b/manila/api/openstack/wsgi.py
@@ -863,7 +863,7 @@ class Resource(wsgi.Application):
863 for hdr, val in response.headers.items(): 863 for hdr, val in response.headers.items():
864 val = utils.convert_str(val) 864 val = utils.convert_str(val)
865 response.headers[hdr] = val 865 response.headers[hdr] = val
866 866 _set_request_id_header(request, response.headers)
867 if not request.api_version_request.is_null(): 867 if not request.api_version_request.is_null():
868 response.headers[API_VERSION_REQUEST_HEADER] = ( 868 response.headers[API_VERSION_REQUEST_HEADER] = (
869 request.api_version_request.get_string()) 869 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 0000000..e705202
--- /dev/null
+++ b/releasenotes/notes/bug-1815532-supply-request-id-in-all-apis-74419bc1b1feea1e.yaml
@@ -0,0 +1,4 @@
1---
2fixes:
3 - APIs that were not returning a request ID ('x-compute-request-id') in the
4 response headers have been fixed.