mirror of
https://github.com/ceph/ceph
synced 2025-02-24 03:27:10 +00:00
Merge pull request #20846 from theanalyst/rgw/fix-empty-stats
rgw: radosgw-admin abort early for user stats for empty uids Reviewed-by: Orit Wasserman <owasserm@redhat.com>
This commit is contained in:
commit
f97159c31d
@ -6149,6 +6149,11 @@ next:
|
||||
}
|
||||
|
||||
if (opt_cmd == OPT_USER_STATS) {
|
||||
if (user_id.empty()) {
|
||||
cerr << "ERROR: uid not specified" << std::endl;
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
if (sync_stats) {
|
||||
if (!bucket_name.empty()) {
|
||||
int ret = rgw_bucket_sync_user_stats(store, tenant, bucket_name);
|
||||
@ -6165,10 +6170,6 @@ next:
|
||||
}
|
||||
}
|
||||
|
||||
if (user_id.empty()) {
|
||||
cerr << "ERROR: uid not specified" << std::endl;
|
||||
return EINVAL;
|
||||
}
|
||||
cls_user_header header;
|
||||
string user_str = user_id.to_str();
|
||||
int ret = store->cls_user_get_header(user_str, &header);
|
||||
|
Loading…
Reference in New Issue
Block a user