From 61bc6f6a9566f7bee86a258c68aa3f1d24634c2a Mon Sep 17 00:00:00 2001 From: sageweil Date: Tue, 17 Jul 2007 20:49:55 +0000 Subject: [PATCH] mark osd down and then up again in separate epochs git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1518 29311d96-e01e-0410-9327-a35deaab8ce9 --- trunk/ceph/mon/OSDMonitor.cc | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/trunk/ceph/mon/OSDMonitor.cc b/trunk/ceph/mon/OSDMonitor.cc index 6004ac2d24b..6127297c279 100644 --- a/trunk/ceph/mon/OSDMonitor.cc +++ b/trunk/ceph/mon/OSDMonitor.cc @@ -517,23 +517,25 @@ bool OSDMonitor::prepare_boot(MOSDBoot *m) // already up? mark down first? if (osdmap.is_up(from)) { + dout(7) << "prepare_boot was up, first marking down " << osdmap.get_inst(from) << endl; assert(osdmap.get_inst(from) != m->inst); // preproces should have caught it // mark previous guy down pending_inc.new_down[from] = osdmap.osd_inst[from]; + + paxos->wait_for_commit(new C_RetryMessage(this, m)); + } else { + // mark new guy up. + down_pending_out.erase(from); // if any + pending_inc.new_up[from] = m->inst; + + // mark in? + if (osdmap.out_osds.count(from)) + pending_inc.new_in.push_back(from); + + // wait + paxos->wait_for_commit(new C_Booted(this, m)); } - - // mark new guy up. - down_pending_out.erase(from); // if any - pending_inc.new_up[from] = m->inst; - - // mark in? - if (osdmap.out_osds.count(from)) - pending_inc.new_in.push_back(from); - - // wait - paxos->wait_for_commit(new C_Booted(this, m)); - return true; }