From: runsisi Date: Sat, 5 Nov 2016 10:33:08 +0000 (+0800) Subject: mon/OSDMonitor: newly created osd should not be wrongly marked in X-Git-Tag: v11.1.0~354^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=118f081b3c64bc36a8b9825e3373587a334c672b;p=ceph.git 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 --- 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