]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: check the new crush map against osdmap.max_osd
authorKefu Chai <kchai@redhat.com>
Tue, 26 May 2015 08:58:23 +0000 (16:58 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 10 Jul 2015 07:40:01 +0000 (15:40 +0800)
Fixes: #11680
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 22e6bd6e01d5df3f3e897562597e22ca1737f8c8)

src/mon/OSDMonitor.cc

index c8a2e6b175971bbf814d26d9df54dad90c8c1b06..5ca2a9b182258538692da85e80320ba1dde8c6bb 100644 (file)
@@ -4530,7 +4530,7 @@ bool OSDMonitor::prepare_command_impl(MMonCommand *m,
     // then we would consistently trigger an election before the command
     // finishes, having a flapping monitor unable to hold quorum.
     CrushTester tester(crush, ess);
-    if (!tester.check_name_maps()) {
+    if (!tester.check_name_maps(osdmap.get_max_osd())) {
       err = -EINVAL;
       ss << ess.str();
       goto reply;