UMIACS / rgwadmin

Ceph Object Storage Admin API python library bindings.
https://rgwadmin.readthedocs.io/
GNU Lesser General Public License v2.1
85 stars 47 forks source link

Adding sync-stats ability to get_user #52

Closed ArpStorm1 closed 3 years ago

ArpStorm1 commented 3 years ago

Hey, I've noticed that sometimes, using only get_user with stats=True can return incorrect answer. After some digging I've noticed that it takes some time to the rgw to sync itself with the current usage of users, and even using radosgw-admin you need to add the --sync-stats flag to get correct answer for sure. Following this https://github.com/ceph/ceph/pull/17589, I've noticed there is a way to run this flag using radosgw API.

I think it can be really useful to add this ability to the get_user function.

dyarnell commented 3 years ago

Thanks, I have merged this code.