From: Greg Farnum Date: Fri, 12 Nov 2021 23:05:02 +0000 (+0000) Subject: mon: MonMap: display disallowed_leaders whenever they're set X-Git-Tag: v17.1.0~428^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F43932%2Fhead;p=ceph.git mon: MonMap: display disallowed_leaders whenever they're set In c59a6f89465e3933631afa2ba92e8c1ae1c31c06, I erroneously changed the CLI display output so it would only dump disallowed_leaders in stretch mode. But they can also be set in connectivity or disallow election modes and we want users to be able to see them then as well. Fixes: https://tracker.ceph.com/issues/53258 Signed-off-by: Greg Farnum --- diff --git a/src/mon/MonMap.cc b/src/mon/MonMap.cc index 43236a636417..344278eaa57f 100644 --- a/src/mon/MonMap.cc +++ b/src/mon/MonMap.cc @@ -383,6 +383,9 @@ void MonMap::print(ostream& out) const if (stretch_mode_enabled) { out << "stretch_mode_enabled " << stretch_mode_enabled << "\n"; out << "tiebreaker_mon " << tiebreaker_mon << "\n"; + } + if (stretch_mode_enabled || + !disallowed_leaders.empty()) { out << "disallowed_leaders " << disallowed_leaders << "\n"; } unsigned i = 0;