From: Sage Weil Date: Mon, 7 Aug 2017 22:26:09 +0000 (-0400) Subject: mon/OSDMonitor: remove choose_args when pool is removed X-Git-Tag: v13.0.0~109^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=49c468b78849b09ad3db2f6028ebf588c6fd2ac3;p=ceph.git mon/OSDMonitor: remove choose_args when pool is removed Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 2fef460806fc..febc5534efad 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -11366,6 +11366,16 @@ int OSDMonitor::_prepare_remove_pool( pending_inc.old_pg_upmap_items.insert(p.first); } } + + // remove any choose_args for this pool + CrushWrapper newcrush; + _get_pending_crush(newcrush); + if (newcrush.have_choose_args(pool)) { + dout(10) << __func__ << " removing choose_args for pool " << pool << dendl; + newcrush.rm_choose_args(pool); + pending_inc.crush.clear(); + newcrush.encode(pending_inc.crush, mon->get_quorum_con_features()); + } return 0; }