]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/osd: fix omap key removal encoding mismatch wip-kautilya-crimson-rgw-sts
authorKautilya Tripathi <kautilya.tripathi@ibm.com>
Mon, 16 Feb 2026 07:23:37 +0000 (12:53 +0530)
committerKautilya Tripathi <kautilya.tripathi@ibm.com>
Mon, 23 Feb 2026 04:57:00 +0000 (10:27 +0530)
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>
src/crimson/osd/objclass.cc

index 88cd9822d0e1e8ebca363320b49bc63368b06650..c3b9a67ac937fcaddcd6411dff4f3ee0704b922c 100644 (file)
@@ -436,7 +436,8 @@ int cls_cxx_map_remove_range(cls_method_context_t hctx,
 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);
 }