]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: ignore boot message from before last up_from 1643/head
authorSage Weil <sage@inktank.com>
Thu, 10 Apr 2014 20:34:58 +0000 (13:34 -0700)
committerSage Weil <sage@inktank.com>
Thu, 10 Apr 2014 20:34:58 +0000 (13:34 -0700)
It is possible we will have a dup OSDBoot message queued up in the mon
and will process it again after that osd was marked up and then down.  If
that happens, we should ignore this message, not mark the osd back in with
the same address.

Fixes: #8062
Signed-off-by: Sage Weil <sage@inktank.com>
src/mon/OSDMonitor.cc

index 4de2b423a3844a31b1c73f45b583affcd73c3eff..ae00fbc7ad679f32e120df3b19f1f28829411a4b 100644 (file)
@@ -1207,6 +1207,12 @@ bool OSDMonitor::preprocess_boot(MOSDBoot *m)
     goto ignore;
   }
 
+  if (osdmap.exists(from) &&
+      osdmap.get_info(from).up_from > m->boot_epoch) {
+    dout(7) << "prepare_boot msg from before last up_from, ignoring" << dendl;
+    goto ignore;
+  }
+
   // noup?
   if (!can_mark_up(from)) {
     dout(7) << "preprocess_boot ignoring boot from " << m->get_orig_source_inst() << dendl;