]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: consisder osd recovery state in health check
authorSage Weil <sage.weil@dreamhost.com>
Sun, 24 Apr 2011 04:05:12 +0000 (21:05 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Sun, 24 Apr 2011 04:05:12 +0000 (21:05 -0700)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/mon/PGMonitor.cc

index a81c2877dc23b3a739d36d61c16d04d27f5f5932..97defe56d69ef6f0ba450432a1b28f815b24b5c4 100644 (file)
@@ -901,5 +901,15 @@ enum health_status_t PGMonitor::get_health(std::ostream &ss) const
       ss << p->second << " pgs " << p->first;
     }
   }
+
+  stringstream rss;
+  pg_map.recovery_summary(rss);
+  if (!rss.str().empty()) {
+    if (ret != HEALTH_OK)
+      ss << ", ";
+    ret = HEALTH_WARN;
+    ss << rss.str();
+  }
+
   return ret;
 }