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
DNM: rgw: get usage rest api now return capacity used by each bucket #8043
Conversation
@yehudasa prospectively do you see any issue with this? |
@chenji-kael , can you open a tracker issue for this? |
@chenji-kael , can you add it to commit message: |
5c85df8
to
af3828e
Compare
@oritwas done |
@@ -29,8 +29,6 @@ static const char *signed_subresources[] = { | |||
"torrent", | |||
"uploadId", | |||
"uploads", | |||
"start-date", |
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.
I think you remove those by mistake?
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.
@oritwas
no , start-date and end-date is only parameters, should not be treated as sub-resource , I introduced this mistake at last commit, so I think it need wipe out.
In fact I think usage should really be put here, what`s your opinion?
@oritwas ok |
@oritwas I have update this pr, please check it |
bucket.convert(&entry.bucket); | ||
|
||
map<string, struct rgw_bucket_dir_header>::iterator hiter = headers.begin(); | ||
for (; hiter != headers.end(); ++hiter) { |
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.
can we use C++11 syle auto for the for loops here
498504f
to
4c5d177
Compare
@theanalyst @oritwas is this one ready? |
it looks like the comments were not fixed. |
also it will be good to join #9495 with this pull request |
@oritwas @theanalyst @chenji-kael what is the status of this PR? |
@chenji-kael, please rebase |
Fixes:tracker.ceph.com/issues/16191 Signed-off-by: Ji Chen <insomnia@139.com>
Fixes:tracker.ceph.com/issues/16191 Signed-off-by: Ji Chen <insomnia@139.com>
@oritwas rebase done |
@oritwas ping |
compression support was added to radosgw recently, and |
ldout(cct, 0) << "ERROR: could not get bucket stats: ret=" << ret << dendl; | ||
return ret; | ||
} | ||
buckets_usage_map.insert(pair<string, cls_user_bucket_entry>(bucket_ent.bucket.name, entry)); |
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.
buckets_usage_map.emplace(bucket_ent.bucket.name, entry);
should work here
jenkins test this please |
jenkins test this please (asok) |
@oritwas what should we do with this pr? |
The changes needed are small. |
opened #14287 with the fixes |
It`s very useful to let users know how much capacity
they have used in each bucket, Venders also need this
function to charge fee by per bucket
Signed-off-by: Ji Chen insomnia@139.com