Skip to content

Commit

Permalink
Merge pull request ceph#29917 from tchaikov/wip-mon-always-on-modules
Browse files Browse the repository at this point in the history
mgr/MgrMonitor: print pending.always_on_modules before updating it

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
  • Loading branch information
tchaikov committed Aug 29, 2019
2 parents 94b8839 + 75c7ee2 commit 48d6afb
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions src/mon/MgrMonitor.cc
Expand Up @@ -664,18 +664,21 @@ void MgrMonitor::cancel_timer()

void MgrMonitor::on_active()
{
if (mon->is_leader()) {
mon->clog->debug() << "mgrmap e" << map.epoch << ": " << map;

if (HAVE_FEATURE(mon->get_quorum_con_features(), SERVER_NAUTILUS) &&
pending_map.always_on_modules != always_on_modules) {
pending_map.always_on_modules = always_on_modules;
dout(4) << "always on modules changed, pending "
<< pending_map.get_always_on_modules()
<< " != wanted " << always_on_modules << dendl;
propose_pending();
}
if (!mon->is_leader()) {
return;
}
mon->clog->debug() << "mgrmap e" << map.epoch << ": " << map;
if (!HAVE_FEATURE(mon->get_quorum_con_features(), SERVER_NAUTILUS)) {
return;
}
if (pending_map.always_on_modules == always_on_modules) {
return;
}
dout(4) << "always on modules changed, pending "
<< pending_map.always_on_modules << " != wanted "
<< always_on_modules << dendl;
pending_map.always_on_modules = always_on_modules;
propose_pending();
}

void MgrMonitor::tick()
Expand Down

0 comments on commit 48d6afb

Please sign in to comment.