Previously this fell through and returned -EINVAL to the user.
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
m->cmd.erase(m->cmd.begin());
if (m->cmd[0] == "*") {
m->cmd.erase(m->cmd.begin()); //and now we're done with the target num
+ r = -ENOENT;
for (unsigned i = 0; i < mdsmap.get_max_mds(); ++i) {
- if (mdsmap.is_active(i))
+ if (mdsmap.is_active(i)) {
mon->send_command(mdsmap.get_inst(i), m->cmd, paxos->get_version());
+ r = 0;
+ }
+ }
+ if (r == -ENOENT) {
+ ss << "no mds active";
+ } else {
+ ss << "ok";
}
} else {
errno = 0;