]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: use current monmap for initial quorum
authorSage Weil <sage@inktank.com>
Thu, 17 May 2012 19:36:41 +0000 (12:36 -0700)
committerSage Weil <sage@inktank.com>
Fri, 18 May 2012 23:23:56 +0000 (16:23 -0700)
This makes a bit more sense.  Don't use the seed monmap, but use the one
we ended up with when we formed our first quorum.  This will do a better
job of picking up names of peers, and also ensure we get a map based on
the mon initial members (if specified).

Signed-off-by: Sage Weil <sage@inktank.com>
src/mon/MonmapMonitor.cc

index 81646b49617e495b47b7610bcc3d1e6296a4f52d..2aad118da30a15725356ceb3483eb41ef988822c 100644 (file)
@@ -39,11 +39,8 @@ static ostream& _prefix(std::ostream *_dout, Monitor *mon) {
 
 void MonmapMonitor::create_initial()
 {
-  bufferlist bl;
-  mon->store->get_bl_ss(bl, "mkfs", "monmap");
-  pending_map.decode(bl);
-  dout(10) << "create_initial set fed epoch " << pending_map.epoch << dendl;
-  assert(pending_map.epoch == 0);   // fix mkfs()
+  dout(10) << "create_initial using current monmap" << dendl;
+  pending_map = *mon->monmap;
   pending_map.epoch = 1;
 }