The ragodgw-admin bucket limit check command has a bug in
octopus. Since we do not clear the bucket list before
list_buckets() returns the next max_entries, they are appended
to the existing list and we end up counting the first ones again.
This bug is triggered if bucket count exceeds max_entries and
causes duplicates in the output of radosgw-admin bucket limit check.
The fix clears the buckets structure before the list_buckets()
populates it again with the next lot of buckets to iterate through.
partial manual cherry-pick of
99f7c4aa1286edfea6961b92bb44bb8fe22bd599
Signed-off-by: Nikhil Kshirsagar <nkshirsagar@gmail.com>
RGWUserBuckets ulist;
bool is_truncated = false;
int ret;
+ buckets.clear();
ret = store->ctl()->user->list_buckets(info.user_id, marker, end_marker, max,
need_stats, &ulist, &is_truncated);