]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: tweak mgr status text 14883/head
authorJohn Spray <john.spray@redhat.com>
Thu, 20 Apr 2017 21:31:10 +0000 (17:31 -0400)
committerKefu Chai <kchai@redhat.com>
Sun, 30 Apr 2017 02:30:03 +0000 (10:30 +0800)
Previously at startup we saw contradictory status
that had a "no active mgr" health message and then
a line that said "active: x".

Mitigate that a bit by indicating that a !available
active daemon is starting up.

Signed-off-by: John Spray <john.spray@redhat.com>
src/mon/MgrMap.h

index 1fd0500131c3aa31bbfea8e98bfcd506745b8ff9..e522ab4ba0f1ac74232c9b9a55da740b041cd370 100644 (file)
@@ -126,7 +126,12 @@ public:
       dump(f);
     } else {
       if (get_active_gid() != 0) {
-       *ss << "active: " << get_active_name() << " ";
+       *ss << "active: " << get_active_name();
+        if (!available) {
+          // If the daemon hasn't gone active yet, indicate that.
+          *ss << "(starting)";
+        }
+        *ss << " ";
       } else {
        *ss << "no daemons active ";
       }