summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-07-12 14:27:04 -0700
committerSage Weil <sage@inktank.com>2013-08-13 15:05:17 -0700
commit32631685199f2e47c2ba0ed27d16eff80fa6917d (patch)
tree53ca7b869680fb05fe81dae838257373341c7551
parent1ea6b56170fc9e223e7c30635db02fa2ad8f4b4e (diff)
downloadceph-32631685199f2e47c2ba0ed27d16eff80fa6917d.tar.gz
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 <sage@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com> (cherry picked from commit efe5b67bb700ef6218d9579abf43cc9ecf25ef52)
-rw-r--r--src/mon/Paxos.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc
index a6f9c3058d9..6ba09dad838 100644
--- a/src/mon/Paxos.cc
+++ b/src/mon/Paxos.cc
@@ -750,7 +750,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);
}