]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: prevent osd from booting if NOUP
authorSage Weil <sage@newdream.net>
Tue, 24 Apr 2012 21:16:42 +0000 (14:16 -0700)
committerSage Weil <sage@newdream.net>
Tue, 24 Apr 2012 21:16:42 +0000 (14:16 -0700)
Do not add an osd attempting to boot to the map if NOUP is sent.  Instead,
send it the latest osdmap so it knows that it's not allowed to boot.

Signed-off-by: Sage Weil <sage@newdream.net>
src/mon/OSDMonitor.cc

index f036bfaab33a226755c34faa2e1c20b6b3509aa0..dbc4e92fd98cd07f4b61022e5b2fb7858332cec7 100644 (file)
@@ -594,6 +594,13 @@ bool OSDMonitor::preprocess_boot(MOSDBoot *m)
     return true;
   }
 
+  // noup?
+  if (osdmap.test_flag(CEPH_OSDMAP_NOUP)) {
+    dout(7) << "preprocess_boot NOUP set, informing " << m->get_orig_source_inst() << dendl;
+    send_latest(m, m->sb.current_epoch+1);
+    return true;
+  }
+
   dout(10) << "preprocess_boot from " << m->get_orig_source_inst() << dendl;
   return false;