rgw: skip empty check on non-owned buckets by zonegroup#60227
rgw: skip empty check on non-owned buckets by zonegroup#60227
Conversation
|
Should we make this more generic to |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
e3250b4 to
5cc5ed0
Compare
5cc5ed0 to
1785a30
Compare
2d47f0a to
ea0b0a1
Compare
ea0b0a1 to
1880739
Compare
| int RGWBucketAdminOp::remove_bucket(rgw::sal::Driver* driver, const rgw::SiteConfig& site, | ||
| RGWBucketAdminOpState& op_state, |
There was a problem hiding this comment.
the DELETE /admin/bucket api doesn't actually call through this function, so i think we'll need special logic for that. currently it just calls rgw_forward_request_to_master() then sal::Bucket::remove()
edit: or maybe the rest api should use RGWBucketAdminOp::remove_bucket() instead
There was a problem hiding this comment.
hmm I couldn't get your point with that... why do we need DELETE /admin/bucket to comeback to RGWBucketAdminOp::remove_bucket again? Is it about those controls I added to RGWBucketAdminOp::remove_bucket()?
There was a problem hiding this comment.
because RGWOp_Bucket_Remove doesn't call through RGWBucketAdminOp::remove_bucket(), it won't get redirected to the bucket's zonegroup so may remove the bucket without its data
we generally put code in RGWBucketAdminOp so it can shared by both the radosgw-admin commands and their /admin APIs. that's why it's surprising to me that RGWOp_Bucket_Remove doesn't use it
There was a problem hiding this comment.
because
RGWOp_Bucket_Removedoesn't call throughRGWBucketAdminOp::remove_bucket(), it won't get redirected to the bucket's zonegroup so may remove the bucket without its data
Basically in RGWBucketAdminOp::remove_bucket() we don't redirect to the bucket's zonegroup but to stop if the zonegroups don't match: 1880739#diff-36d954c172f2e053a2942c640d14a6183efb6f19d0ad7c991762a769094f2b35R1449-R1455
we generally put code in
RGWBucketAdminOpso it can shared by both the radosgw-admin commands and their /admin APIs. that's why it's surprising to me thatRGWOp_Bucket_Removedoesn't use it
I agree this doesn't look efficient, we can merge these together, but I was wondering how to handle that if-clause to not stop for forwarded requests when zonegroup doesn't match and it's master zonegroup. as that is an admin API it's always about system_user so that can't be a good identifier I believe.
There was a problem hiding this comment.
@cbodley I have integrated both into one and tried a workaround for detecting forwarded requests by checking for rgwx-zonegroup arg. Could you please have another look?
3bc710e to
c1881c5
Compare
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
qa was mostly green in https://pulpito.ceph.com/cbodley-2025-03-28_17:53:04-rgw-wip-cbodley-testing-distro-default-smithi/, but the rgw/dbstore suite failed on if you need to debug that locally, vstart supports |
This looks strange as the zoengroup id, which I take should be uuid is set to ceph/src/rgw/rgw_sal_dbstore.h Line 283 in c3b9e1c |
@cbodley - Would that make sense to skip this fix for dbstore based on the following comment? ceph/src/rgw/rgw_sal_dbstore.cc Line 1827 in c3b9e1c |
sure. it will probably be a long time before any other drivers support multisite. as long as we have multisite test coverage, that will force us to fix this in dbstore eventually |
Compare RGW's zonegroup with bucket's zonegroup and only do the empty check when the bucket is owned by the RGW running the delete. Fixes: https://tracker.ceph.com/issues/68190 Signed-off-by: Seena Fallah <[email protected]>
To align same functionality for bucket deletion from both API and rgw-admin, use the same function from RGWBucketAdminOp. Signed-off-by: Seena Fallah <[email protected]>
472c2c6 to
eb9f569
Compare
Allow running `radosgw-admin bucket rm` from secondary zonegroup. This allows bucket deletion with `--purge-objects` and with `--bypass-gc` when deleting the bucket owned by non-master zonegroup. Signed-off-by: Seena Fallah <[email protected]>
eb9f569 to
c7694dd
Compare
|
fixed the dbstore case and also addressed @anthonyeleven's review on the doc. |
Compare RGW's zonegroup with the bucket's zonegroup and only do the empty check when the bucket is owned by the RGW running the delete.
Fixes: https://tracker.ceph.com/issues/68190