From: xie xingguo Date: Mon, 24 Jul 2017 08:28:13 +0000 (+0800) Subject: mon/PGMap: fix condition checking for slow-requests X-Git-Tag: v12.1.2~86^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=507797ea24ddf1a772df5aa86536d212acbc53cd;p=ceph.git mon/PGMap: fix condition checking for slow-requests op_queue_age_hist collects op stats in ms, not sec. Signed-off-by: xie xingguo --- diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index b907003c6d5..076c618ce84 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -3054,7 +3054,8 @@ void PGMap::get_health_checks( // REQUEST_SLOW // REQUEST_STUCK if (cct->_conf->mon_osd_warn_op_age > 0 && - osd_sum.op_queue_age_hist.upper_bound() > + !osd_sum.op_queue_age_hist.h.empty() && + osd_sum.op_queue_age_hist.upper_bound() / 1000.0 > cct->_conf->mon_osd_warn_op_age) { list warn_detail, error_detail; unsigned warn = 0, error = 0; @@ -3364,7 +3365,8 @@ void PGMap::get_health( // slow requests if (cct->_conf->mon_osd_warn_op_age > 0 && - osd_sum.op_queue_age_hist.upper_bound() > cct->_conf->mon_osd_warn_op_age) { + osd_sum.op_queue_age_hist.upper_bound() / 1000.0 > + cct->_conf->mon_osd_warn_op_age) { auto sum = _warn_slow_request_histogram( cct, osd_sum.op_queue_age_hist, "", summary, NULL); if (sum.first > 0 || sum.second > 0) {