]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: clear buckets before calling list_buckets() 43381/head
authorNikhil Kshirsagar <nkshirsagar@gmail.com>
Fri, 1 Oct 2021 04:49:00 +0000 (10:19 +0530)
committerNikhil Kshirsagar <nkshirsagar@gmail.com>
Thu, 14 Oct 2021 17:03:07 +0000 (22:33 +0530)
commit0de02a88be0972c89ed2bb10dc438d080137bd18
tree6a17193f1cfe3ab1641fb0a7fdf29f3219eb396d
parent5cf037b543c1ce56dd30971edda32e1c42e42a55
rgw: clear buckets before calling list_buckets()

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>
src/rgw/rgw_sal.cc