]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/PGMap: include which pgs have unfound objects in detail
authorSage Weil <sage@redhat.com>
Thu, 27 Jul 2017 18:28:14 +0000 (14:28 -0400)
committerSage Weil <sage@redhat.com>
Tue, 1 Aug 2017 13:25:42 +0000 (09:25 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/PGMap.cc

index ecc51ba49d0bed5678c6789b8f419a90d74179e7..3c730f56008666f26181ddbab93596301bbe23b7 100644 (file)
@@ -3048,7 +3048,21 @@ void PGMap::get_health_checks(
     ostringstream ss;
     ss << pg_sum.stats.sum.num_objects_unfound
        << "/" << pg_sum.stats.sum.num_objects << " unfound (" << b << "%)";
-    checks->add("OBJECT_UNFOUND", HEALTH_WARN, ss.str());
+    auto& d = checks->add("OBJECT_UNFOUND", HEALTH_WARN, ss.str());
+
+    for (auto& p : pg_stat) {
+      if (p.second.stats.sum.num_objects_unfound) {
+       ostringstream ss;
+       ss << "pg " << p.first
+          << " has " << p.second.stats.sum.num_objects_unfound
+          << " unfound objects";
+       d.detail.push_back(ss.str());
+       if (d.detail.size() > max) {
+         d.detail.push_back("(additional pgs left out for brevity)");
+         break;
+       }
+      }
+    }
   }
 
   // REQUEST_SLOW