From a984ad83e7dfc37d968ba95b7b95c629b8f16670 Mon Sep 17 00:00:00 2001 From: Gabriel BenHanokh Date: Sun, 5 Oct 2025 08:29:53 +0000 Subject: [PATCH] rgw/dedup: Grant dedup process full RGW permissions. This is necessary to allow for the creation of intermediate SLAB objects on systems configured with Ceph authentication. Remove bogus assert Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2401399 Signed-off-by: Gabriel BenHanokh --- src/rgw/driver/rados/rgw_dedup.cc | 17 +++++++++-------- src/rgw/driver/rados/rgw_dedup_utils.cc | 10 ++++++++-- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/rgw/driver/rados/rgw_dedup.cc b/src/rgw/driver/rados/rgw_dedup.cc index 7c00ddf6f2a..cf2075c1a75 100644 --- a/src/rgw/driver/rados/rgw_dedup.cc +++ b/src/rgw/driver/rados/rgw_dedup.cc @@ -344,7 +344,7 @@ namespace rgw::dedup { return ret; } - ret = ioctx.application_enable("rgw_dedup", false); + ret = ioctx.application_enable("rgw", false); if (ret == 0) { ldpp_dout(dpp, 10) << __func__ << "::pool " << dedup_pool.name << " was associated with dedup app" << dendl; @@ -1499,16 +1499,11 @@ namespace rgw::dedup { const rgw_bucket_dir_entry &entry, worker_stats_t *p_worker_stats /*IN-OUT*/) { - // ceph store full blocks so need to round up and multiply by block_size - uint64_t ondisk_byte_size = calc_on_disk_byte_size(entry.meta.size); - // count all objects including too small and non default storage_class objs - p_worker_stats->ingress_obj++; - p_worker_stats->ingress_obj_bytes += ondisk_byte_size; - parsed_etag_t parsed_etag; if (unlikely(!parse_etag_string(entry.meta.etag, &parsed_etag))) { p_worker_stats->ingress_corrupted_etag++; - ldpp_dout(dpp, 1) << __func__ << "::ERROR: corrupted etag" << dendl; + ldpp_dout(dpp, 1) << __func__ << "::ERROR: corrupted etag:" << entry.meta.etag + << "::" << p_bucket->get_name() << "/" << entry.key.name << dendl; return -EINVAL; } @@ -1516,6 +1511,12 @@ namespace rgw::dedup { show_ingress_bucket_idx_obj(dpp, parsed_etag, p_bucket->get_name(), entry.key.name); } + // ceph store full blocks so need to round up and multiply by block_size + uint64_t ondisk_byte_size = calc_on_disk_byte_size(entry.meta.size); + // count all objects including too small and non default storage_class objs + p_worker_stats->ingress_obj++; + p_worker_stats->ingress_obj_bytes += ondisk_byte_size; + // We limit dedup to objects from the same storage_class // TBD: // Should we use a skip-list of storage_classes we should skip (like glacier) ? diff --git a/src/rgw/driver/rados/rgw_dedup_utils.cc b/src/rgw/driver/rados/rgw_dedup_utils.cc index baadee5aeef..a89538a8ff6 100644 --- a/src/rgw/driver/rados/rgw_dedup_utils.cc +++ b/src/rgw/driver/rados/rgw_dedup_utils.cc @@ -310,8 +310,14 @@ namespace rgw::dedup { this->non_default_storage_class_objs_bytes); } else { - ceph_assert(this->default_storage_class_objs == this->ingress_obj); - ceph_assert(this->default_storage_class_objs_bytes == this->ingress_obj_bytes); + if (this->default_storage_class_objs != this->ingress_obj) { + f->dump_unsigned("default storage class objs", + this->default_storage_class_objs); + } + if (this->default_storage_class_objs_bytes != this->ingress_obj_bytes) { + f->dump_unsigned("default storage class objs bytes", + this->default_storage_class_objs_bytes); + } } } -- 2.39.5