]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
OSD: stop mgrc earlier in shutdown() 14904/head
authorKefu Chai <kchai@redhat.com>
Tue, 2 May 2017 01:34:53 +0000 (09:34 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 2 May 2017 01:45:16 +0000 (09:45 +0800)
it's better this way, as MgrClient is more like an internal consumer
of the services offered by OSD, instead of service privider. it could
prevent future problem if we can stop it earlier in the shutdown
process.

see also: http://tracker.ceph.com/issues/19638
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/osd/OSD.cc

index d1bb2d96445eb9fd879e8928c57166efd3b182c1..8f290f1c3ec8a3850361b7cbb7aee0411abfb274 100644 (file)
@@ -2947,7 +2947,8 @@ int OSD::shutdown()
   cct->_conf->set_val("debug_ms", "100");
   cct->_conf->apply_changes(NULL);
 
-  mgrc.set_pgstats_cb(std::function<MPGStats*()>());
+  // stop MgrClient earlier as it's more like an internal consumer of OSD
+  mgrc.shutdown();
 
   service.start_shutdown();
 
@@ -3110,7 +3111,6 @@ int OSD::shutdown()
   store = 0;
   dout(10) << "Store synced" << dendl;
 
-  mgrc.shutdown();
   monc->shutdown();
   osd_lock.Unlock();