]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: do not try and "deactivate" the last MDS 3794/head
authorJohn Spray <john.spray@redhat.com>
Mon, 23 Feb 2015 14:23:56 +0000 (14:23 +0000)
committerJohn Spray <john.spray@redhat.com>
Wed, 25 Feb 2015 14:12:31 +0000 (14:12 +0000)
Fixes: #10862
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit a2867987bc561479733839c3891fa14bfcebb849)

src/mon/MDSMonitor.cc

index 6566a97570a142f6d973b62a9e287707142cb820..a9044ae2422432dd47ecae5bfa4276a17fbec096 100644 (file)
@@ -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";