]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/HealthMonitor: fix regex formatting
authorxie xingguo <xie.xingguo@zte.com.cn>
Wed, 19 Jul 2017 08:43:50 +0000 (16:43 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Wed, 19 Jul 2017 08:43:50 +0000 (16:43 +0800)
Was:
./bin/ceph -s
  cluster:
    id:     0f704e51-f496-4812-a782-f6bcc490a109
    health: HEALTH_ERR
            mon%plurals% %names% %isorare% low on available space

Now:
 ./bin/ceph -s
  cluster:
    id:     1bb2cc6d-ba6f-467a-b811-994101a42749
    health: HEALTH_ERR
            mon a is low on available space

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/mon/HealthMonitor.cc

index 32f62667e25f169883efe64147968cea83a4b6e8..0af6fb7477b4d6906f0f8059cad1e49c80b5eeed 100644 (file)
@@ -120,7 +120,7 @@ void HealthMonitor::encode_pending(MonitorDBStore::TransactionRef t)
     }
     pending_health.merge(p.second);
   }
-  for (auto p : pending_health.checks) {
+  for (auto &p : pending_health.checks) {
     p.second.summary = boost::regex_replace(
       p.second.summary,
       boost::regex("%num%"), stringify(names[p.first].size()));