mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
mon: obsolete osdmonitor_prepare_command
And the mon_advanced_debug_mode option that is only used in the context of osdmonitor_prepare_command. http://tracker.ceph.com/issues/9245 Fixes: #9245 Signed-off-by: Loic Dachary <loic-201408@dachary.org>
This commit is contained in:
parent
6f69837456
commit
2abc8f400f
@ -219,7 +219,6 @@ OPTION(mon_osd_min_down_reports, OPT_INT, 3) // number of times a down OSD m
|
||||
OPTION(mon_osd_force_trim_to, OPT_INT, 0) // force mon to trim maps to this point, regardless of min_last_epoch_clean (dangerous, use with care)
|
||||
OPTION(mon_mds_force_trim_to, OPT_INT, 0) // force mon to trim mdsmaps to this point (dangerous, use with care)
|
||||
|
||||
OPTION(mon_advanced_debug_mode, OPT_BOOL, false) // true for developper oriented testing
|
||||
// dump transactions
|
||||
OPTION(mon_debug_dump_transactions, OPT_BOOL, false)
|
||||
OPTION(mon_debug_dump_location, OPT_STR, "/var/log/ceph/$cluster-$name.tdump")
|
||||
|
@ -308,9 +308,6 @@ void Monitor::do_admin_command(string command, cmdmap_t& cmdmap, string format,
|
||||
} else if (command.find("add_bootstrap_peer_hint") == 0) {
|
||||
if (!_add_bootstrap_peer_hint(command, cmdmap, ss))
|
||||
goto abort;
|
||||
} else if (command.find("osdmonitor_prepare_command") == 0) {
|
||||
if (!_osdmonitor_prepare_command(cmdmap, ss))
|
||||
goto abort;
|
||||
} else if (command == "quorum enter") {
|
||||
elector.start_participating();
|
||||
start_election();
|
||||
@ -726,11 +723,6 @@ int Monitor::preinit()
|
||||
r = admin_socket->register_command("mon_status", "mon_status", admin_hook,
|
||||
"show current monitor status");
|
||||
assert(r == 0);
|
||||
if (g_conf->mon_advanced_debug_mode) {
|
||||
r = admin_socket->register_command("osdmonitor_prepare_command", "osdmonitor_prepare_command", admin_hook,
|
||||
"call OSDMonitor::prepare_command");
|
||||
assert(r == 0);
|
||||
}
|
||||
r = admin_socket->register_command("quorum_status", "quorum_status",
|
||||
admin_hook, "show current quorum status");
|
||||
assert(r == 0);
|
||||
@ -994,30 +986,6 @@ void Monitor::bootstrap()
|
||||
}
|
||||
}
|
||||
|
||||
bool Monitor::_osdmonitor_prepare_command(cmdmap_t& cmdmap, ostream& ss)
|
||||
{
|
||||
if (!is_leader()) {
|
||||
ss << "mon must be a leader";
|
||||
return false;
|
||||
}
|
||||
|
||||
string cmd;
|
||||
cmd_getval(g_ceph_context, cmdmap, "prepare", cmd);
|
||||
cmdmap["prefix"] = cmdmap["prepare"];
|
||||
|
||||
OSDMonitor *monitor = osdmon();
|
||||
MMonCommand *m = static_cast<MMonCommand *>((new MMonCommand())->get());
|
||||
bool r = true;
|
||||
if (monitor->prepare_command_impl(m, cmdmap)) {
|
||||
ss << "true";
|
||||
} else {
|
||||
ss << "false";
|
||||
r = false;
|
||||
}
|
||||
m->put();
|
||||
return r;
|
||||
}
|
||||
|
||||
bool Monitor::_add_bootstrap_peer_hint(string cmd, cmdmap_t& cmdmap, ostream& ss)
|
||||
{
|
||||
string addrstr;
|
||||
|
@ -647,7 +647,6 @@ public:
|
||||
const MonCommand *this_cmd);
|
||||
void get_mon_status(Formatter *f, ostream& ss);
|
||||
void _quorum_status(Formatter *f, ostream& ss);
|
||||
bool _osdmonitor_prepare_command(cmdmap_t& cmdmap, ostream& ss);
|
||||
bool _add_bootstrap_peer_hint(string cmd, cmdmap_t& cmdmap, ostream& ss);
|
||||
void handle_command(class MMonCommand *m);
|
||||
void handle_route(MRoute *m);
|
||||
|
@ -47,7 +47,6 @@ function run_mon() {
|
||||
--debug-mon 20 \
|
||||
--debug-ms 20 \
|
||||
--debug-paxos 20 \
|
||||
--mon-advanced-debug-mode \
|
||||
--chdir= \
|
||||
--mon-data=$dir \
|
||||
--log-file=$dir/log \
|
||||
|
Loading…
Reference in New Issue
Block a user