]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/ServiceMap: show service's id on summary
authorJoao Eduardo Luis <joao@suse.de>
Thu, 13 Dec 2018 14:29:51 +0000 (14:29 +0000)
committerJoao Eduardo Luis <joao@suse.de>
Thu, 28 Feb 2019 09:14:17 +0000 (09:14 +0000)
This way we'll be able to show each service's id on status.

Fixes: http://tracker.ceph.com/issues/21073
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
src/mgr/ServiceMap.h

index 7c877baa8f0eb1ce58c581196ae614c03c3b2254..d2a1c9b37c140b5d1a77b9e31a2b25a81d5950d6 100644 (file)
@@ -49,6 +49,18 @@ struct ServiceMap {
       std::ostringstream ss;
       ss << daemons.size() << (daemons.size() > 1 ? " daemons" : " daemon")
         << " active";
+
+      if (!daemons.empty()) {
+       ss << " (";
+       for (auto p = daemons.begin(); p != daemons.end(); ++p) {
+         if (p != daemons.begin()) {
+           ss << ", ";
+         }
+         ss << p->first;
+       }
+       ss << ")";
+      }
+
       return ss.str();
     }