mirror of
https://github.com/ceph/ceph
synced 2024-12-19 01:46:00 +00:00
Merge pull request #1379 from ceph/wip-7562
mon: make quorum list (by name) be in quorum order Reviewed-by: Greg Farnum <greg@inktank.com>
This commit is contained in:
commit
aa7945abc8
@ -1717,9 +1717,9 @@ void Monitor::_quorum_status(Formatter *f, ostream& ss)
|
||||
f->dump_int("mon", *p);
|
||||
f->close_section(); // quorum
|
||||
|
||||
set<string> quorum_names = get_quorum_names();
|
||||
list<string> quorum_names = get_quorum_names();
|
||||
f->open_array_section("quorum_names");
|
||||
for (set<string>::iterator p = quorum_names.begin(); p != quorum_names.end(); ++p)
|
||||
for (list<string>::iterator p = quorum_names.begin(); p != quorum_names.end(); ++p)
|
||||
f->dump_string("mon", *p);
|
||||
f->close_section(); // quorum_names
|
||||
|
||||
@ -1975,7 +1975,7 @@ void Monitor::get_status(stringstream &ss, Formatter *f)
|
||||
ss << " cluster " << monmap->get_fsid() << "\n";
|
||||
ss << " health " << health << "\n";
|
||||
ss << " monmap " << *monmap << ", election epoch " << get_epoch()
|
||||
<< ", quorum " << get_quorum() << " " << get_quorum_names() << "\n";
|
||||
<< ", quorum " << get_quorum() << " " << get_quorum_names() << "\n";
|
||||
if (mdsmon()->mdsmap.get_epoch() > 1)
|
||||
ss << " mdsmap " << mdsmon()->mdsmap << "\n";
|
||||
osdmon()->osdmap.print_summary(NULL, ss);
|
||||
|
@ -516,10 +516,10 @@ public:
|
||||
epoch_t get_epoch();
|
||||
int get_leader() { return leader; }
|
||||
const set<int>& get_quorum() { return quorum; }
|
||||
set<string> get_quorum_names() {
|
||||
set<string> q;
|
||||
list<string> get_quorum_names() {
|
||||
list<string> q;
|
||||
for (set<int>::iterator p = quorum.begin(); p != quorum.end(); ++p)
|
||||
q.insert(monmap->get_name(*p));
|
||||
q.push_back(monmap->get_name(*p));
|
||||
return q;
|
||||
}
|
||||
uint64_t get_quorum_features() const {
|
||||
|
Loading…
Reference in New Issue
Block a user