[release-4.10] OCPBUGS-5112: OpenStack: Force JSON content-type in Swift object listing#6726
Conversation
Some OpenStack object storages respond with `204 No Content` to list requests when there are no containers or objects to list. In these cases, when responding to requests with an `Accept: text/plain` or no `Accept` header, some object storages omit the `content-type` header in their status-204 responses. Now, Gophercloud throws an error when the response does not contain a `content-type` header. With this change, we work around the issue by forcing Gophercloud to request a JSON response from the object storage when listing objects. When passed an `Accept: application/json` header, the server responds with `200 Ok` and a `content-type` header in our tests. This solution gives us a fix that is easily backportable because it doesn't require any dependency bump.
|
@openshift-cherrypick-robot: Jira Issue OCPBUGS-5078 has been cloned as Jira Issue OCPBUGS-5112. Retitling PR to link against new bug. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-5112, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@openshift-cherrypick-robot: No Bugzilla bug is referenced in the title of this pull request. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@openshift-cherrypick-robot: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
/jira refresh |
|
@pierreprinetti: This pull request references Jira Issue OCPBUGS-5112, which is valid. The bug has been moved to the POST state. 6 validation(s) were run on this bug
Requesting review from QA contact: DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
mandre
left a comment
There was a problem hiding this comment.
/lgtm
/approve
/label backport-risk-assessed
|
/label cherry-pick-approved |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mandre, pierreprinetti The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@openshift-cherrypick-robot: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-5112 has been moved to the MODIFIED state. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This is an automated cherry-pick of #6725
/assign pierreprinetti