RGW bucket deletion via cls_user_remove_bucket was failing on Crimson
because cls_cxx_map_remove_key() encoded a std::vector<string> while
PGBackend::omap_remove_key() expected and decoded a std::set<string>
using decode_str_set_to_bl(). This mismatch caused OMAP keys to not be
removed, leaving stale bucket entries that broke test_list_buckets_*.
Fix by encoding std::set<std::string> in cls_cxx_map_remove_key() to
match the backend's decode_str_set_to_bl() expectation, aligning with
classic OSD behavior.
This fixes: s3 test_list_buckets_* tests on Crimson
Signed-off-by: Kautilya Tripathi <kautilya.tripathi@ibm.com>
int cls_cxx_map_remove_key(cls_method_context_t hctx, const string &key)
{
OSDOp op{CEPH_OSD_OP_OMAPRMKEYS};
- std::vector<string> to_rm{key};
+ std::set<std::string> to_rm;
+ to_rm.insert(key);
encode(to_rm, op.indata);
return execute_osd_op(hctx, op);
}