]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: do the shutdown in the right order 14952/head
authorKefu Chai <kchai@redhat.com>
Thu, 4 May 2017 08:50:08 +0000 (16:50 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 6 May 2017 14:45:16 +0000 (22:45 +0800)
Fixes: http://tracker.ceph.com/issues/19813
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mgr/MgrStandby.cc

index 99eb74db9378efd5a8de06004e2728c8b85f0978..1bfcadd71b45b5401219cf432a1ca2c1b4ddf1f5 100644 (file)
@@ -175,13 +175,19 @@ void MgrStandby::shutdown()
   // Expect already to be locked as we're called from signal handler
   assert(lock.is_locked_by_me());
 
+  // stop sending beacon first, i use monc to talk with monitors
+  timer.shutdown();
+  // client uses monc and objecter
+  client.shutdown();
+  // stop monc, so mon won't be able to instruct me to shutdown/activate after
+  // the active_mgr is stopped
+  monc.shutdown();
   if (active_mgr) {
     active_mgr->shutdown();
   }
-  client.shutdown();
+  // objecter is used by monc and active_mgr
   objecter.shutdown();
-  timer.shutdown();
-  monc.shutdown();
+  // client_messenger is used by all of them, so stop it in the end
   client_messenger->shutdown();
 }