]> git-server-git.apps.pok.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)
committerSage Weil <sage@newdream.net>
Thu, 18 Mar 2021 15:40:42 +0000 (10:40 -0500)
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>
src/mgr/Mgr.cc

index b8e1ec8e4aaad3c1cb2bf8deca0cd9923377d1a7..4b2cdf7c53685b506356802a06f1a2dcc4b95e12 100644 (file)
@@ -538,6 +538,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();
 }
@@ -648,9 +649,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