Merge pull request #14896 from liewegas/wip-19638

osd: stop MgrClient callbacks on shutdown

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
This commit is contained in:
Sage Weil 2017-05-01 20:25:29 -05:00 committed by GitHub
commit 0bded75235
2 changed files with 3 additions and 0 deletions

View File

@ -95,6 +95,7 @@ public:
void set_pgstats_cb(std::function<MPGStats*()> cb_)
{
Mutex::Locker l(lock);
pgstats_cb = cb_;
}

View File

@ -2947,6 +2947,8 @@ int OSD::shutdown()
cct->_conf->set_val("debug_ms", "100");
cct->_conf->apply_changes(NULL);
mgrc.set_pgstats_cb(std::function<MPGStats*()>());
service.start_shutdown();
// stop sending work to pgs. this just prevents any new work in _process