]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/Paxos: bootstrap peon too if monmap updates
authorSage Weil <sage@inktank.com>
Fri, 12 Jul 2013 21:27:04 +0000 (14:27 -0700)
committerSage Weil <sage@inktank.com>
Tue, 13 Aug 2013 22:05:17 +0000 (15:05 -0700)
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)

src/mon/Paxos.cc

index a6f9c3058d9ab42d59e356a320995ff2e5893864..6ba09dad8380eea1a9dc6d46d28633be27152ae9 100644 (file)
@@ -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);
 }