]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mon: Optimized EC pools preprocess_pgtemp incorrectly rejecting pgtemp as nop
authorBill Scales <bill_scales@uk.ibm.com>
Mon, 7 Jul 2025 20:13:59 +0000 (21:13 +0100)
committerAlex Ainscow <aainscow@uk.ibm.com>
Fri, 25 Jul 2025 07:43:09 +0000 (08:43 +0100)
Optimized EC pools store pgtemp with primary shards first, this was not
being taken into account by OSDMonitor::preprocess_pgtemp which meant
that the change of pgtemp from [None,2,4] to [None,4,2] for a 2+1 pool
was being rejected as a nop because the primary first encoded version
of [None,2,4] is [None,4,2].

Signed-off-by: Bill Scales <bill_scales@uk.ibm.com>
src/mon/OSDMonitor.cc

index bd7f60594b3124a1d7a81cb3133a317fda692c7c..97c632cd7e971ff29cf648153512e26513673250 100644 (file)
@@ -4142,9 +4142,11 @@ bool OSDMonitor::preprocess_pgtemp(MonOpRequestRef op)
     // change?
     //  NOTE: we assume that this will clear pg_primary, so consider
     //        an existing pg_primary field to imply a change
+    std::vector<int> acting_set;
+    osdmap.pg_to_acting_osds(p->first, acting_set);
     if (p->second.size() &&
        (osdmap.pg_temp->count(p->first) == 0 ||
-        osdmap.pg_temp->get(p->first) != p->second ||
+        acting_set != p->second ||
         osdmap.primary_temp->count(p->first)))
       return false;
   }