]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: get fresh maps on second load of Mgr
authorJohn Spray <john.spray@redhat.com>
Wed, 5 Apr 2017 23:58:36 +0000 (19:58 -0400)
committerKefu Chai <kchai@redhat.com>
Sun, 30 Apr 2017 02:23:14 +0000 (10:23 +0800)
I think we got away with this when Client::init was
re-initialising the MonClient, but now that (bogus)
stuff isn't happening any more as Client doesn't
init/teardown monc/objecter itself.

Signed-off-by: John Spray <john.spray@redhat.com>
src/mgr/Mgr.cc

index f507a3526663782690fe4e229b23c2ce937e777a..a6f26cbcb8674a52fb8968e87e75feb3dabb87b7 100644 (file)
@@ -359,12 +359,16 @@ void Mgr::shutdown()
   Mutex::Locker l(lock);
 
   finisher.queue(new FunctionContext([&](int) {
+    monc->sub_unwant("log-info");
+    monc->sub_unwant("mgrdigest");
+    monc->sub_unwant("fsmap");
     // First stop the server so that we're not taking any more incoming
     // requests
     server.shutdown();
     // after the messenger is stopped, signal modules to shutdown via finisher
     py_modules.shutdown();
   }));
+
   // Then stop the finisher to ensure its enqueued contexts aren't going
   // to touch references to the things we're about to tear down
   finisher.wait_for_empty();