diff --git a/qa/suites/upgrade/kraken-x/stress-split/0-cluster/start.yaml b/qa/suites/upgrade/kraken-x/stress-split/0-cluster/start.yaml index dbb03ec826e..b8a28f986ac 100644 --- a/qa/suites/upgrade/kraken-x/stress-split/0-cluster/start.yaml +++ b/qa/suites/upgrade/kraken-x/stress-split/0-cluster/start.yaml @@ -6,6 +6,10 @@ meta: overrides: ceph: fs: xfs + log-whitelist: + - overall HEALTH_ + - \(MON_DOWN\) + - \(MGR_DOWN\) conf: global: enable experimental unrecoverable data corrupting features: "*" diff --git a/src/mon/Elector.cc b/src/mon/Elector.cc index 001fea95f3d..b7fde85528d 100644 --- a/src/mon/Elector.cc +++ b/src/mon/Elector.cc @@ -35,9 +35,19 @@ static ostream& _prefix(std::ostream *_dout, Monitor *mon, epoch_t epoch) { void Elector::init() { epoch = mon->store->get(Monitor::MONITOR_NAME, "election_epoch"); - if (!epoch) + if (!epoch) { + dout(1) << "init, first boot, initializing epoch at 1 " << dendl; epoch = 1; - dout(1) << "init, last seen epoch " << epoch << dendl; + } else if (epoch % 2) { + dout(1) << "init, last seen epoch " << epoch + << ", mid-election, bumping" << dendl; + ++epoch; + auto t(std::make_shared()); + t->put(Monitor::MONITOR_NAME, "election_epoch", epoch); + mon->store->apply_transaction(t); + } else { + dout(1) << "init, last seen epoch " << epoch << dendl; + } } void Elector::shutdown()