]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: tell monc when we get new servicemap, fsmap
authorSage Weil <sage@newdream.net>
Thu, 18 Mar 2021 15:40:42 +0000 (10:40 -0500)
committerPonnuvel Palaniyappan <pponnuvel@gmail.com>
Tue, 9 Nov 2021 14:33:01 +0000 (14:33 +0000)
Otherwise, when we re-subscribe we'll request an old map again.  In the
case of the servicemap, that can lead to a failed assertion.

Fixes: https://tracker.ceph.com/issues/48022
Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 3dbc1f0578d944217ad2bacb58ef561e678abb6c)

src/mgr/Mgr.cc

index e90db3119b6e07bdc84876b5860a9e4a25a89497..18ea0e98132f5d6ba9c39b095eb5b75acad6b2e9 100644 (file)
@@ -515,6 +515,7 @@ void Mgr::handle_log(ref_t<MLog> m)
 void Mgr::handle_service_map(ref_t<MServiceMap> m)
 {
   dout(10) << "e" << m->service_map.epoch << dendl;
+  monc->sub_got("servicemap", m->service_map.epoch);
   cluster_state.set_service_map(m->service_map);
   server.got_service_map();
 }
@@ -589,9 +590,10 @@ void Mgr::handle_fs_map(ref_t<MFSMap> m)
   ceph_assert(ceph_mutex_is_locked_by_me(lock));
 
   std::set<std::string> names_exist;
-  
   const FSMap &new_fsmap = m->get_fsmap();
 
+  monc->sub_got("fsmap", m->epoch);
+
   fs_map_cond.notify_all();
 
   // TODO: callers (e.g. from python land) are potentially going to see