]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/MgrStandby: reset subscriptions when we become non-active
authorSage Weil <sage@redhat.com>
Tue, 23 May 2017 19:17:34 +0000 (15:17 -0400)
committerSage Weil <sage@redhat.com>
Fri, 2 Jun 2017 17:02:54 +0000 (13:02 -0400)
This is a goofy workaround that we're also doing in Mgr::init().  Someday
we should come up with a more elegant solution.  In the meantime, this
works just fine!

Signed-off-by: Sage Weil <sage@redhat.com>
src/mgr/MgrStandby.cc

index a6b76643b73376bdbdadc6b06cea0b29ea26f69d..3d68cfe7f7e01540a405ae59def48260de4cb394 100644 (file)
@@ -251,6 +251,11 @@ void MgrStandby::handle_mgr_map(MMgrMap* mmap)
       derr << "I was active but no longer am" << dendl;
       active_mgr->shutdown();
       active_mgr.reset();
+
+      // FIXME: reset monc connection so that our old subscriptions go away
+      // and we stop getting MLog and MMgrDigest messages.  (We do something
+      // similar in Mgr::init().)
+      monc.reopen_session();
     }
   }