summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-06-12 16:56:45 -0700
committerSage Weil <sage@inktank.com>2013-06-13 09:26:52 -0700
commit6160e503426fffee0044029c9746c0af01594d2d (patch)
tree22d05d6ba81f021a0d31e6bed2e60abbfd9e958e
parent8adf88a2d5fee1c5ad832ddbb1b3bf1e69f977dc (diff)
downloadceph-6160e503426fffee0044029c9746c0af01594d2d.tar.gz
mon: remove support for 'mon tell ...' and 'osd tell ...'
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>
-rw-r--r--src/mon/MonCommands.h8
-rw-r--r--src/mon/MonmapMonitor.cc47
2 files changed, 0 insertions, 55 deletions
diff --git a/src/mon/MonCommands.h b/src/mon/MonCommands.h
index 4e64a0a70d4..bc6bc18f6a3 100644
--- a/src/mon/MonCommands.h
+++ b/src/mon/MonCommands.h
@@ -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")
diff --git a/src/mon/MonmapMonitor.cc b/src/mon/MonmapMonitor.cc
index 90839b7706f..2b5ede0b5ed 100644
--- a/src/mon/MonmapMonitor.cc
+++ b/src/mon/MonmapMonitor.cc
@@ -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;