Problem using version specific endpoints when deploying with uWSGI
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| OpenStack Shared File Systems Service (Manila) |
High
|
Goutham Pacha Ravi |
Bug Description
When deploying with uWSGI, there is a problem using version specific endpoints, i.e, http://
Changed in manila: | |
status: | New → Confirmed |
assignee: | nobody → Victoria Martinez de la Cruz (vkmc) |
status: | Confirmed → New |
Changed in manila: | |
importance: | Undecided → High |
Changed in manila: | |
assignee: | Victoria Martinez de la Cruz (vkmc) → Goutham Pacha Ravi (gouthamr) |
status: | New → In Progress |
Goutham Pacha Ravi (gouthamr) wrote : | #1 |
Changed in manila: | |
milestone: | none → stein-3 |
tags: | added: backport-potential |
Changed in manila: | |
assignee: | Goutham Pacha Ravi (gouthamr) → Tom Barron (tpb) |
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: master
commit 0d8310ec7a169f6
Author: Goutham Pacha Ravi <email address hidden>
Date: Wed Feb 27 11:58:58 2019 -0800
Fix version selector when for proxy-style URLs
When manila API is served behind a proxy, the
"script_name" in the request can have the proxy
component in it. So, this patch fixes the version
selection logic by looking for the version in the
script name string instead of equivalence.
In addition, this patch adds some missing unit
tests and fixes tests that invoke a mocked
wsgi app for testing request context.
Change-Id: I0363d7174f3d7d
Partial-Bug: #1815038
Closes-Bug: #1818081
Changed in manila: | |
status: | In Progress → Fix Released |
Fix proposed to branch: stable/rocky
Review: https:/
Goutham Pacha Ravi (gouthamr) wrote : | #4 |
The fix https:/
returning the right "API versions" information. However, version discovery
with the root endpoint (/) is still broken, ex:
$ curl -i -X GET http://
HTTP/1.1 300 Multiple Choices
Date: Wed, 13 Mar 2019 23:45:25 GMT
Server: Apache/2.4.29 (Ubuntu)
Content-Type: application/json
Content-Length: 748
X-OpenStack-
Vary: X-OpenStack-
Connection: close
{"versions": [{"status": "DEPRECATED", "updated": "2015-08-
Notice that I did not request the API version 2.0 (X-OpenStack-
$ curl -i -X GET http://
HTTP/1.1 300 Multiple Choices
Date: Wed, 13 Mar 2019 23:46:55 GMT
Server: Apache/2.4.29 (Ubuntu)
Content-Length: 746
Connection: close
Content-Type: application/json
{"versions": [{"status": "DEPRECATED", "updated": "2015-08-
So I'm re-opening this bug.
Changed in manila: | |
status: | Fix Released → Confirmed |
Fix proposed to branch: master
Review: https:/
Changed in manila: | |
assignee: | Tom Barron (tpb) → Goutham Pacha Ravi (gouthamr) |
status: | Confirmed → In Progress |
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: master
commit 4b0c953f7fe7afb
Author: Goutham Pacha Ravi <email address hidden>
Date: Wed Mar 13 16:50:27 2019 -0700
Fix API version inferred w/ un-versioned URLs
With [1], we fixed the issue with v1 API URLs when
configuring manila with a reverse proxy, like uwsgi.
However, the version discovery can be made against a
"unversioned" URL, i.e, the "/" endpoint.
Example version discovery target when there's no reverse
proxy:
curl -i -X GET www.openstack-
Example version discovery target when manila is configured
with a web proxy:
curl -i -X GET www.openstack-
Currently, the API assumes that a v2 endpoint is requested
and hence sets a default API version in the request, which
results in the wrong headers communicated to the client.
Fix this issue. The release note added with [1] should
suffice for this fix.
[1] I0363d7174f3d7d
Change-Id: I50d1024ee8485b
Closes-Bug: #1818081
Changed in manila: | |
status: | In Progress → Fix Released |
Fix proposed to branch: stable/rocky
Review: https:/
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit 6b39562c0e0fc44
Author: Goutham Pacha Ravi <email address hidden>
Date: Wed Feb 27 11:58:58 2019 -0800
Fix version selector when for proxy-style URLs
When manila API is served behind a proxy, the
"script_name" in the request can have the proxy
component in it. So, this patch fixes the version
selection logic by looking for the version in the
script name string instead of equivalence.
In addition, this patch adds some missing unit
tests and fixes tests that invoke a mocked
wsgi app for testing request context.
Change-Id: I0363d7174f3d7d
Partial-Bug: #1815038
Closes-Bug: #1818081
(cherry picked from commit 0d8310ec7a169f6
tags: | added: in-stable-rocky |
OpenStack Infra (hudson-openstack) wrote : | #9 |
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit 5a3be01535d3902
Author: Goutham Pacha Ravi <email address hidden>
Date: Wed Mar 13 16:50:27 2019 -0700
Fix API version inferred w/ un-versioned URLs
With [1], we fixed the issue with v1 API URLs when
configuring manila with a reverse proxy, like uwsgi.
However, the version discovery can be made against a
"unversioned" URL, i.e, the "/" endpoint.
Example version discovery target when there's no reverse
proxy:
curl -i -X GET www.openstack-
Example version discovery target when manila is configured
with a web proxy:
curl -i -X GET www.openstack-
Currently, the API assumes that a v2 endpoint is requested
and hence sets a default API version in the request, which
results in the wrong headers communicated to the client.
Fix this issue. The release note added with [1] should
suffice for this fix.
[1] I0363d7174f3d7d
Change-Id: I50d1024ee8485b
Closes-Bug: #1818081
(Cherry-picked from commit 4b0c953f7fe7afb
Fix proposed to branch: stable/queens
Review: https:/
Fix proposed to branch: stable/queens
Review: https:/
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 587a1b2ad319342
Author: Goutham Pacha Ravi <email address hidden>
Date: Wed Feb 27 11:58:58 2019 -0800
Fix version selector when for proxy-style URLs
When manila API is served behind a proxy, the
"script_name" in the request can have the proxy
component in it. So, this patch fixes the version
selection logic by looking for the version in the
script name string instead of equivalence.
In addition, this patch adds some missing unit
tests and fixes tests that invoke a mocked
wsgi app for testing request context.
Change-Id: I0363d7174f3d7d
Partial-Bug: #1815038
Closes-Bug: #1818081
(cherry picked from commit 0d8310ec7a169f6
(cherry picked from commit 6b39562c0e0fc44
tags: | added: in-stable-queens |
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 07c4809940406ed
Author: Goutham Pacha Ravi <email address hidden>
Date: Wed Mar 13 16:50:27 2019 -0700
Fix API version inferred w/ un-versioned URLs
With [1], we fixed the issue with v1 API URLs when
configuring manila with a reverse proxy, like uwsgi.
However, the version discovery can be made against a
"unversioned" URL, i.e, the "/" endpoint.
Example version discovery target when there's no reverse
proxy:
curl -i -X GET www.openstack-
Example version discovery target when manila is configured
with a web proxy:
curl -i -X GET www.openstack-
Currently, the API assumes that a v2 endpoint is requested
and hence sets a default API version in the request, which
results in the wrong headers communicated to the client.
Fix this issue. The release note added with [1] should
suffice for this fix.
[1] I0363d7174f3d7d
Change-Id: I50d1024ee8485b
Closes-Bug: #1818081
(Cherry-picked from commit 5a3be01535d3902
(Cherry-picked from commit 4b0c953f7fe7afb
This issue was fixed in the openstack/manila 8.0.0.0rc1 release candidate.
This issue was fixed in the openstack/manila 6.2.0 release.
This issue was fixed in the openstack/manila 7.2.0 release.
Fix proposed to master:
Fix version selector when for proxy-style URLs /review. openstack. org/#/c/ 639805/
https:/