s3gw
s3gw copied to clipboard
rgw/sfs: implement user stats rest call
Stats information can be retrieved via /admin/user?uid=xxxxx&stats=true
rest call.
In sfs
this call is not implemented; currently the call returns an empty response:
'stats': {'size': 0, 'size_actual': 0, 'size_utilized': 0, 'size_kb': 0, 'size_kb_actual': 0, 'size_kb_utilized': 0, 'num_objects': 0}
While this kind of information is logically bound with a bucket instance, we should investigate what approach we want to implement. Some options:
- we want this information to be always in sync with the stored data
- we want to allow a certain grade of dis-alignment with the stored data
- sync / async information update ?
- storing information in the bucket row (periodic update) ?
This issue is related to #75.
@votdev @jecluis have you an opinion when the activity on this issue should start? user stats could be something important to have in the context of the LH integration.
/admin/user?uid=xxxxx&stats=true is the RGW specifc Admin API (https://docs.ceph.com/en/latest/radosgw/adminops/)
I think we should rather focus on S3. There are stats requests there as well. For example https://docs.ceph.com/en/latest/radosgw/s3/serviceops/#get-usage-stats
Both admin api and S3 end up calling SFSUser::read_stats
@votdev @jecluis have you an opinion when the activity on this issue should start? user stats could be something important to have in the context of the LH integration.
IMO we need to maintain and enhance the current UI as long as LH integration has been done. So i vote to have the ability to request stats and display them in the UI.
Related to #143 and blocking #145 - aiming for v0.23.0.