From efe5b67bb700ef6218d9579abf43cc9ecf25ef52 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 12 Jul 2013 14:27:04 -0700 Subject: [PATCH] mon/Paxos: bootstrap peon too if monmap updates If we get a monmap update, the leader bootstraps. Peons should do the same. Signed-off-by: Sage Weil Reviewed-by: Greg Farnum --- src/mon/Paxos.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc index 7779360ca33e2..d988c6415476a 100644 --- a/src/mon/Paxos.cc +++ b/src/mon/Paxos.cc @@ -715,7 +715,13 @@ void Paxos::handle_commit(MMonPaxos *commit) commit->put(); - mon->refresh_from_paxos(NULL); + bool need_bootstrap = false; + mon->refresh_from_paxos(&need_bootstrap); + if (need_bootstrap) { + dout(10) << " doing requested bootstrap" << dendl; + mon->bootstrap(); + return; + } finish_contexts(g_ceph_context, waiting_for_commit); } -- 2.39.5