summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick Donnelly <pdonnell@redhat.com>2017-11-16 20:47:05 +0100
committerPatrick Donnelly <pdonnell@redhat.com>2017-11-16 20:47:05 +0100
commit3a394293fc80a8dca7e7ed55750d785b0ed6541b (patch)
tree15cb5b6d419070499801b49a90c849f4bad80467 /src
parentMerge PR #18774 into master (diff)
parentgithubmap: update contributors (diff)
downloadceph-3a394293fc80a8dca7e7ed55750d785b0ed6541b.tar.xz
ceph-3a394293fc80a8dca7e7ed55750d785b0ed6541b.zip
Merge PR #18600 into master
* refs/pull/18600/head: MDSMonitor: only clog changes to active Reviewed-by: John Spray <john.spray@redhat.com> Reviewed-by: João Eduardo Luís <joao@suse.de>
Diffstat (limited to 'src')
-rw-r--r--src/mon/MDSMonitor.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc
index 159242228e1..4159d341d00 100644
--- a/src/mon/MDSMonitor.cc
+++ b/src/mon/MDSMonitor.cc
@@ -734,20 +734,20 @@ bool MDSMonitor::prepare_beacon(MonOpRequestRef op)
<< ceph_mds_state_name(state) << dendl;
return true;
} else {
- // Made it through special cases and validations, record the
- // daemon's reported state to the FSMap.
- pending_fsmap.modify_daemon(gid, [state, seq](MDSMap::mds_info_t *info) {
- info->state = state;
- info->state_seq = seq;
- });
-
- if (state == MDSMap::STATE_ACTIVE) {
+ if (info.state != MDSMap::STATE_ACTIVE && state == MDSMap::STATE_ACTIVE) {
auto fscid = pending_fsmap.mds_roles.at(gid);
auto fs = pending_fsmap.get_filesystem(fscid);
mon->clog->info() << info.human_name() << " is now active in "
<< "filesystem " << fs->mds_map.fs_name << " as rank "
<< info.rank;
}
+
+ // Made it through special cases and validations, record the
+ // daemon's reported state to the FSMap.
+ pending_fsmap.modify_daemon(gid, [state, seq](MDSMap::mds_info_t *info) {
+ info->state = state;
+ info->state_seq = seq;
+ });
}
}