]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: do not mark booting osds in if NOIN flag is set
authorSage Weil <sage@newdream.net>
Tue, 24 Apr 2012 22:45:58 +0000 (15:45 -0700)
committerSage Weil <sage@newdream.net>
Tue, 24 Apr 2012 22:47:40 +0000 (15:47 -0700)
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 <sage@newdream.net>
src/mon/OSDMonitor.cc

index 2c33f9223e5406b17c21730a14d8190733eadf0d..688837c001cc7eb7e60ca2e187585d0fe80685cb 100644 (file)
@@ -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