From: Sage Weil Date: Thu, 10 Apr 2014 20:34:58 +0000 (-0700) Subject: mon/OSDMonitor: ignore boot message from before last up_from X-Git-Tag: v0.80-rc1~65^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1643%2Fhead;p=ceph.git mon/OSDMonitor: ignore boot message from before last up_from 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 --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 4de2b423a3844..ae00fbc7ad679 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -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;