]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: obsolete osdmonitor_prepare_command
authorLoic Dachary <loic-201408@dachary.org>
Fri, 3 Oct 2014 14:10:30 +0000 (16:10 +0200)
committerLoic Dachary <loic-201408@dachary.org>
Fri, 3 Oct 2014 17:00:16 +0000 (19:00 +0200)
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>
(cherry picked from commit 2abc8f400f7db256c2a30f1d0886a593e6c194eb)

src/common/config_opts.h
src/mon/Monitor.cc
src/mon/Monitor.h
src/test/mon/mon-test-helpers.sh

index 765c1c0e76d160e7d063dbd59950bc7ada11dae2..16525a0352daed4c0a48d5f861c99ba7a128e8d8 100644 (file)
@@ -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")
index 84c66466e08bdfc6f470d47b81700739c9654fa0..1536b2ed9c24e891b9eae2f25d1112055af3bb32 100644 (file)
@@ -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;
index 0601771a36f6a034fec37f06f5d538b1dbe1bece..63423f29f4e6ee41c56e67de46da2fc55c1cde0c 100644 (file)
@@ -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);
index aa729b1426319cabb38ac40c874b4ff4826b1a3e..1766193a588742d02a1427a03dcf89ade39b0c1a 100644 (file)
@@ -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 \