From: Sage Weil Date: Thu, 29 Jun 2017 16:38:49 +0000 (-0400) Subject: mon/PGMap: some stuck warnings are err, some warn X-Git-Tag: v12.1.1~58^2~25 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3b01be0d4b261078db70dfb02c0f63c4479adf48;p=ceph.git mon/PGMap: some stuck warnings are err, some warn inactive and stale -> error degraded, unclean, undersized -> warning Signed-off-by: Sage Weil --- diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index dbd1b5812111b..50a1951fab9d8 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -2702,10 +2702,19 @@ void PGMap::get_health_checks( now, max, &inactive->detail); ++num_inactive; } + if ((i.second.state & PG_STATE_STALE) && + i.second.last_unstale < cutoff) { + if (!stale) { + stale = &checks->add("PG_STUCK_STALE", HEALTH_ERR, ""); + } + note_stuck_detail(i.first, i.second, "stale", i.second.last_unstale, + now, max, &stale->detail); + ++num_stale; + } if (!(i.second.state & PG_STATE_CLEAN) && i.second.last_clean < cutoff) { if (!unclean) { - unclean = &checks->add("PG_STUCK_UNCLEAN", HEALTH_ERR, ""); + unclean = &checks->add("PG_STUCK_UNCLEAN", HEALTH_WARN, ""); } note_stuck_detail(i.first, i.second, "unclean", i.second.last_clean, now, max, &unclean->detail); @@ -2714,7 +2723,7 @@ void PGMap::get_health_checks( if ((i.second.state & PG_STATE_DEGRADED) && i.second.last_undegraded < cutoff) { if (!degraded) { - degraded = &checks->add("PG_STUCK_DEGRADED", HEALTH_ERR, ""); + degraded = &checks->add("PG_STUCK_DEGRADED", HEALTH_WARN, ""); } note_stuck_detail(i.first, i.second, "degraded", i.second.last_undegraded, now, max, °raded->detail); @@ -2723,22 +2732,13 @@ void PGMap::get_health_checks( if ((i.second.state & PG_STATE_UNDERSIZED) && i.second.last_fullsized < cutoff) { if (!undersized) { - undersized = &checks->add("PG_STUCK_UNDERSIZED", HEALTH_ERR, ""); + undersized = &checks->add("PG_STUCK_UNDERSIZED", HEALTH_WARN, ""); } note_stuck_detail(i.first, i.second, "undersized", i.second.last_fullsized, now, max, &undersized->detail); ++num_undersized; } - if ((i.second.state & PG_STATE_STALE) && - i.second.last_unstale < cutoff) { - if (!stale) { - stale = &checks->add("PG_STUCK_STALE", HEALTH_ERR, ""); - } - note_stuck_detail(i.first, i.second, "stale", i.second.last_unstale, - now, max, &stale->detail); - ++num_stale; - } } if (inactive) { note_stuck_summary("inactive", num_inactive, max, inactive);