Bug #5228
closedradosgw-admin bucket list no longer shows all buckets
0%
Description
It can still list the buckets owned by a specific user when --uid is specified.
The bug was introduced by the following commit,
https://github.com/ceph/ceph/commit/dd19d693e6528c70167958ebc57e075200a08803
The actual bug is that RGWBucketAdminOpState::is_user_op() will always return true because user_id is initialized with RGW_USER_ANON_ID which is the string "anonymous" and as a result RGWBucketAdminOp::info will only traverse the code path where the buckets of a specific user are shown, and the list is empty because anonymous happens to own no buckets.
Specifying --uid="" doesn't help since the set_user_id() setter will not set to a new value if it is empty so there is no way to actually get statistics for a particular bucket or the list of all buckets anymore.
The same is_user_op() function is also used to RGWBucket::link and ::unlink to check if a user was specified. I guess as a result it will probably try to link a bucket to the anonymous user if --uid was not specified, but I didn't actually try this.