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

rgw: admin api - add ability to sync user stats from admin api #17589

Merged

Conversation

nathanejohnson
Copy link
Contributor

@nathanejohnson nathanejohnson commented Sep 8, 2017

This adds the ability to trigger synchronizing user stats from the admin api.

http://tracker.ceph.com/issues/21301

@joscollin joscollin added the rgw label Sep 8, 2017
Copy link
Member

@joscollin joscollin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nathanejohnson Your commit is not signed-off. Please do it.

@joscollin
Copy link
Member

joscollin commented Sep 8, 2017

@nathanejohnson nathanejohnson force-pushed the feature/20883-adminapi_sync_stats_master branch from d38b24f to 11fbde7 Compare September 8, 2017 12:36
@nathanejohnson
Copy link
Contributor Author

@joscollin Sorry about that, I amended the commit message. Let me know if this is sufficient.

Thank you

Copy link
Member

@joscollin joscollin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes: http://tracker.ceph.com/issues/21301
Signed-off-by: Nathan Johnson <nathan@nathanjohnson.org>
@nathanejohnson nathanejohnson force-pushed the feature/20883-adminapi_sync_stats_master branch from 11fbde7 to 828412d Compare September 8, 2017 15:33
@nathanejohnson
Copy link
Contributor Author

@joscollin I have tagged my commit. By the way, with the tags do you differentiate between a bug fix versus a new feature with the tags, or do they all prefix with Fixes: ?

So regarding #5 in the guide, there is no documentation that I could find for the stats flag, but I would be happy to add it if you could point me in the right direction.

@joscollin
Copy link
Member

@nathanejohnson It appears now, sorry.

@nathanejohnson
Copy link
Contributor Author

@joscollin regarding documentation of the sync parameter, should I add that to this PR? I can document the stats flag as well, but would that be more appropriate in a separate PR?

Thanks

@joscollin
Copy link
Member

@nathanejohnson It would be appropriate in a separate PR, which mentions this PR.

@@ -47,8 +48,11 @@ void RGWOp_User_Info::execute()

RESTArgs::get_bool(s, "stats", false, &fetch_stats);

RESTArgs::get_bool(s, "sync", false, &sync_stats);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--sync-stats seems already exists in rgw_admin. So could you please clarify how do you use the command now ?

The tracker shows: $ radosgw-admin user stats --uid=<uid> --sync-stats

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you call this command without --sync-stats , the stats may be stale. I noticed this when running some of the integration tests on an admin api client library I wrote. i.e., I could copy a file to a bucket, but stats would return with all zeros. All this PR would do is expose that same functionality via the admin API.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. But I would request a review from @yehudasa too.

Copy link
Member

@yehudasa yehudasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@joscollin
Copy link
Member

@nathanejohnson What about the doc updates ? I think this PR will wait until the doc changes are completed.

@nathanejohnson
Copy link
Contributor Author

@joscollin I'll get to those asap

@mattbenjamin
Copy link
Contributor

@joscollin results look clean modulo known valgrind issues and apparently unrelated ovh issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants