From 899a16e50a6c22359e7a5c5ac720a605f6a4b67e Mon Sep 17 00:00:00 2001 From: John Spray Date: Mon, 2 May 2016 22:14:07 +0100 Subject: [PATCH] mds: fix mdsmap print_summary with standby replays Fixes: http://tracker.ceph.com/issues/15705 Signed-off-by: John Spray --- src/mds/FSMap.cc | 3 ++- src/mds/MDSMap.cc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mds/FSMap.cc b/src/mds/FSMap.cc index a20bb09b8cebe..a53c55a2568de 100644 --- a/src/mds/FSMap.cc +++ b/src/mds/FSMap.cc @@ -151,7 +151,8 @@ void FSMap::print_summary(Formatter *f, ostream *out) const fs_cluster_id_t fscid = mds_roles.at(info.global_id); - if (info.rank != MDS_RANK_NONE) { + if (info.rank != MDS_RANK_NONE && + info.state != MDSMap::STATE_STANDBY_REPLAY) { if (f) { f->open_object_section("mds"); f->dump_unsigned("filesystem_id", fscid); diff --git a/src/mds/MDSMap.cc b/src/mds/MDSMap.cc index f66fc7a85e445..92968137b6253 100644 --- a/src/mds/MDSMap.cc +++ b/src/mds/MDSMap.cc @@ -267,7 +267,7 @@ void MDSMap::print_summary(Formatter *f, ostream *out) const if (p.second.laggy()) s += "(laggy or crashed)"; - if (p.second.rank >= 0) { + if (p.second.rank >= 0 && p.second.state != MDSMap::STATE_STANDBY_REPLAY) { if (f) { f->open_object_section("mds"); f->dump_unsigned("rank", p.second.rank);