]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: remove choose_args when pool is removed
authorSage Weil <sage@redhat.com>
Mon, 7 Aug 2017 22:26:09 +0000 (18:26 -0400)
committerSage Weil <sage@redhat.com>
Fri, 11 Aug 2017 13:40:11 +0000 (09:40 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/OSDMonitor.cc

index 2fef460806fc5caff04038cfadf69a1034d8d8e0..febc5534efadbb10f9bfae59846b79dd837a0979 100644 (file)
@@ -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;
 }