]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw/dedup: Grant dedup process full RGW permissions.
authorGabriel BenHanokh <gbenhano@redhat.com>
Sun, 5 Oct 2025 08:29:53 +0000 (08:29 +0000)
committerGabriel BenHanokh <gbenhano@redhat.com>
Wed, 8 Oct 2025 12:11:28 +0000 (12:11 +0000)
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 <gbenhano@redhat.com>
src/rgw/driver/rados/rgw_dedup.cc
src/rgw/driver/rados/rgw_dedup_utils.cc

index 7c00ddf6f2a737013cdf72c8e3f14697a059cb8d..cf2075c1a75810368299102d267488973d05f25f 100644 (file)
@@ -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) ?
index baadee5aeef5437133fe6214983b789c197fbe36..a89538a8ff694d5738f538487a00b6011234770f 100644 (file)
@@ -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);
+        }
       }
     }