]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "mon: add all_exit and exit commands"
authorJosh Durgin <josh.durgin@dreamhost.com>
Thu, 9 Jun 2011 23:57:52 +0000 (16:57 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Fri, 10 Jun 2011 00:43:33 +0000 (17:43 -0700)
This reverts commit 69092735c4b25c88ded58b17b1c198fafcf5931b.

src/mon/MDSMonitor.cc
src/mon/MDSMonitor.h
src/mon/Monitor.cc
src/mon/Monitor.h
src/mon/OSDMonitor.cc
src/mon/OSDMonitor.h

index f7e38ec5bab31a080657b027b7cf724b032d1e9e..9733d208305970f3c7806c58b421f57650227714 100644 (file)
@@ -1179,15 +1179,3 @@ void MDSMonitor::do_stop()
   if (propose_osdmap)
     mon->osdmon()->propose_pending();
 }
-
-void MDSMonitor::send_exits()
-{
-  vector<string> cmd;
-  cmd.push_back("exit");
-  cmd.push_back("immediately");
-  for (unsigned i = 0; i < mdsmap.get_max_mds(); ++i) {
-    if (mdsmap.is_active(i)) {
-      mon->send_command(mdsmap.get_inst(i), cmd, paxos->get_version());
-    }
-  }
-}
index e2675b8620f06f7201137d6cdf7a798107f1e152..e976122ee197e741943de08aa1b15bba9c7ecf11 100644 (file)
@@ -93,8 +93,6 @@ class MDSMonitor : public PaxosService {
   bool preprocess_command(MMonCommand *m);
   bool prepare_command(MMonCommand *m);
 
-  void send_exits();
-
   // beacons
   struct beacon_info_t {
     utime_t stamp;
index 256942846b941cfe99945294fbce5379f320bcd5..1b917071e16c3359a3aebde33f633a0b478e63a0 100644 (file)
@@ -329,15 +329,6 @@ void Monitor::handle_command(MMonCommand *m)
       reply_command(m, 0, "initiating cluster shutdown", 0);
       return;
     }
-    if (m->cmd[0] == "all_exit") {
-      send_exit_to_all();
-      reply_command(m, 0, "exiting", 0);
-      return;
-    }
-    if (m->cmd[0] == "exit") {
-      reply_command(m, 0, "exiting", 0);
-      exit(0);
-    }
 
     if (m->cmd[0] == "_injectargs") {
       dout(0) << "parsing injected options '" << m->cmd[1] << "'" << dendl;
@@ -616,18 +607,6 @@ void Monitor::inject_args(const entity_inst_t& inst, string& args)
   }
 }
 
-void Monitor::send_exit_to_all()
-{
-  dout(10) << "send_exit_to_all " << dendl;
-  osdmon()->send_exits();
-  mdsmon()->send_exits();
-  vector<string> cmd;
-  cmd.push_back("exit");
-  for (unsigned i = 0; i < monmap->size(); i++) {
-    send_command(monmap->get_inst(i), cmd, 0);
-  }
-}
-
 void Monitor::send_command(const entity_inst_t& inst,
                           const vector<string>& com, version_t version)
 {
index a780e004e01092d79260c2e8da8a6216a2cf9dd2..f55b44e0080a48d6f31cd48d8a13a1199fa93864 100644 (file)
@@ -220,7 +220,6 @@ public:
   void tick();
 
   void stop_cluster();
-  void send_exit_to_all();
 
   int mkfs(bufferlist& osdmapbl);
 
index 71ae6da243ea5f5858b3d2538723ec5ab7096287..8b47782d64b2d757384dc31ef83ecaba940a6539 100644 (file)
@@ -520,6 +520,7 @@ void OSDMonitor::_reported_failure(MOSDFailure *m)
   send_latest(m, m->get_epoch());
 }
 
+
 // boot --
 
 bool OSDMonitor::preprocess_boot(MOSDBoot *m)
@@ -2036,14 +2037,3 @@ void OSDMonitor::_pool_op(MPoolOp *m, int replyCode, epoch_t epoch, bufferlist *
   mon->send_reply(m, reply);
   m->put();
 }
-
-void OSDMonitor::send_exits()
-{
-  vector<string> cmd;
-  cmd.push_back("exit");
-  for (int i = 0; i < osdmap.get_max_osd(); ++i) {
-    if (osdmap.is_up(i)) {
-      mon->send_command(osdmap.get_inst(i), cmd, paxos->get_version());
-    }
-  }
-}
index 4a41b31827eb4c4fe132dc8252f50bd25bfc5628..126b50132cb337ec0b6284909faac40645ace51b 100644 (file)
@@ -178,8 +178,6 @@ private:
   void check_subs();
   void check_sub(Subscription *sub);
 
-  void send_exits();
-
   void add_flag(int flag) {
     if (!(osdmap.flags & flag)) {
       if (pending_inc.new_flags < 0)