]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: warn on straw_calc_version=0
authorSage Weil <sage@redhat.com>
Tue, 8 Mar 2016 01:32:31 +0000 (20:32 -0500)
committerSage Weil <sage@redhat.com>
Tue, 8 Mar 2016 01:50:49 +0000 (20:50 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/common/config_opts.h
src/mon/OSDMonitor.cc

index 4150a746d53e02e60b700484097381f062c780be..9a33b7125b6dad0c3f36aee9019db6291ab4ee78 100644 (file)
@@ -266,6 +266,7 @@ OPTION(mon_osd_report_timeout, OPT_INT, 900)    // grace period before declaring
 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_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)
 OPTION(mon_min_osdmap_epochs, OPT_INT, 500)
index 5908ca4c6a83229d69608c8f31838498ecbff644..ecc4ff4f306d60bf37cef1190a854a21ce0eec68 100644 (file)
@@ -2846,6 +2846,17 @@ void OSDMonitor::get_health(list<pair<health_status_t,string> >& summary,
        }
       }
     }
+    if (g_conf->mon_warn_on_crush_straw_calc_version_zero) {
+      if (osdmap.crush->get_straw_calc_version() == 0) {
+       ostringstream ss;
+       ss << "crush map has straw_calc_version=0";
+       summary.push_back(make_pair(HEALTH_WARN, ss.str()));
+       if (detail) {
+         ss << "; see http://ceph.com/docs/master/rados/operations/crush-map/#tunables";
+         detail->push_back(make_pair(HEALTH_WARN, ss.str()));
+       }
+      }
+    }
 
     // hit_set-less cache_mode?
     if (g_conf->mon_warn_on_cache_pools_without_hit_sets) {