From 118f081b3c64bc36a8b9825e3373587a334c672b Mon Sep 17 00:00:00 2001 From: runsisi Date: Sat, 5 Nov 2016 18:33:08 +0800 Subject: [PATCH] mon/OSDMonitor: newly created osd should not be wrongly marked in if we are creating an osd which has the same id as a previously removed 'in' osd, we should not mark this newly created osd as 'in' Signed-off-by: runsisi --- src/mon/OSDMonitor.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 972a60cf2529..ac361f6003ad 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -6933,8 +6933,10 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, if (!osdmap.exists(i) && pending_inc.new_up_client.count(i) == 0 && (pending_inc.new_state.count(i) == 0 || - (pending_inc.new_state[i] & CEPH_OSD_EXISTS) == 0)) + (pending_inc.new_state[i] & CEPH_OSD_EXISTS) == 0)) { + pending_inc.new_weight[i] = CEPH_OSD_OUT; goto done; + } } // raise max_osd -- 2.47.3