From: Kefu Chai Date: Thu, 4 May 2017 08:50:08 +0000 (+0800) Subject: mgr: do the shutdown in the right order X-Git-Tag: v12.0.3~52^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F14952%2Fhead;p=ceph.git mgr: do the shutdown in the right order Fixes: http://tracker.ceph.com/issues/19813 Signed-off-by: Kefu Chai --- diff --git a/src/mgr/MgrStandby.cc b/src/mgr/MgrStandby.cc index 99eb74db9378..1bfcadd71b45 100644 --- a/src/mgr/MgrStandby.cc +++ b/src/mgr/MgrStandby.cc @@ -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(); }