Whenever we update the monmap we should bootstrap, in order to reset the
monitor's on-going activities and re-probe.
Not doing so contributed to bug #3252, during which we entered an infinite
election cycle. This may only happen though when we rely on 'mon initial
peers'. Specifying a monmap during the monitor's mkfs should not trigger
this bug.
Fixes: #3252
Backport: argonaut
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
mon->monmap->decode(em->monmap_bl);
mon->store->put_bl_sn(em->monmap_bl, "monmap", mon->monmap->epoch);
mon->monmon()->paxos->stash_latest(mon->monmap->epoch, em->monmap_bl);
- } else if (peermap->epoch < mon->monmap->epoch) {
+ mon->bootstrap();
+ m->put();
+ return;
+ }
+ if (peermap->epoch < mon->monmap->epoch) {
dout(0) << m->get_source_inst() << " has older monmap epoch " << peermap->epoch
<< " < my epoch " << mon->monmap->epoch
<< dendl;