]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mon: make the minimum crush tunables configurable
authorSage Weil <sage@redhat.com>
Fri, 11 Mar 2016 20:39:06 +0000 (15:39 -0500)
committerSage Weil <sage@redhat.com>
Fri, 11 Mar 2016 20:39:06 +0000 (15:39 -0500)
If they cluster is using very old tunables, as inferred by whether it
requires a newer version of CRUSH, issue a health warning.

Signed-off-by: Sage Weil <sage@redhat.com>
src/common/config_opts.h
src/mon/OSDMonitor.cc

index 9a33b7125b6dad0c3f36aee9019db6291ab4ee78..9638bd35e804bd1eaf6b14e6ab034730452eb552 100644 (file)
@@ -265,7 +265,8 @@ OPTION(mon_globalid_prealloc, OPT_U32, 10000)   // how many globalids to preallo
 OPTION(mon_osd_report_timeout, OPT_INT, 900)    // grace period before declaring unresponsive OSDs dead
 OPTION(mon_force_standby_active, OPT_BOOL, true) // should mons force standby-replay mds to be active
 OPTION(mon_warn_on_old_mons, OPT_BOOL, true) // should mons set health to WARN if part of quorum is old?
-OPTION(mon_warn_on_legacy_crush_tunables, OPT_BOOL, true) // warn if crush tunables are not optimal
+OPTION(mon_warn_on_legacy_crush_tunables, OPT_BOOL, true) // warn if crush tunables are too old (older than mon_min_crush_required_version)
+OPTION(mon_crush_min_required_version, OPT_STR, "firefly")
 OPTION(mon_warn_on_crush_straw_calc_version_zero, OPT_BOOL, true) // warn if crush straw_calc_version==0
 OPTION(mon_warn_on_osd_down_out_interval_zero, OPT_BOOL, true) // warn if 'mon_osd_down_out_interval == 0'
 OPTION(mon_warn_on_cache_pools_without_hit_sets, OPT_BOOL, true)
index ecc4ff4f306d60bf37cef1190a854a21ce0eec68..d7c6009bba7e4e68847469d2c3e9ed391cfeb493 100644 (file)
@@ -2836,9 +2836,11 @@ void OSDMonitor::get_health(list<pair<health_status_t,string> >& summary,
 
     // old crush tunables?
     if (g_conf->mon_warn_on_legacy_crush_tunables) {
-      if (osdmap.crush->has_legacy_tunables()) {
+      string min = osdmap.crush->get_min_required_version();
+      if (min < g_conf->mon_crush_min_required_version) {
        ostringstream ss;
-       ss << "crush map has legacy tunables";
+       ss << "crush map has legacy tunables (require " << min
+          << ", min is " << g_conf->mon_crush_min_required_version << ")";
        summary.push_back(make_pair(HEALTH_WARN, ss.str()));
        if (detail) {
          ss << "; see http://ceph.com/docs/master/rados/operations/crush-map/#tunables";