]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: remove `mds tell` command
authorJohn Spray <john.spray@redhat.com>
Thu, 16 Mar 2017 18:05:15 +0000 (18:05 +0000)
committerJohn Spray <john.spray@redhat.com>
Tue, 21 Mar 2017 15:26:05 +0000 (11:26 -0400)
Fixes: http://tracker.ceph.com/issues/19288
Signed-off-by: John Spray <john.spray@redhat.com>
src/mon/MDSMonitor.cc
src/mon/MonCommands.h

index 0758eca19d372bfa664a7d76a1d54033a66908f2..3b752e39cf9a470911f3a3128bbbac63b115f655 100644 (file)
@@ -952,48 +952,6 @@ bool MDSMonitor::preprocess_command(MonOpRequestRef op)
       ss << "got fsmap epoch " << fsmap.get_epoch();
       r = 0;
     }
-  } else if (prefix == "mds tell") {
-    string whostr;
-    cmd_getval(g_ceph_context, cmdmap, "who", whostr);
-    vector<string>args_vec;
-    cmd_getval(g_ceph_context, cmdmap, "args", args_vec);
-
-    if (whostr == "*") {
-      r = -ENOENT;
-      const auto info_map = fsmap.get_mds_info();
-      for (const auto &i : info_map) {
-       m->cmd = args_vec;
-       mon->send_command(i.second.get_inst(), m->cmd);
-       r = 0;
-      }
-      if (r == -ENOENT) {
-       ss << "no mds active";
-      } else {
-       ss << "ok";
-      }
-    } else {
-      if (fsmap.legacy_client_fscid) {
-        auto fs = fsmap.filesystems.at(fsmap.legacy_client_fscid);
-        errno = 0;
-        long who_l = strtol(whostr.c_str(), 0, 10);
-        if (!errno && who_l >= 0) {
-          mds_rank_t who = mds_rank_t(who_l);
-          if (fs->mds_map.is_up(who)) {
-            m->cmd = args_vec;
-            mon->send_command(fs->mds_map.get_inst(who), m->cmd);
-            r = 0;
-            ss << "ok";
-          } else {
-            ss << "mds." << who << " not up";
-            r = -ENOENT;
-          }
-        } else {
-          ss << "specify mds number or *";
-        }
-      } else {
-        ss << "no legacy filesystem set";
-      }
-    }
   } else if (prefix == "mds compat show") {
       if (f) {
        f->open_object_section("mds_compat");
index cefb2102cfef90d1474dda20c9f556436aeb1f5e..5a5dcb61d29b3bf84a69458868b95c157d56b885 100644 (file)
@@ -313,10 +313,10 @@ COMMAND_WITH_FLAG("mds getmap " \
 COMMAND("mds metadata name=who,type=CephString,req=false",
        "fetch metadata for mds <who>",
        "mds", "r", "cli,rest")
-COMMAND("mds tell " \
+COMMAND_WITH_FLAG("mds tell " \
        "name=who,type=CephString " \
        "name=args,type=CephString,n=N", \
-       "send command to particular mds", "mds", "rw", "cli,rest")
+       "send command to particular mds", "mds", "rw", "cli,rest", FLAG(OBSOLETE))
 COMMAND("mds compat show", "show mds compatibility settings", \
        "mds", "r", "cli,rest")
 COMMAND_WITH_FLAG("mds stop name=who,type=CephString", "stop mds", \