Skip to content

Commit da6a9b2

Browse files
authored
Merge pull request ceph#58470 from mohit84/issue_66867
mon: Remove any pg_upmap_primary mapping during remove a pool Reviewed-by: Radoslaw Zarzynski <[email protected]> Reviewed-by: Laura Flores <[email protected]> Reviewed-by: Josh Salomon <[email protected]>
2 parents 78e6193 + ccb292c commit da6a9b2

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/mon/OSDMonitor.cc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14723,6 +14723,25 @@ int OSDMonitor::_prepare_remove_pool(
1472314723
}
1472414724
}
1472514725
}
14726+
// remove any old pg_upmap_primary mapping for this pool
14727+
for (auto& p : osdmap.pg_upmap_primaries) {
14728+
if (p.first.pool() == pool) {
14729+
dout(10) << __func__ << " " << pool
14730+
<< " removing obsolete pg_upmap_primaries " << p.first
14731+
<< dendl;
14732+
pending_inc.old_pg_upmap_primary.insert(p.first);
14733+
}
14734+
}
14735+
14736+
// remove any pending pg_upmap_primary mapping for this pool
14737+
for (auto& p : osdmap.pg_upmap_primaries) {
14738+
if (p.first.pool() == pool) {
14739+
dout(10) << __func__ << " " << pool
14740+
<< " removing pending pg_upmap_primaries " << p.first
14741+
<< dendl;
14742+
pending_inc.new_pg_upmap_primary.erase(p.first);
14743+
}
14744+
}
1472614745

1472714746
// remove any choose_args for this pool
1472814747
CrushWrapper newcrush = _get_pending_crush();

0 commit comments

Comments
 (0)