]> git.apps.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 02:29:03 +0000 (21:29 -0500)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 1a3457be4ef049b4b9d6a202455fbc21c09524b9)

src/mon/MDSMonitor.cc

index ea341f2c96cdedda664dcf031d002c2d413a67be..c482c1c3c3a9a1542fe2f46bd513e4937b1a97fc 100644 (file)
@@ -1096,6 +1096,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();