]> 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>
Mon, 6 Oct 2025 05:14:58 +0000 (05:14 +0000)
This is necessary to allow for the creation of intermediate SLAB objects on systems configured with Ceph authentication.

Adds a minor change logging detailed info when failing to parse etag
Remove bogus assert
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..cbedcb0c7f54475ebdfc427f6b38a2b44e976882 100644 (file)
@@ -309,9 +309,15 @@ namespace rgw::dedup {
         f->dump_unsigned("non default storage class objs bytes",
                          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);
+      else {        
+        if (this->default_storage_class_objs != this->ingress_obj) {
+          f->dump_unsigned("Bad default storage class objs (should be identical to ingress_obj)",
+                           this->default_storage_class_objs);
+        }
+        if (this->default_storage_class_objs_bytes != this->ingress_obj_bytes) {
+          f->dump_unsigned("Bad default storage class objs bytes (should be identical to ingress_obj_bytes)",
+                           this->default_storage_class_objs_bytes);
+        }
       }
     }