diff options
author | Sage Weil <sage@inktank.com> | 2013-08-23 12:45:06 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-08-23 12:45:06 -0700 |
commit | 7372b6a7c8dc63de1f42ebd2c4bc396f17e03937 (patch) | |
tree | 81e1b12e01afe20a7a25b65166dff9106724f3e5 | |
parent | f4040238c4e2031370ff884c7f7a47d36deab5ec (diff) | |
parent | 5637516a30f83267747bb1d718ea6ca1998ec08e (diff) | |
download | ceph-7372b6a7c8dc63de1f42ebd2c4bc396f17e03937.tar.gz |
Merge pull request #533 from ceph/wip-osd-healthy-tuanble
osd: add 'osd heartbeat min healthy ratio' tunable
Reviewed-by: Samuel Just <sam.just@inktank.com>
-rw-r--r-- | src/common/config_opts.h | 5 | ||||
-rw-r--r-- | src/osd/OSD.cc | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/common/config_opts.h b/src/common/config_opts.h index b021651bd4d..ce3b78ca52e 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -425,6 +425,11 @@ OPTION(osd_heartbeat_addr, OPT_ADDR, entity_addr_t()) OPTION(osd_heartbeat_interval, OPT_INT, 6) // (seconds) how often we ping peers OPTION(osd_heartbeat_grace, OPT_INT, 20) // (seconds) how long before we decide a peer has failed OPTION(osd_heartbeat_min_peers, OPT_INT, 10) // minimum number of peers + +// minimum number of peers tha tmust be reachable to mark ourselves +// back up after being wrongly marked down. +OPTION(osd_heartbeat_min_healthy_ratio, OPT_FLOAT, .33) + OPTION(osd_mon_heartbeat_interval, OPT_INT, 30) // (seconds) how often to ping monitor if no peers OPTION(osd_mon_report_interval_max, OPT_INT, 120) OPTION(osd_mon_report_interval_min, OPT_INT, 5) // pg stats, failures, up_thru, boot. diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 9a58289eda4..3e19f5634c1 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -3512,7 +3512,7 @@ bool OSD::_is_healthy() ++up; ++num; } - if (up < num / 3) { + if ((float)up < (float)num * g_conf->osd_heartbeat_min_healthy_ratio) { dout(1) << "is_healthy false -- only " << up << "/" << num << " up peers (less than 1/3)" << dendl; return false; } |