From: John Spray Date: Thu, 25 May 2017 11:35:46 +0000 (-0400) Subject: mon: emit cluster log messages on daemon failures X-Git-Tag: v12.1.0~130^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0219fa719f88b0b59117a144c9963f1c7ccad419;p=ceph.git mon: emit cluster log messages on daemon failures 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 --- diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index f12eb0af06e..575c68ec50b 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -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()) {