From: Sage Weil Date: Wed, 17 Feb 2010 17:18:16 +0000 (-0800) Subject: mon: disable 'osd setmap' X-Git-Tag: v0.19~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=801d248ae8b7b9a6149ae9d691cea7ea97aa65b2;p=ceph.git mon: disable 'osd setmap' This is dangerous, since it doesn't preserve old pool ids or pool_max, and will confuse osds and generally wreak havoc. --- diff --git a/src/TODO b/src/TODO index 6af90b56efe..d61544d8385 100644 --- a/src/TODO +++ b/src/TODO @@ -54,8 +54,6 @@ v0.20 bugs -- './ceph osd setmap foo -i foo' will clobber old pools. - - dbench 1, restart mds (may take a few times), dbench will error out. - rm -r failure (on kernel tree) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 61947592439..df2ca6af96f 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -1036,7 +1036,7 @@ bool OSDMonitor::prepare_command(MMonCommand *m) paxos->wait_for_commit(new Monitor::C_Command(mon, m, 0, rs, paxos->get_version())); return true; } - else if (m->cmd[1] == "setmap" && m->cmd.size() == 3) { + /*else if (m->cmd[1] == "setmap" && m->cmd.size() == 3) { OSDMap map; map.decode(m->get_data()); epoch_t e = atoi(m->cmd[2].c_str()); @@ -1053,6 +1053,7 @@ bool OSDMonitor::prepare_command(MMonCommand *m) ss << "osdmap fsid " << map.fsid << " does not match monitor fsid " << mon->monmap->fsid; err = -EINVAL; } + */ else if (m->cmd[1] == "setmaxosd" && m->cmd.size() > 2) { pending_inc.new_max_osd = atoi(m->cmd[2].c_str()); ss << "set new max_osd = " << pending_inc.new_max_osd;