From e8657814a6275504dea0ca8da8a4bf30faa454c0 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Fri, 3 Oct 2014 16:10:30 +0200 Subject: [PATCH] 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 (cherry picked from commit 2abc8f400f7db256c2a30f1d0886a593e6c194eb) --- src/common/config_opts.h | 1 - src/mon/Monitor.cc | 32 -------------------------------- src/mon/Monitor.h | 1 - src/test/mon/mon-test-helpers.sh | 1 - 4 files changed, 35 deletions(-) diff --git a/src/common/config_opts.h b/src/common/config_opts.h index 765c1c0e76d16..16525a0352dae 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -218,7 +218,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") diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 84c66466e08bd..1536b2ed9c24e 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -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((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; diff --git a/src/mon/Monitor.h b/src/mon/Monitor.h index 0601771a36f6a..63423f29f4e6e 100644 --- a/src/mon/Monitor.h +++ b/src/mon/Monitor.h @@ -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); diff --git a/src/test/mon/mon-test-helpers.sh b/src/test/mon/mon-test-helpers.sh index aa729b1426319..1766193a58874 100644 --- a/src/test/mon/mon-test-helpers.sh +++ b/src/test/mon/mon-test-helpers.sh @@ -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 \ -- 2.39.5