{
map<mds_gid_t,Metadata> meta;
load_metadata(meta);
+ dout(10) << __func__ << "meta=" << meta << dendl;
const auto &fsmap = get_fsmap();
- map<mds_gid_t, mds_info_t> map = fsmap.get_mds_info();
- dout(10) << __func__ << " mds meta=" << meta << dendl;
+ map<mds_gid_t, mds_info_t> mds_info_map = fsmap.get_mds_info();
+ // print mds_info_map
+ for (const auto& p : mds_info_map) {
+ dout(10) << __func__ << " gid " << p.first
+ << " mds_info_t " << p.second << dendl;
+ }
for (auto& p : meta) {
auto q = p.second.find("ceph_version_short");
- if (q == p.second.end()) continue;
- versions[q->second].push_back(string("mds.") + map[p.first].name);
+ if (q == p.second.end()) {
+ dout(10) << __func__ << " no version for gid " << p.first << dendl;
+ continue;
+ }
+ if (mds_info_map.find(p.first) == mds_info_map.end()) {
+ dout(10) << __func__ << " no mds_info for gid " << p.first << dendl;
+ continue;
+ } else {
+ dout(10) << __func__ << " found mds_info for gid " << p.first
+ << " name " << mds_info_map[p.first].name << dendl;
+ versions[q->second].push_back(string("mds.") + mds_info_map[p.first].name);
+ }
}
}