Bug #45193
closed
Admin API returns 200 instead of 404 for Get Bucket Info
Added by Nick Janus about 4 years ago.
Updated about 3 years ago.
Backport:
octopus, nautilus, mimic
Description
RGW's admin http api responds 200 with an empty response body to Get Bucket Info calls for buckets that do not exist. This behavior seems to have been introduced in Mimic and is also reproducible in Nautilus and Octopus, with either beast or civetweb as the http frontend. Luminous Get Bucket Info returns a 404 and an error response "NoSuchBucket" for non-existent buckets.
I'll update here as I continue debugging.
- Backport set to octopus, nautilus
- Backport changed from octopus, nautilus to octopus, nautilus, mimic
- Assignee set to Mark Kogan
- Tags set to adminapi
I've started working on separating the endpoint's logic from the output (to a send_response method) in order to tighten up the endpoint's input validation (no 404s for nonexistent users or for buckets that don't exist with a uid specified). Since that's not a backwards compatible change, I'm going to continue that work elsewhere, and put the minimal fix with test here.
https://github.com/ceph/ceph/pull/34866
Also, I can't seem to update the original ticket anymore?
- Status changed from New to Fix Under Review
- Pull request ID set to 34866
- Status changed from Fix Under Review to Pending Backport
- Related to Bug #48073: radosgw_admin_rest failure: bucket info API gets NoSuchKey, expects NoSuchBucket added
- Copied to Backport #48099: mimic: Admin API returns 200 instead of 404 for Get Bucket Info added
- Copied to Backport #48100: nautilus: Admin API returns 200 instead of 404 for Get Bucket Info added
- Copied to Backport #48101: octopus: Admin API returns 200 instead of 404 for Get Bucket Info added
- Status changed from Pending Backport to Resolved
While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".
Also available in: Atom
PDF