Repository navigation
rgw: Implement Admin REST APIs for Setting Account Quota - #65480
Conversation
| :Example: ``RGW00000000000000001`` | ||
| :Required: Yes | ||
|
|
||
| An account ID must be 20 bytes long. |
There was a problem hiding this comment.
Do we maybe want to say 20 characters? Mention the set of acceptable chars? Alphanumerics? 7 bit ASCII? 8 bit? Unicode? Little Bobby Tables?
|
|
||
| :Description: Specifies the maximum number of buckets the account can own. | ||
| :Type: Integer | ||
| :Example: 500 [1000] |
There was a problem hiding this comment.
Here and above, are the numbers in brackets defaults? If so would be good to state so.
| =========== | ||
| .. versionadded:: Squid | ||
|
|
||
| Get account info. Either an "id" or a "name" needs to be provided. |
|
|
||
| ``account-id`` | ||
|
|
||
| :Description: the Account under which a user should exist. |
There was a problem hiding this comment.
Most instances of “account” above are lowercase. I can see a rationale either way but suggest consistency throughout the page.
bluikko
left a comment
There was a problem hiding this comment.
These are quite minor, feel free to ignore them if you are busy and I'll file a PR for them later.
| Create Account | ||
| =========== |
There was a problem hiding this comment.
Sphinx will complain if the section title text is longer than the line below it.
| Create Account | |
| =========== | |
| Create Account | |
| ============== |
|
|
||
|
|
||
| Modify Account | ||
| =========== |
There was a problem hiding this comment.
Ditto
| =========== | |
| ============== |
| =========== | ||
| .. versionadded:: Squid | ||
|
|
||
| Modify a account. Either an "id", "name", or "email" needs to be provided. |
There was a problem hiding this comment.
The parameter names in text seem to be usually formatted as inline preformat.
Also article "an account" and I believe the list should either include all articles or none.
| Modify a account. Either an "id", "name", or "email" needs to be provided. | |
| Modify an account. Either ``id``, ``name``, or ``email`` needs to be provided. |
|
|
||
| ``id`` | ||
|
|
||
| :Description: The account id. |
There was a problem hiding this comment.
"ID" is capitalized elsewhere so for consistency I'd suggest to do so here also.
| :Description: The account id. | |
| :Description: The account ID. |
| =========== | ||
| .. versionadded:: Squid | ||
|
|
||
| Get account info. Either an "id" or a "name" needs to be provided. |
There was a problem hiding this comment.
Ditto for inline preformat.
| Get account info. Either an "id" or a "name" needs to be provided. | |
| Get account info. Either an ``id`` or a ``name`` needs to be provided. |
|
|
||
| ``id`` | ||
|
|
||
| :Description: The account id. |
There was a problem hiding this comment.
Ditto
| :Description: The account id. | |
| :Description: The account ID. |
| None. | ||
|
|
||
| Remove Account | ||
| =========== |
There was a problem hiding this comment.
Ditto
| =========== | |
| ============== |
| =========== | ||
| .. versionadded:: Squid | ||
|
|
||
| Remove an existing account. Either an "id", "name", or "email" needs to be provided. |
There was a problem hiding this comment.
Ditto
| Remove an existing account. Either an "id", "name", or "email" needs to be provided. | |
| Remove an existing account. Either ``id``, ``name``, or ``email`` needs to be provided. |
| @@ -2068,6 +2768,22 @@ The content must include a JSON representation of the quota settings | |||
| as mentioned in Set Bucket Quota section above. | |||
|
|
|||
|
|
|||
| Set Account Quota | |||
| ~~~~~~~~~~~~~~ | |||
There was a problem hiding this comment.
Ditto
| ~~~~~~~~~~~~~~ | |
| ~~~~~~~~~~~~~~~~~ |
| Set Bucket Quota under an Account | ||
| ~~~~~~~~~~~~~~~~ |
There was a problem hiding this comment.
Ditto
| Set Bucket Quota under an Account | |
| ~~~~~~~~~~~~~~~~ | |
| Set Bucket Quota under an Account | |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
cbodley
left a comment
There was a problem hiding this comment.
the changes in rgw_rest_account.cc look wonderful 👍
and thank you for working on test coverage. however, i had no idea that test_rgw_admin_meta.cc existed and it doesn't run as part of rgw's qa suite in teuthology
qa/tasks/radosgw_admin_rest.py contains the /admin api tests that we do run. however, it's coupled to teuthology in a way that makes it hard to run locally against a vstart cluster
please add the missing brackets around your email addr: |
252a05c to
752d235
Compare
|
@cbodley @anthonyeleven @bluikko Thank you for reviewing! I have made the requested changes. It seems Is there a way to rerun it? |
|
jenkins test windows |
bluikko
left a comment
There was a problem hiding this comment.
docs part from my side OK
|
Expand "Show available Jenkins commands". You can add a comment with one of these commands and Jenkins in theory will rerun that test.
|
|
@cbodley @anthonyeleven Thanks again. Does the PR look good to you? |
@nzliu-dev as above, i'm afraid we'll need the test coverage in qa/tasks/radosgw_admin_rest.py instead of test_rgw_admin_meta.cc |
|
I see several of the changes I suggested, but the question about the bracketed number remains. |
Thanks--not sure why it's not reflected in the comment itself but I have already updated the documentation to explain the bracketed numbers wherever they appear. e.g. "Specifies the maximum number of buckets the account can own. The default is 1000." |
| delete_cmds = ['trim', 'rm', 'process'] | ||
| get_cmds = ['check', 'info', 'show', 'list', 'get', ''] | ||
|
|
||
| bucket_sub_resources = ['object', 'policy', 'index'] | ||
| user_sub_resources = ['subuser', 'key', 'caps', 'quota'] |
There was a problem hiding this comment.
because the subresource names are not unique, i.e. user/quota and account/quota are both valid, this way of doing a 1:1 mapping of sub_resource to a resource is problematic. It's better to pass both the resource and the subresource as a tuple into the command, e.g. ('user', 'quota')
2d2b157 to
2b133a1
Compare
|
@cbodley Thanks for clarifying. I have added tests in the rgwadmin_rest file for QA/Teuthology. Please take another look when you get a chance. |
2b133a1 to
5eae196
Compare
|
jenkins test api |
|
jenkins test windows |
5eae196 to
71071e8
Compare
71071e8 to
69e177d
Compare
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
This commit implements the functionality of setting bucket- and account-level quotas with PUT /admin/account tracker: https://tracker.ceph.com/issues/72527 Signed-off-by: Nicholas Liu <[email protected]>
This commit refactors the test_rgw_admin_meta test by using common helper functions Signed-off-by: Nicholas Liu <[email protected]>
This commit adds documentation on how to create, get, modify, and delete accounts using Admin APIs. It also explains how to set quota for an account and how to create a user under an account Signed-off-by: Nicholas Liu <[email protected]>
This commit addresses PR comments related to the doc/radosgw/adminops documentation Signed-off-by: Nicholas Liu <[email protected]>
This commit implements tests related to setting account quotas at the account and bucket levels for qa and Teuthology tracker: https://tracker.ceph.com/issues/72527 Signed-off-by: Nicholas Liu <[email protected]>
69e177d to
187573e
Compare
|
the rgw/singleton jobs are failing on the radosgw-admin task due to https://tracker.ceph.com/issues/73355, which prevents the new radosgw-admin-rest tests from running |
tracker: https://tracker.ceph.com/issues/72527
Signed-off-by: Nicholas Liu [email protected]
Checklist
To test, I used vstart to start a local cluster and ran the ceph_test_cls_rgw_admin_account_quota_set and the ceph_test_cls_rgw_meta tests with GTEST set to 1.
bin/ceph_test_cls_rgw_admin_account_quota_set -g 127.0.0.1 -p 8000 -c ceph.conf -rgw-admin /build/bin/radosgw-admin:
bin/ceph_test_cls_rgw_meta -g 127.0.0.1 -p 8000 -c ceph.conf -rgw-admin /build/bin/radosgw-admin:
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 Definition