]> 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>
Sun, 13 Aug 2017 19:00:23 +0000 (15:00 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 49c468b78849b09ad3db2f6028ebf588c6fd2ac3)

src/mon/OSDMonitor.cc

index 8558047a8c1a209ae0eee75c5876649c763835ff..7dcf3397c2ad85fab6a54df3c769bef9df673266 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;
 }