]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: remove support for 'mon tell ...' and 'osd tell ...'
authorSage Weil <sage@inktank.com>
Wed, 12 Jun 2013 23:56:45 +0000 (16:56 -0700)
committerSage Weil <sage@inktank.com>
Thu, 13 Jun 2013 16:26:52 +0000 (09:26 -0700)
It doesn't work.  The commands the ceph cli sends are vector<string>, and
the mon expects json.

Leave the MDS on in place since ceph-mds still takes strings.

Signed-off-by: Sage Weil <sage@inktank.com>
src/mon/MonCommands.h
src/mon/MonmapMonitor.cc

index 4e64a0a70d497039c181dd34c418856a158ff918..bc6bc18f6a3cca1f4610c77ad2e419cd9a9df09a 100644 (file)
@@ -259,10 +259,6 @@ COMMAND("mon stat", "summarize monitor status")
 COMMAND("mon getmap " \
        "name=epoch,type=CephInt,range=0,req=false", \
        "get monmap")
-COMMAND("mon tell " \
-       "name=who,type=CephString " \
-       "name=args,type=CephString,n=N", \
-       "send command to specific monitor(s)")
 COMMAND("mon add " \
        "name=name,type=CephString " \
        "name=addr,type=CephIPAddr", \
@@ -289,10 +285,6 @@ COMMAND("osd getcrushmap " \
        "name=epoch,type=CephInt,range=0,req=false", \
        "get CRUSH map")
 COMMAND("osd getmaxosd", "show largest OSD id")
-COMMAND("osd tell " \
-       "name=who,type=CephString " \
-       "name=args,type=CephString,n=N", \
-       "send command to particular osd")
 COMMAND("osd find " \
        "name=id,type=CephInt,range=0", \
        "find osd <id> in the CRUSH map and show its location")
index 90839b7706f0117140aeb3eba7dba4e813f7913b..2b5ede0b5ed304aead7420c28853cf087b4c585d 100644 (file)
@@ -264,53 +264,6 @@ bool MonmapMonitor::preprocess_command(MMonCommand *m)
       if (p != mon->monmap)
        delete p;
     }
-  } else if (prefix == "mon tell") {
-    dout(20) << "got tell: " << m->cmd << dendl;
-    string whostr;
-    cmd_getval(g_ceph_context, cmdmap, "who", whostr);
-    vector<string> argvec;
-    cmd_getval(g_ceph_context, cmdmap, "args", argvec);
-
-    if (whostr == "*") { // send to all mons and do myself
-      for (unsigned i = 0; i < mon->monmap->size(); ++i) {
-       MMonCommand *newm = new MMonCommand(m->fsid, m->version);
-       newm->cmd.insert(newm->cmd.begin(), argvec.begin(), argvec.end());
-       mon->messenger->send_message(newm, mon->monmap->get_inst(i));
-      }
-      ss << "bcast to all mons";
-      r = 0;
-    } else {
-      // find target.  Ignore error from parsing long as we probably
-      // have a string instead
-      long who = parse_pos_long(whostr.c_str(), NULL);
-      EntityName name;
-      if (who < 0) {
-
-       // not numeric; try as name or id, and see if in monmap
-       if (!name.from_str(whostr))
-         name.set("mon", whostr);
-
-       if (mon->monmap->contains(name.get_id())) {
-         who = mon->monmap->get_rank(name.get_id());
-       } else {
-         ss << "bad mon name \"" << whostr << "\"";
-         r = -ENOENT;
-         goto out;
-       }
-      } else if (who >= (long)mon->monmap->size()) {
-       ss << "mon." << whostr << " does not exist";
-       r = -ENOENT;
-       goto out;
-      }
-
-      // send to target, or handle if it's me
-      stringstream ss;
-      MMonCommand *newm = new MMonCommand(m->fsid, m->version);
-      newm->cmd.insert(newm->cmd.begin(), argvec.begin(), argvec.end());
-      mon->messenger->send_message(newm, mon->monmap->get_inst(who));
-      ss << "fw to mon." << whostr;
-      r = 0;
-    }
   }
   else if (prefix == "mon add")
     return false;