]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
MDSMonitor: codify constraint for writeable OSDMap
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 15 Jan 2019 20:58:13 +0000 (12:58 -0800)
committerPrashant D <pdhange@redhat.com>
Tue, 22 Jan 2019 01:26:32 +0000 (20:26 -0500)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 1a3457be4ef049b4b9d6a202455fbc21c09524b9)

src/mon/MDSMonitor.cc

index 7be5f14f77a65b808a1103974a4829587eb50b46..c8d1701a054e0078f081433fa78941e6586bf660 100644 (file)
@@ -1255,6 +1255,8 @@ bool MDSMonitor::fail_mds_gid(FSMap &fsmap, mds_gid_t gid)
   const MDSMap::mds_info_t &info = fsmap.get_info_gid(gid);
   dout(1) << "fail_mds_gid " << gid << " mds." << info.name << " role " << info.rank << dendl;
 
+  ceph_assert(mon->osdmon()->is_writeable());
+
   epoch_t blacklist_epoch = 0;
   if (info.rank >= 0 && info.state != MDSMap::STATE_STANDBY_REPLAY) {
     utime_t until = ceph_clock_now();