From: Bill Scales Date: Mon, 7 Jul 2025 20:13:59 +0000 (+0100) Subject: mon: Optimized EC pools preprocess_pgtemp incorrectly rejecting pgtemp as nop X-Git-Tag: v20.1.1~18^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=90fedb6cbc9d163ae96e4e7fe0a9030cd7e9cb84;p=ceph.git mon: Optimized EC pools preprocess_pgtemp incorrectly rejecting pgtemp as nop 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 (cherry picked from commit 00aa1933d3457c377d9483072e663442a4ff8ffd) --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 4cb7b21f3b82..b7698ef25402 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -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 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; }