Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

chenji-kael
Copy link
Contributor

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

@mattbenjamin
Copy link
Contributor

@yehudasa prospectively do you see any issue with this?

@oritwas
Copy link
Member

oritwas commented Jun 8, 2016

@chenji-kael , can you open a tracker issue for this?

@chenji-kael
Copy link
Contributor Author

@oritwas
OK, FEATURE #16191 created

@oritwas
Copy link
Member

oritwas commented Jun 8, 2016

@chenji-kael , can you add it to commit message:
Fixes: url of the tracker issue

@chenji-kael chenji-kael force-pushed the usage branch 2 times, most recently from 5c85df8 to af3828e Compare June 8, 2016 09:44
@chenji-kael
Copy link
Contributor Author

@oritwas done

@@ -29,8 +29,6 @@ static const char *signed_subresources[] = {
"torrent",
"uploadId",
"uploads",
"start-date",
Copy link
Member

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?

Copy link
Contributor Author

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 oritwas self-assigned this Jun 9, 2016
@chenji-kael
Copy link
Contributor Author

@oritwas ok

@chenji-kael
Copy link
Contributor Author

@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) {
Copy link
Member

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

@yehudasa
Copy link
Member

@theanalyst @oritwas is this one ready?

@oritwas
Copy link
Member

oritwas commented Jul 22, 2016

it looks like the comments were not fixed.

@oritwas
Copy link
Member

oritwas commented Jul 22, 2016

also it will be good to join #9495 with this pull request

@chenji-kael
Copy link
Contributor Author

@oritwas @yehudasa
in fact, I do not know how to treat this PR now due to #9495. and most comments here have been fixed except using some C++ 11 feature

@yehudasa
Copy link
Member

yehudasa commented Oct 5, 2016

@oritwas @theanalyst @chenji-kael what is the status of this PR?

@oritwas
Copy link
Member

oritwas commented Oct 18, 2016

@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>
@chenji-kael
Copy link
Contributor Author

@oritwas rebase done

@yehudasa
Copy link
Member

yehudasa commented Nov 7, 2016

@oritwas ping

@cbodley
Copy link
Contributor

cbodley commented Nov 15, 2016

compression support was added to radosgw recently, and struct rgw_bucket_category_stats now includes an actual_size field that represents the compressed size in rados. we might consider exposing that information also

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));
Copy link
Contributor

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

@oritwas
Copy link
Member

oritwas commented Nov 17, 2016

jenkins test this please

@ghost
Copy link

ghost commented Nov 17, 2016

jenkins test this please (asok)

@liewegas liewegas changed the title [rgw]get usage rest api now return capacity used by each bucket rgw: get usage rest api now return capacity used by each bucket Mar 28, 2017
@liewegas
Copy link
Member

@oritwas what should we do with this pr?

@oritwas
Copy link
Member

oritwas commented Mar 29, 2017

The changes needed are small.
I will create a new pr based on this one and add the needed changes.

@oritwas oritwas changed the title rgw: get usage rest api now return capacity used by each bucket DNM: rgw: get usage rest api now return capacity used by each bucket Mar 29, 2017
@oritwas
Copy link
Member

oritwas commented Apr 2, 2017

opened #14287 with the fixes

@oritwas oritwas closed this Apr 2, 2017
@oritwas oritwas mentioned this pull request Apr 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants