]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
MDSMonitor: handle standby already without fscid
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 9 Jan 2020 19:54:13 +0000 (11:54 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 9 Jan 2020 19:54:13 +0000 (11:54 -0800)
If prepare_beacon is called on an existing standby's beacon, then it
will handle any changes to get_fs() but if there's not been a change to
the empty case, the MDSMonitor will assert.

Fixes: https://tracker.ceph.com/issues/43542
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mds/FSMap.cc
src/mds/FSMap.h

index acd748f98895680cc30dd6423f7750a0008847ea..ab81c8d2ee8cb3bd137dec54ac8f8dbd44ad8fa0 100644 (file)
@@ -1057,10 +1057,10 @@ void FSMap::adjust_standby_fscid(mds_gid_t standby_gid,
   standby_daemon_fscid.at(standby_gid) = fscid;
 }
 
-void FSMap::clear_standby_fscid(mds_gid_t standby_gid)
+std::size_t FSMap::clear_standby_fscid(mds_gid_t standby_gid)
 {
   auto count = standby_daemon_fscid.erase(standby_gid);
-  ceph_assert(count);
+  return count;
 }
 
 std::vector<mds_gid_t> FSMap::stop(mds_gid_t who)
index 720b9c82a3c10b36638f519b0242c343622f3251..1c89bcd36eda9159ac9a493048a0c44b4c15f70e 100644 (file)
@@ -186,7 +186,7 @@ public:
    */
   void adjust_standby_fscid(mds_gid_t standby_gid,
                            fs_cluster_id_t fscid);
-  void clear_standby_fscid(mds_gid_t standby_gid);
+  std::size_t clear_standby_fscid(mds_gid_t standby_gid);
 
   /**
    * Assign an MDS cluster standby replay rank to a standby daemon