From: Patrick Donnelly Date: Tue, 15 Jan 2019 21:45:14 +0000 (-0800) Subject: MDSMonitor: add missing OSDMonitor writeable check X-Git-Tag: v14.1.0~336^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8ef68663d311f71d1598297c14fad39274ada41d;p=ceph.git MDSMonitor: add missing OSDMonitor writeable check Fixes: http://tracker.ceph.com/issues/37929 Signed-off-by: Patrick Donnelly --- diff --git a/src/mon/FSCommands.cc b/src/mon/FSCommands.cc index f1fe9eab8ae..f106acf5f28 100644 --- a/src/mon/FSCommands.cc +++ b/src/mon/FSCommands.cc @@ -677,6 +677,13 @@ class RemoveFilesystemHandler : public FileSystemCommandHandler const cmdmap_t& cmdmap, std::stringstream &ss) override { + /* We may need to blacklist ranks. */ + if (!mon->osdmon()->is_writeable()) { + // not allowed to write yet, so retry when we can + mon->osdmon()->wait_for_writeable(op, new PaxosService::C_RetryMessage(mon->mdsmon(), op)); + return -EAGAIN; + } + // Check caller has correctly named the FS to delete // (redundant while there is only one FS, but command // syntax should apply to multi-FS future) @@ -720,6 +727,9 @@ class RemoveFilesystemHandler : public FileSystemCommandHandler // wait for an osdmap propose here: ignore return value. mon->mdsmon()->fail_mds_gid(fsmap, gid); } + if (!to_fail.empty()) { + mon->osdmon()->propose_pending(); /* maybe new blacklists */ + } fsmap.erase_filesystem(fs->fscid);