From: Sage Weil Date: Thu, 27 Jul 2017 18:28:14 +0000 (-0400) Subject: mon/PGMap: include which pgs have unfound objects in detail X-Git-Tag: v12.1.2~12^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=cb34a63b3243de1fdaa3a0eed6bbec1f04a57156;p=ceph-ci.git mon/PGMap: include which pgs have unfound objects in detail Signed-off-by: Sage Weil --- diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index ecc51ba49d0..3c730f56008 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -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