Skip to content

rgw: fix http error checks in keystone/barbican/vault clients#53846

Merged
cbodley merged 1 commit intoceph:mainfrom
cbodley:wip-62989-again
Oct 11, 2023
Merged

rgw: fix http error checks in keystone/barbican/vault clients#53846
cbodley merged 1 commit intoceph:mainfrom
cbodley:wip-62989-again

Conversation

@cbodley
Copy link
Contributor

@cbodley cbodley commented Oct 5, 2023

when RGWHTTPManager encounters an http error, it uses rgw_http_error_to_errno() to map that to a negative posix error code. RGWHTTPClient::process() returns that mapped error code, and exposes the original http error via get_http_status()

the http client code for keystone, barbican, and vault were returning early on the errors from process(), so weren't getting to the http error checks

these clients now check for specific http errors before testing the result of process()

Fixes: https://tracker.ceph.com/issues/62989

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

when RGWHTTPManager encounters an http error, it uses
rgw_http_error_to_errno() to map that to a negative posix error code.
RGWHTTPClient::process() returns that mapped error code, and exposes the
original http error via get_http_status()

the http client code for keystone, barbican, and vault were returning
early on the errors from process(), so weren't getting to the http error
checks

these clients now check for specific http errors before testing the
result of process()

Fixes: https://tracker.ceph.com/issues/62989

Signed-off-by: Casey Bodley <cbodley@redhat.com>
@cbodley
Copy link
Contributor Author

cbodley commented Oct 9, 2023

passed qa in https://pulpito.ceph.com/cbodley-2023-10-06_14:43:00-rgw-wip-62989-again-distro-default-smithi/

including the s3test-against-keystone-ec2 job that was failing before:

s3tests_boto3/functional/test_s3.py::test_list_buckets_bad_auth PASSED [ 60%]

@cbodley cbodley merged commit 6e66389 into ceph:main Oct 11, 2023
tobias-urdin added a commit to tobias-urdin/ceph that referenced this pull request Jan 18, 2024
This changes so that we don't return before even checking
if the request failed by checking the response code like
was done for other methods in [1].

[1] ceph#53846

Signed-off-by: Tobias Urdin <tobias.urdin@binero.se>
AliMasarweh pushed a commit to AliMasarweh/ceph that referenced this pull request Feb 13, 2024
This changes so that we don't return before even checking
if the request failed by checking the response code like
was done for other methods in [1].

[1] ceph#53846

Signed-off-by: Tobias Urdin <tobias.urdin@binero.se>
AliMasarweh pushed a commit to AliMasarweh/ceph that referenced this pull request Feb 19, 2024
This changes so that we don't return before even checking
if the request failed by checking the response code like
was done for other methods in [1].

[1] ceph#53846

Signed-off-by: Tobias Urdin <tobias.urdin@binero.se>
AliMasarweh pushed a commit to AliMasarweh/ceph that referenced this pull request Feb 20, 2024
This changes so that we don't return before even checking
if the request failed by checking the response code like
was done for other methods in [1].

[1] ceph#53846

Signed-off-by: Tobias Urdin <tobias.urdin@binero.se>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants