]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mon: don't consider a starting mgr to be an error
authorJohn Spray <john.spray@redhat.com>
Thu, 22 Jun 2017 15:18:32 +0000 (11:18 -0400)
committerSage Weil <sage@redhat.com>
Wed, 12 Jul 2017 16:52:02 +0000 (12:52 -0400)
The .available flag is there to tell MgrClients whether
to try and connect -- it isn't the right condition
for a health complaint.

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

index ccb1cda4943e9889a8cadcb141d56fd753bc342b..d200f2b55f7ba75a6e8d7a07a97538cf32b71335 100644 (file)
@@ -113,7 +113,7 @@ void MgrMonitor::encode_pending(MonitorDBStore::TransactionRef t)
   put_last_committed(t, pending_map.epoch);
 
   health_check_map_t next;
-  if (!pending_map.available) {
+  if (pending_map.active_gid == 0) {
     auto level = should_warn_about_mgr_down();
     if (level != HEALTH_OK) {
       next.add("MGR_DOWN", level, "no active mgr");
@@ -401,7 +401,7 @@ void MgrMonitor::get_health(
     return;
   }
 
-  if (!map.available) {
+  if (map.active_gid == 0) {
     auto level = HEALTH_WARN;
     // do not escalate to ERR if they are still upgrading to jewel.
     if (mon->osdmon()->osdmap.require_osd_release >= CEPH_RELEASE_LUMINOUS) {