Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mon: node ls improvement #20820

Merged
merged 1 commit into from
Apr 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/mon/MDSMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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");
Expand Down
4 changes: 2 additions & 2 deletions src/mon/Monitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4969,7 +4969,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;
Expand All @@ -4978,7 +4978,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");
Expand Down