Repository navigation
rgw: add radosgw-admin bucket suspend/unsuspend commands - #69645
Conversation
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
14 similar comments
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
@cbodley @AliMasarweh could you please review when you have a chance? |
|
Gentle ping @cbodley @AliMasarweh @ceph/rgw — still looking for a review when you have a moment. Also need |
|
@RaminNietzsche thanks for your patience, I had tasks with close deadline and an urgent costumer issues that I am working on for the past month. so I couldn't review your change |
AliMasarweh
left a comment
There was a problem hiding this comment.
Great job @RaminNietzsche
I have a few comments
| logrecord_ut.gmtime(formatter->dump_stream("judge_reshard_lock_time")); | ||
| formatter->dump_bool("object_lock_enabled", bucket_info.obj_lock_enabled()); | ||
| formatter->dump_bool("mfa_enabled", bucket_info.mfa_enabled()); | ||
| formatter->dump_bool("suspended", (bucket_info.flags & BUCKET_SUSPENDED) != 0); |
There was a problem hiding this comment.
I think we should add a helper method to get this flag
struct RGWBucketInfo {
...
bool bucket_suspended() const { return (flags & BUCKET_SUSPENDED) != 0; }
I saw it 4 times in the code
There was a problem hiding this comment.
I think we should add a helper method to get this flag
Agreed — added RGWBucketInfo::bucket_suspended() and switched the call sites over to it.
| ACCESS_KEY = 'OJODXSLNX4LUNHQG99PB' | ||
| SECRET_KEY = '3l6ffld34qaymfomuh832j94738aie2x4p2o8h6n' |
There was a problem hiding this comment.
All of our tests uses these access key and secret key (which matches vstart ones):
endpoint = 'http://127.0.0.1:8000'
access_key='0555b35654ad1656d804'
secret_key='h7GhxuBLTrlhVUyxSPUKUV8r/2EI4ngqJxD7iBdBYLhwluN30JaT3Q=='
There was a problem hiding this comment.
All of our tests uses these access key and secret key (which matches vstart ones)
Updated the workunit to use the standard vstart access/secret keys.
| s->bucket->get_attrs(), | ||
| s->bucket_acl, s->bucket->get_key(), y); | ||
| if (ret < 0) { | ||
| return ret; |
There was a problem hiding this comment.
it would be nice if we add a log before returning:
ldpp_dout(this, 0) << "failed to read bucket policy, err: " << cpp_strerror(r) << dendl;
There was a problem hiding this comment.
it would be nice if we add a log before returning
Added an ldpp_dout before returning when read_bucket_policy fails in rgw_build_bucket_policies (using dpp/ret to match the surrounding code).
|
ok to test |
Add per-bucket suspend and unsuspend via radosgw-admin without suspending the bucket owner. S3 and Swift requests against a suspended bucket fail with 403 BucketSuspended (distinct from UserSuspended). Expose the suspended field in bucket stats output. Propagate read_bucket_policy errors from rgw_build_bucket_policies so suspended buckets are rejected during permission setup rather than falling through to unrelated S3 errors. Includes admin documentation, release note, QA workunit, and unit tests. Signed-off-by: ramin.najarbashi <[email protected]>
Add RGWBucketInfo::bucket_suspended() helper and use it in the GET/policy and admin stats paths. Log read_bucket_policy failures in rgw_build_bucket_policies. Align QA workunit credentials with the standard vstart access key pair. Signed-off-by: ramin.najarbashi <[email protected]>
419d120 to
09a3e44
Compare
Include bucket suspend/unsuspend in the CLI help golden so run-cli-tests matches the new admin commands. Signed-off-by: ramin.najarbashi <[email protected]>
|
Updated Verified locally:
The |
|
jenkins test make check |
|
jenkins test make check arm64 |
|
This PR has been added to main integration testing by anuchaithra started 2026-08-11-06:41. |
pr testing completed and approved by @ivancich. @RaminNietzsche if no further testing is needed then this pr can be merged |
|
Backports opened for active targets (parent tracker https://tracker.ceph.com/issues/79540): |
Add per-bucket suspend and unsuspend via radosgw-admin without suspending the bucket owner. S3 and Swift requests against a suspended bucket fail with 403 BucketSuspended (distinct from UserSuspended). Expose the suspended field in bucket stats output.
Propagate read_bucket_policy errors from rgw_build_bucket_policies so suspended buckets are rejected during permission setup rather than falling through to unrelated S3 errors.
Includes admin documentation, release note, QA workunit, and unit tests.
Use cases
radosgw-admin bucket unsuspend.User-level suspend (
radosgw-admin user suspend) is unchanged: it still suspends all of that user's buckets and blocks all requests for that user.On multisite secondary zones,
bucket suspendandbucket unsuspendrequire--yes-i-really-mean-it, consistent with other metadata-changing admin commands.Testing
Unit tests
unittest_rgw_http_errors(local,build-local):Local vstart E2E smoke test
Manual smoke test against vstart RGW (
MON=1 OSD=1 RGW=1, memstore,--localhost, port 8000):radosgw-admin bucket stats→suspended: falseListObjects→ successradosgw-admin bucket suspend --bucket …→suspended: trueListObjects→403 BucketSuspendedradosgw-admin bucket unsuspend --bucket …→suspended: falseListObjects→ success; cleanupResult: PASS
QA / teuthology
Added
qa/workunits/rgw/test_rgw_bucket_suspend.py,run-bucket-suspend.sh, andqa/suites/rgw/verify/tasks/bucket-suspend.yaml. Not run locally via teuthology; will rely on CI afterok to test.Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.