mon/MgrMonitor: only induce mgr epoch shortly after mkfs

For early clusters, if there isn't an active manager, we eventually want
to trigger a health warning by rolling over the mgrmap epoch.  We don't
want to do that if we have no active/available manager after that.  Fix
by checking ever_had_active_mgr here.

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-07-16 14:47:44 -04:00
parent 171104cb93
commit 1e50fb494c

View File

@ -490,6 +490,7 @@ void MgrMonitor::tick()
}
if (!pending_map.available &&
!ever_had_active_mgr &&
should_warn_about_mgr_down() != HEALTH_OK) {
dout(10) << " exceeded mon_mgr_mkfs_grace " << g_conf->mon_mgr_mkfs_grace
<< " seconds" << dendl;