]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: ceph tell mds * is a valid command
authorJosh Durgin <josh.durgin@dreamhost.com>
Tue, 31 May 2011 21:15:01 +0000 (14:15 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Tue, 7 Jun 2011 19:04:29 +0000 (12:04 -0700)
Previously this fell through and returned -EINVAL to the user.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
src/mon/MDSMonitor.cc

index 3d42add093cb5cef07265f7fa72d653e47d0b344..b51dd384cf54c5abc223d03b8b9ec23dcd353d54 100644 (file)
@@ -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;