From 75d8c011793a008f72c7249ac97cf2c5cb444502 Mon Sep 17 00:00:00 2001 From: John Spray Date: Mon, 23 Feb 2015 14:23:56 +0000 Subject: [PATCH] mon: do not try and "deactivate" the last MDS Fixes: #10862 Signed-off-by: John Spray (cherry picked from commit a2867987bc561479733839c3891fa14bfcebb849) --- src/mon/MDSMonitor.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index 6566a97570a..a9044ae2422 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"; -- 2.47.3