From db8ee3009eb2b382086cf556007c91cc3781f114 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 7 Aug 2017 18:26:09 -0400 Subject: [PATCH] mon/OSDMonitor: remove choose_args when pool is removed Signed-off-by: Sage Weil (cherry picked from commit 49c468b78849b09ad3db2f6028ebf588c6fd2ac3) --- src/mon/OSDMonitor.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 8558047a8c1a2..7dcf3397c2ad8 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; } -- 2.39.5