mirror of
https://github.com/ceph/ceph
synced 2025-03-31 07:53:23 +00:00
Merge pull request #20820 from guzhongyan/nodels-improve
mon: node ls improvement Reviewed-by: John Spray <john.spray@redhat.com>
This commit is contained in:
commit
6a981eb842
@ -1735,7 +1735,7 @@ int MDSMonitor::print_nodes(Formatter *f)
|
||||
return r;
|
||||
}
|
||||
|
||||
map<string, list<int> > mdses; // hostname => rank
|
||||
map<string, list<string> > mdses; // hostname => mds
|
||||
for (map<mds_gid_t, Metadata>::iterator it = metadata.begin();
|
||||
it != metadata.end(); ++it) {
|
||||
const Metadata& m = it->second;
|
||||
@ -1750,8 +1750,7 @@ int MDSMonitor::print_nodes(Formatter *f)
|
||||
continue;
|
||||
}
|
||||
const MDSMap::mds_info_t& mds_info = fsmap.get_info_gid(gid);
|
||||
// FIXME: include filesystem name with rank here
|
||||
mdses[hostname->second].push_back(mds_info.rank);
|
||||
mdses[hostname->second].push_back(mds_info.name);
|
||||
}
|
||||
|
||||
dump_services(f, mdses, "mds");
|
||||
|
@ -5020,7 +5020,7 @@ void Monitor::count_metadata(const string& field, Formatter *f)
|
||||
|
||||
int Monitor::print_nodes(Formatter *f, ostream& err)
|
||||
{
|
||||
map<string, list<int> > mons; // hostname => mon
|
||||
map<string, list<string> > mons; // hostname => mon
|
||||
for (map<int, Metadata>::iterator it = mon_metadata.begin();
|
||||
it != mon_metadata.end(); ++it) {
|
||||
const Metadata& m = it->second;
|
||||
@ -5029,7 +5029,7 @@ int Monitor::print_nodes(Formatter *f, ostream& err)
|
||||
// not likely though
|
||||
continue;
|
||||
}
|
||||
mons[hostname->second].push_back(it->first);
|
||||
mons[hostname->second].push_back(monmap->get_name(it->first));
|
||||
}
|
||||
|
||||
dump_services(f, mons, "mon");
|
||||
|
Loading…
Reference in New Issue
Block a user