Manually mark an mds rank as failed. The daemon should kill itself when
it finds out.
Note that this doesn't do any sanity checks, so it can also be used to
adjust state in an otherwise inconsistent mdsmap due to other bugs (one
where, say, an mds in up but has no info, or not up but not in the failed
set.)
Signed-off-by: Sage Weil <sage@newdream.net>
return true;
}
}
+ else if (m->cmd[1] == "fail" && m->cmd.size() == 3) {
+ int w = atoi(m->cmd[2].c_str());
+ pending_mdsmap.failed.insert(w);
+ pending_mdsmap.up.erase(w);
+ stringstream ss;
+ ss << "failed mds" << w;
+ string rs;
+ getline(ss, rs);
+ paxos->wait_for_commit(new Monitor::C_Command(mon, m, 0, rs, paxos->get_version()));
+ return true;
+ }
else if (m->cmd[1] == "compat" && m->cmd.size() == 4) {
uint64_t f = atoll(m->cmd[3].c_str());
if (m->cmd[2] == "rm_compat") {