]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: emit cluster log messages on daemon failures
authorJohn Spray <john.spray@redhat.com>
Thu, 25 May 2017 11:35:46 +0000 (07:35 -0400)
committerJohn Spray <john.spray@redhat.com>
Wed, 31 May 2017 22:00:43 +0000 (18:00 -0400)
Two reasons:
 - usability
 - make our tests fail on the WRN message if
   a daemon unexpectedly bounces during a test like in
   http://tracker.ceph.com/issues/19706

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

index f12eb0af06e5cc04fc0039d736bc5504b282af5a..575c68ec50b25de2043f0e69f87a3a8473cc71ef 100644 (file)
@@ -503,6 +503,7 @@ bool MDSMonitor::prepare_beacon(MonOpRequestRef op)
           mon->osdmon()->wait_for_writeable(op, new C_RetryMessage(this, op));
           return false;
         }
+        mon->clog->info() << "MDS daemon '" << m->get_name() << "' restarted";
        fail_mds_gid(existing);
         failed_mds = true;
       }
@@ -1904,6 +1905,11 @@ void MDSMonitor::maybe_replace_gid(mds_gid_t gid,
       << " " << ceph_mds_state_name(info.state)
       << " with " << sgid << "/" << si.name << " " << si.addr << dendl;
 
+    mon->clog->warn() << "MDS daemon '" << info.name << "'"
+                      << " is not responding, replacing it "
+                      << "as rank " << info.rank
+                      << " with standby '" << si.name << "'";
+
     // Remember what NS the old one was in
     const fs_cluster_id_t fscid = pending_fsmap.mds_roles.at(gid);
 
@@ -1920,6 +1926,9 @@ void MDSMonitor::maybe_replace_gid(mds_gid_t gid,
     dout(10) << " failing and removing " << gid << " " << info.addr << " mds." << info.rank 
       << "." << info.inc << " " << ceph_mds_state_name(info.state)
       << dendl;
+    mon->clog->info() << "MDS standby '"  << info.name
+                      << "' is not responding, removing it from the set of "
+                      << "standbys";
     fail_mds_gid(gid);
     *mds_propose = true;
   } else if (!info.laggy()) {