local dir=$1
export CEPH_ARGS
- export EXTRA_OPTS=" --mon_warn_on_slow_ping_time=1"
+ export EXTRA_OPTS=" --mon_warn_on_slow_ping_time=0.001"
run_mon $dir a || return 1
run_mgr $dir x || return 1
run_osd $dir 0 || return 1
.add_service("mgr")
.set_description("Issue a health warning if there are fewer OSDs than osd_pool_default_size"),
- Option("mon_warn_on_slow_ping_time", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
+ Option("mon_warn_on_slow_ping_time", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
.set_default(0)
.add_service("mgr")
.set_description("Override mon_warn_on_slow_ping_ratio with specified threshold in milliseconds")
// Default to health warning level if nothing specified
if (!(cmd_getval(g_ceph_context, cmdmap, "value", value))) {
// Convert milliseconds to microseconds
- value = static_cast<int64_t>(g_ceph_context->_conf.get_val<uint64_t>("mon_warn_on_slow_ping_time")) * 1000;
+ value = static_cast<int64_t>(g_ceph_context->_conf.get_val<double>("mon_warn_on_slow_ping_time")) * 1000;
if (value == 0) {
double ratio = g_conf().get_val<double>("mon_warn_on_slow_ping_ratio");
value = g_conf().get_val<int64_t>("osd_heartbeat_grace");
// SLOW_PING_TIME
// Convert milliseconds to microseconds
- auto warn_slow_ping_time = cct->_conf.get_val<uint64_t>("mon_warn_on_slow_ping_time") * 1000;
+ auto warn_slow_ping_time = cct->_conf.get_val<double>("mon_warn_on_slow_ping_time") * 1000;
auto grace = cct->_conf.get_val<int64_t>("osd_heartbeat_grace");
if (warn_slow_ping_time == 0) {
double ratio = cct->_conf.get_val<double>("mon_warn_on_slow_ping_ratio");
int64_t value = 0;
if (!(cmd_getval(cct, cmdmap, "value", value))) {
// Convert milliseconds to microseconds
- value = static_cast<int64_t>(g_conf().get_val<uint64_t>("mon_warn_on_slow_ping_time")) * 1000;
+ value = static_cast<int64_t>(g_conf().get_val<double>("mon_warn_on_slow_ping_time")) * 1000;
if (value == 0) {
double ratio = g_conf().get_val<double>("mon_warn_on_slow_ping_ratio");
value = g_conf().get_val<int64_t>("osd_heartbeat_grace");