Skip to content

Commit ea7c0b6

Browse files
Merge pull request ceph#62233 from kamoltat/wip-ksirivad-ceph-s-leader-mon
mon: Add leader indicator && stretch mode to ceph -s output
2 parents ffff042 + 0c5fd20 commit ea7c0b6

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

PendingReleaseNotes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
>=20.0.0
22

3+
* RADOS: leader monitor and stretch mode status are now included in the `ceph status` output.
4+
Related Tracker: https://tracker.ceph.com/issues/70406
35
* RGW: The User Account feature introduced in Squid provides first-class support for
46
IAM APIs and policy. Our preliminary STS support was instead based on tenants, and
57
exposed some IAM APIs to admins only. This tenant-level IAM functionality is now

src/mon/Monitor.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3106,7 +3106,9 @@ void Monitor::get_cluster_status(stringstream &ss, Formatter *f,
31063106
} else {
31073107
ss << " cluster:\n";
31083108
ss << " id: " << monmap->get_fsid() << "\n";
3109-
3109+
if (is_stretch_mode()){
3110+
ss << " stretch_mode: ENABLED\n";
3111+
}
31103112
string health;
31113113
healthmon()->get_health_status(false, nullptr, &health,
31123114
"\n ", "\n ");
@@ -3139,7 +3141,8 @@ void Monitor::get_cluster_status(stringstream &ss, Formatter *f,
31393141
const auto mon_count = monmap->mon_info.size();
31403142
auto mnow = ceph::mono_clock::now();
31413143
ss << " mon: " << spacing << mon_count << " daemons, quorum "
3142-
<< quorum_names << " (age " << timespan_str(mnow - quorum_since) << ")";
3144+
<< quorum_names << " (age " << timespan_str(mnow - quorum_since) << ")"
3145+
<< " [leader: " << get_leader_name() << "]";
31433146
if (quorum_names.size() != mon_count) {
31443147
std::list<std::string> out_of_q;
31453148
for (size_t i = 0; i < monmap->ranks.size(); ++i) {

0 commit comments

Comments
 (0)