From 2673875f0cce4a6afa74c0a6b8473c9ab719f331 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 24 Apr 2012 15:45:58 -0700 Subject: [PATCH] mon: do not mark booting osds in if NOIN flag is set If the NOIN osdmap flag is set, do not mark booting osds in. Normally we would for a range of reasons (always, new, auto-marked-out), but block them all. Do not limit manual 'ceph osd in N' commands. Signed-off-by: Sage Weil --- src/mon/OSDMonitor.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 2c33f9223e540..688837c001cc7 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -662,7 +662,11 @@ bool OSDMonitor::prepare_boot(MOSDBoot *m) if ((g_conf->mon_osd_auto_mark_auto_out_in && (oldstate & CEPH_OSD_AUTOOUT)) || (g_conf->mon_osd_auto_mark_new_in && (oldstate & CEPH_OSD_NEW)) || (g_conf->mon_osd_auto_mark_in)) { - pending_inc.new_weight[from] = CEPH_OSD_IN; + if (osdmap.test_flag(CEPH_OSDMAP_NOIN)) { + dout(7) << "prepare_boot NOIN set, will not mark in " << m->get_orig_source_addr() << dendl; + } else { + pending_inc.new_weight[from] = CEPH_OSD_IN; + } } down_pending_out.erase(from); // if any -- 2.39.5