New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rgw: Admin API Support for bucket quota change #18324
Conversation
Here are the examples of API calls
|
@yuriw Could you take a look at this PR? |
10 similar comments
} | ||
|
||
bucket_info.quota = op_state.quota; | ||
r = store->put_bucket_instance_info(bucket_info, false, real_time(), &attrs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adamemerson do you think this would be a good candidate for retry_raced_bucket_write()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comment. I will take a look
d6bd7dd
to
b88c6b1
Compare
@Jeegn-Chen i like the int retry_raced_bucket_write(RGWRados* g, RGWBucketInfo& info,
std::map<std::string, bufferlist> *pattrs, const F& f) i'd also like to find a way to share more of this quota admin code between the rest api and the |
src/rgw/rgw_op.h
Outdated
} | ||
return r; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this helper is specific to buckets, i think rgw_bucket.h
is a better home for it. also, since it's being moved into a header file, it shouldn't be wrapped in an anonymous namespace - so either remove that, or use namespace rgw
instead
p.s. the PS comment isn't necessary! the git history is enough of a paper trail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cbodley
So maybe it is better for me to remove the commit 'rgw: Leverage retry_raced_bucket_write when updating quota' from this PR and let's address retry_raced_bucket_write signature improvement in an independent PR for better commit isolation. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works for me 👍
7e7adcf
to
b88c6b1
Compare
Per discuss with @cbodley, remove the commit related to retry_raced_bucket_write, which is out of the scope of this PR and will be addressed in a separate one. |
ready for merge |
@Jeegn-Chen would you be willing to add a bit of documentation to |
@cbodley Sure |
Allow admin to change the quota of a individual bucket through Admin API Fixes: http://tracker.ceph.com/issues/21811 Signed-off-by: Jeegn Chen <jeegnchen@gmail.com>
Allow admin to change the quota of a individual bucket through Admin API with params in URL Fixes: http://tracker.ceph.com/issues/21811 Signed-off-by: Jeegn Chen <jeegnchen@gmail.com>
b88c6b1
to
df5e25d
Compare
@cbodley I've just updated adminops.rst |
thanks @Jeegn-Chen! the docs build has a minor complaint:
|
Add usage doc for a new Admin API for individual bucket quota management Fixes: http://tracker.ceph.com/issues/21811 Signed-off-by: Jeegn Chen <jeegnchen@gmail.com>
df5e25d
to
0cbd26e
Compare
@cbodley Sorry for not double checking the doc build. The issue should be fixed now. |
It's weird that:
|
Allow admin to change the quota of a individual bucket through Admin API
Fixes: http://tracker.ceph.com/issues/21811
Signed-off-by: Jeegn Chen jeegnchen@gmail.com