<< ").mds e" << fsmap.get_epoch() << " ";
}
+static const string MDS_METADATA_PREFIX("mds_metadata");
+static const string MDS_HEALTH_PREFIX("mds_health");
+
+
/*
* Specialized implementation of cmd_getval to allow us to parse
* out strongly-typedef'd types
return cmd_getval(cct, cmdmap, k, (int64_t&)val);
}
-static const string MDS_METADATA_PREFIX("mds_metadata");
-
-
// my methods
void MDSMonitor::print_map(FSMap &m, int dbl)
dout(10) << "create_initial" << dendl;
}
+void MDSMonitor::get_store_prefixes(std::set<string>& s)
+{
+ s.insert(service_name);
+ s.insert(MDS_METADATA_PREFIX);
+ s.insert(MDS_HEALTH_PREFIX);
+}
void MDSMonitor::update_from_paxos(bool *need_bootstrap)
{
pending_fsmap = fsmap;
pending_fsmap.epoch++;
+ if (mon->osdmon()->is_readable()) {
+ auto &osdmap = mon->osdmon()->osdmap;
+ pending_fsmap.sanitize([&osdmap](int64_t pool){return osdmap.have_pg_pool(pool);});
+ }
+
dout(10) << "create_pending e" << pending_fsmap.epoch << dendl;
}
<< info.rank << " damaged" << dendl;
utime_t until = ceph_clock_now();
- until += g_conf->mds_blacklist_interval;
+ until += g_conf->get_val<double>("mon_mds_blacklist_interval");
const auto blacklist_epoch = mon->osdmon()->blacklist(info.addr, until);
request_proposal(mon->osdmon());
pending_fsmap.damaged(gid, blacklist_epoch);
<< ceph_mds_state_name(state) << dendl;
return true;
} else {
- // Made it through special cases and validations, record the
- // daemon's reported state to the FSMap.
- pending_fsmap.modify_daemon(gid, [state, seq](MDSMap::mds_info_t *info) {
- info->state = state;
- info->state_seq = seq;
- });
-
- if (state == MDSMap::STATE_ACTIVE) {
+ if (info.state != MDSMap::STATE_ACTIVE && state == MDSMap::STATE_ACTIVE) {
auto fscid = pending_fsmap.mds_roles.at(gid);
auto fs = pending_fsmap.get_filesystem(fscid);
mon->clog->info() << info.human_name() << " is now active in "
<< "filesystem " << fs->mds_map.fs_name << " as rank "
<< info.rank;
}
+
+ // Made it through special cases and validations, record the
+ // daemon's reported state to the FSMap.
+ pending_fsmap.modify_daemon(gid, [state, seq](MDSMap::mds_info_t *info) {
+ info->state = state;
+ info->state_seq = seq;
+ });
}
}
epoch_t blacklist_epoch = 0;
if (info.rank >= 0 && info.state != MDSMap::STATE_STANDBY_REPLAY) {
utime_t until = ceph_clock_now();
- until += g_conf->mds_blacklist_interval;
+ until += g_conf->get_val<double>("mon_mds_blacklist_interval");
blacklist_epoch = mon->osdmon()->blacklist(info.addr, until);
}