From: Josh Durgin Date: Tue, 31 May 2011 21:15:01 +0000 (-0700) Subject: mon: ceph tell mds * is a valid command X-Git-Tag: v0.30~108^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=347dba4e04d262845aca80089032f9ed40c13c22;p=ceph.git mon: ceph tell mds * is a valid command Previously this fell through and returned -EINVAL to the user. Signed-off-by: Josh Durgin --- diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index 3d42add093cb5..b51dd384cf54c 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -561,9 +561,17 @@ bool MDSMonitor::preprocess_command(MMonCommand *m) 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;