]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix "1 filesystem is have a..." message 17566/head
authorJohn Spray <john.spray@redhat.com>
Mon, 28 Aug 2017 12:50:46 +0000 (13:50 +0100)
committerAbhishek Lekshmanan <abhishek@suse.com>
Thu, 7 Sep 2017 13:10:14 +0000 (15:10 +0200)
Like "Health check failed: 1 filesystem is have a failed mds daemon (FS_WITH_FAILED_MDS)"

Fixes: http://tracker.ceph.com/issues/21153
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 7d21119a47212140d121df99efdb838a3f078a82)

src/mds/FSMap.cc
src/mon/MDSMonitor.cc

index c605dfcd15716a1dc1585750f110ff58c60f51e6..95e78b23425734faa591dd765eb74147f3c60e71 100644 (file)
@@ -355,7 +355,7 @@ void FSMap::get_health_checks(health_check_map_t *checks) const
     if (!stuck_failed.empty()) {
       health_check_t& fscheck = checks->get_or_add(
         "FS_WITH_FAILED_MDS", HEALTH_WARN,
-        "%num% filesystem%plurals% %isorare% have a failed mds daemon");
+        "%num% filesystem%plurals% %hasorhave% a failed mds daemon");
       ostringstream ss;
       ss << "fs " << fs->mds_map.fs_name << " has " << stuck_failed.size()
          << " failed mds" << (stuck_failed.size() > 1 ? "s" : "");
index 9d0b50d18cfbada9920b38178b048c4c82921e4b..f38c1e91fd9531f5585eee48d5256d9cc27174a0 100644 (file)
@@ -234,6 +234,10 @@ void MDSMonitor::encode_pending(MonitorDBStore::TransactionRef t)
       p.second.summary,
       boost::regex("%isorare%"),
       p.second.detail.size() > 1 ? "are" : "is");
+    p.second.summary = boost::regex_replace(
+      p.second.summary,
+      boost::regex("%hasorhave%"),
+      p.second.detail.size() > 1 ? "have" : "has");
   }
   encode_health(new_checks, t);
 }