summaryrefslogtreecommitdiffstats
path: root/src/mon/HealthMonitor.cc
diff options
context:
space:
mode:
authorDavid Zafman <dzafman@redhat.com>2020-11-08 18:07:04 +0100
committerDavid Zafman <dzafman@redhat.com>2020-11-12 00:10:11 +0100
commit93373746f529e8485748a8ffaa8a50be25d3287d (patch)
tree31b4a8d1de59c62ea3d5f4afcc0807afe2fd4b80 /src/mon/HealthMonitor.cc
parentosd: Temporary fix for alienstore which doesn't support asok commands yet (diff)
downloadceph-93373746f529e8485748a8ffaa8a50be25d3287d.tar.xz
ceph-93373746f529e8485748a8ffaa8a50be25d3287d.zip
osd test: Delay reporting until mon_warn_older_version_delay has passed
Move release notes description to 16.0.0 and update Update documentation Signed-off-by: David Zafman <dzafman@redhat.com>
Diffstat (limited to 'src/mon/HealthMonitor.cc')
-rw-r--r--src/mon/HealthMonitor.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mon/HealthMonitor.cc b/src/mon/HealthMonitor.cc
index 582f99f9b5f..0e6bf5be2d4 100644
--- a/src/mon/HealthMonitor.cc
+++ b/src/mon/HealthMonitor.cc
@@ -684,8 +684,14 @@ bool HealthMonitor::check_leader_health()
health_check_map_t next;
+ static utime_t old_version_first_time;
+
// DAEMON_OLD_VERSION
if (g_conf().get_val<bool>("mon_warn_on_older_version")) {
+ utime_t now = ceph_clock_now();
+ if (old_version_first_time == utime_t())
+ old_version_first_time = now;
+ if ((now - old_version_first_time) > g_conf().get_val<double>("mon_warn_older_version_delay")) {
std::map<string, std::list<string> > all_versions;
mon->get_all_versions(all_versions);
if (all_versions.size() > 1) {
@@ -720,6 +726,9 @@ bool HealthMonitor::check_leader_health()
<< " running an older version of ceph: " << g.first;
d.detail.push_back(ds.str());
}
+ } else {
+ old_version_first_time = utime_t();
+ }
}
}