From: John Spray Date: Mon, 23 Feb 2015 14:23:56 +0000 (+0000) Subject: mon: do not try and "deactivate" the last MDS X-Git-Tag: v0.93~8^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F3794%2Fhead;p=ceph.git mon: do not try and "deactivate" the last MDS Fixes: #10862 Signed-off-by: John Spray (cherry picked from commit a2867987bc561479733839c3891fa14bfcebb849) --- diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index 6566a97570a1..a9044ae24224 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -1328,13 +1328,12 @@ int MDSMonitor::filesystem_command( r = -EEXIST; ss << "mds." << who << " not active (" << ceph_mds_state_name(pending_mdsmap.get_state(who)) << ")"; - } else if ((pending_mdsmap.get_root() == who || - pending_mdsmap.get_tableserver() == who) && - pending_mdsmap.get_num_in_mds() > 1) { - r = -EBUSY; + } else if (pending_mdsmap.get_root() == who || + pending_mdsmap.get_tableserver() == who) { + r = -EINVAL; ss << "can't tell the root (" << pending_mdsmap.get_root() << ") or tableserver (" << pending_mdsmap.get_tableserver() - << " to deactivate unless it is the last mds in the cluster"; + << ") to deactivate"; } else if (pending_mdsmap.get_num_in_mds() <= size_t(pending_mdsmap.get_max_mds())) { r = -EBUSY; ss << "must decrease max_mds or else MDS will immediately reactivate";