]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
MDS: add admin socket cleanup on shutdown 1809/head
authorGreg Farnum <greg@inktank.com>
Fri, 16 May 2014 22:15:55 +0000 (15:15 -0700)
committerGreg Farnum <greg@inktank.com>
Fri, 16 May 2014 22:15:55 +0000 (15:15 -0700)
Signed-off-by: Greg Farnum <greg@inktank.com>
src/mds/MDS.cc
src/mds/MDS.h

index 674e2fa77d07da67c3f767326eb3bb31c37d041b..3c54ab949e501f27929f464bc6ec0056cb263fde 100644 (file)
@@ -248,6 +248,16 @@ void MDS::set_up_admin_socket()
   assert(0 == r);
 }
 
+void MDS::clean_up_admin_socket()
+{
+  AdminSocket *admin_socket = g_ceph_context->get_admin_socket();
+  admin_socket->unregister_command("status");
+  admin_socket->unregister_command("dump_ops_in_flight");
+  admin_socket->unregister_command("dump_historic_ops");
+  delete asok_hook;
+  asok_hook = NULL;
+}
+
 const char** MDS::get_tracked_conf_keys() const
 {
   static const char* KEYS[] = {
@@ -1757,6 +1767,8 @@ void MDS::suicide()
   //timer.join();
   timer.shutdown();
   
+  clean_up_admin_socket();
+
   // shut down cache
   mdcache->shutdown();
 
index 5932e1aa821dd7be7ab0bfecf57a3d1fdeb1ba22..b126bd20a4f53c970cbfb8dee9fe2ad57ac9dd92 100644 (file)
@@ -366,6 +366,7 @@ class MDS : public Dispatcher, public md_config_obs_t {
   bool asok_command(string command, cmdmap_t& cmdmap, string format,
                    ostream& ss);
   void set_up_admin_socket();
+  void clean_up_admin_socket();
   void check_ops_in_flight(); // send off any slow ops to monitor
     // config observer bits
   virtual const char** get_tracked_conf_keys() const;