mon: use current monmap for initial quorum

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>
This commit is contained in:
Sage Weil 2012-05-17 12:36:41 -07:00
parent 0088699f7a
commit c7ba9feabe

View 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;
}