]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephfs: Kill allow_multimds
authorDouglas Fuller <dfuller@redhat.com>
Mon, 31 Jul 2017 18:23:55 +0000 (14:23 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 17 Apr 2018 18:01:03 +0000 (11:01 -0700)
With multi-mds now declared stable, allow_multimds now defaults to 1.
Given the max_mds parameter, it is now redundant. Remove it, leaving a
comment placeholder in the features bitmap.

ceph fs set <fs> allow_multimds is now deprecated and prints a warning
message.

Signed-off-by: Douglas Fuller <dfuller@redhat.com>
PendingReleaseNotes
qa/workunits/cephtool/test.sh
src/include/ceph_fs.h
src/mds/FSMap.cc
src/mds/MDSMap.cc
src/mds/MDSMap.h
src/mon/FSCommands.cc
src/mon/MonCommands.h
src/vstart.sh

index c8e3734626013cbd235966c26637f065ffbb5ea1..38bcc47fa8414d7fde706ec9bc78078af27b18c5 100644 (file)
       - mds remove_data_pool -> fs rm_data_pool
       - mds rm_data_pool -> fs rm_data_pool
 
+  * As the multiple MDS feature is now standard, it is now enabled by
+    default. ceph fs set allow_multimds is now deprecated and will be
+    removed in a future release.
+
   * New CephFS file system attributes session_timeout and session_autoclose
     are configurable via `ceph fs set`. The MDS config options
     mds_session_timeout, mds_session_autoclose, and mds_max_file_size are now
index b10a64f075b8cfba3979e0d007d0fc0213bfc91b..35b94e9b7214754d4ebcd39c4468f2e6e4873302 100755 (executable)
@@ -934,9 +934,7 @@ function test_mon_mds()
   ceph fs rm_data_pool cephfs $data3_pool
   ceph osd pool delete data2 data2 --yes-i-really-really-mean-it
   ceph osd pool delete data3 data3 --yes-i-really-really-mean-it
-  ceph fs set cephfs allow_multimds false
   expect_false ceph fs set cephfs max_mds 4
-  ceph fs set cephfs allow_multimds true
   ceph fs set cephfs max_mds 4
   ceph fs set cephfs max_mds 3
   ceph fs set cephfs max_mds 256
index b3c32dd18882db622af707418848cb363a2e100d..3fada89a77db03c29163919ceed1ed220f6d4f98 100644 (file)
@@ -233,13 +233,13 @@ struct ceph_mon_subscribe_ack {
  */
 #define CEPH_MDSMAP_DOWN    (1<<0)  /* cluster deliberately down */
 #define CEPH_MDSMAP_ALLOW_SNAPS   (1<<1)  /* cluster allowed to create snapshots */
-#define CEPH_MDSMAP_ALLOW_MULTIMDS (1<<2) /* cluster allowed to have >1 active MDS */
+/* deprecated #define CEPH_MDSMAP_ALLOW_MULTIMDS (1<<2) cluster allowed to have >1 active MDS */
 #define CEPH_MDSMAP_ALLOW_DIRFRAGS (1<<3) /* cluster allowed to fragment directories */
 
-#define CEPH_MDSMAP_ALLOW_CLASSICS (CEPH_MDSMAP_ALLOW_SNAPS | CEPH_MDSMAP_ALLOW_MULTIMDS | \
+#define CEPH_MDSMAP_ALLOW_CLASSICS (CEPH_MDSMAP_ALLOW_SNAPS | \
                                    CEPH_MDSMAP_ALLOW_DIRFRAGS)
 
-#define CEPH_MDSMAP_DEFAULTS CEPH_MDSMAP_ALLOW_DIRFRAGS | CEPH_MDSMAP_ALLOW_MULTIMDS
+#define CEPH_MDSMAP_DEFAULTS CEPH_MDSMAP_ALLOW_DIRFRAGS
 
 /*
  * mds states
index 9831c605b0d7ed3391ab056da642911161fdcd1c..a7e3cbcc1b77aa634dabe90c4ff4447366f05554 100644 (file)
@@ -498,9 +498,6 @@ void FSMap::decode(bufferlist::iterator& p)
        decode(flag, p);
        legacy_mds_map.explicitly_allowed_features = flag ?
          CEPH_MDSMAP_ALLOW_SNAPS : 0;
-       if (legacy_mds_map.max_mds > 1) {
-         legacy_mds_map.set_multimds_allowed();
-       }
       } else {
        decode(legacy_mds_map.ever_allowed_features, p);
        decode(legacy_mds_map.explicitly_allowed_features, p);
@@ -508,9 +505,6 @@ void FSMap::decode(bufferlist::iterator& p)
     } else {
       legacy_mds_map.ever_allowed_features = CEPH_MDSMAP_ALLOW_CLASSICS;
       legacy_mds_map.explicitly_allowed_features = 0;
-      if (legacy_mds_map.max_mds > 1) {
-       legacy_mds_map.set_multimds_allowed();
-      }
     }
     if (ev >= 7)
       decode(legacy_mds_map.inline_data_enabled, p);
index 909c2141d97fbac6370e78b0c4d59d8235c320ed..f47427383cf859aac537b0eb7ec5a759d3c1050c 100644 (file)
@@ -755,12 +755,9 @@ void MDSMap::decode(bufferlist::iterator& p)
       bool flag;
       decode(flag, p);
       ever_allowed_features = flag ? CEPH_MDSMAP_ALLOW_SNAPS : 0;
-      ever_allowed_features |= CEPH_MDSMAP_ALLOW_MULTIMDS|CEPH_MDSMAP_ALLOW_DIRFRAGS;
+      ever_allowed_features |= CEPH_MDSMAP_ALLOW_DIRFRAGS;
       decode(flag, p);
       explicitly_allowed_features = flag ? CEPH_MDSMAP_ALLOW_SNAPS : 0;
-      if (max_mds > 1) {
-       set_multimds_allowed();
-      }
     } else {
       decode(ever_allowed_features, p);
       decode(explicitly_allowed_features, p);
@@ -768,9 +765,6 @@ void MDSMap::decode(bufferlist::iterator& p)
   } else {
     ever_allowed_features = CEPH_MDSMAP_ALLOW_CLASSICS;
     explicitly_allowed_features = 0;
-    if (max_mds > 1) {
-      set_multimds_allowed();
-    }
   }
   if (ev >= 7)
     decode(inline_data_enabled, p);
index c5d41949820633652e327044750ad27994a20940..2a8c1070dd5e67e9a3611e0bcdf18c227d3c5155 100644 (file)
@@ -282,14 +282,6 @@ public:
   void clear_snaps_allowed() { clear_flag(CEPH_MDSMAP_ALLOW_SNAPS); }
   bool allows_snaps() const { return test_flag(CEPH_MDSMAP_ALLOW_SNAPS); }
 
-  void set_multimds_allowed() {
-    set_flag(CEPH_MDSMAP_ALLOW_MULTIMDS);
-    ever_allowed_features |= CEPH_MDSMAP_ALLOW_MULTIMDS;
-    explicitly_allowed_features |= CEPH_MDSMAP_ALLOW_MULTIMDS;
-  }
-  void clear_multimds_allowed() { clear_flag(CEPH_MDSMAP_ALLOW_MULTIMDS); }
-  bool allows_multimds() const { return test_flag(CEPH_MDSMAP_ALLOW_MULTIMDS); }
-
   void set_dirfrags_allowed() {
     set_flag(CEPH_MDSMAP_ALLOW_DIRFRAGS);
     ever_allowed_features |= CEPH_MDSMAP_ALLOW_DIRFRAGS;
index 3b0be2b4f428998eeb04d86b99196d1c1a13da58..03498e3a49e641f4a174d5cf67d2587c6911cd2e 100644 (file)
@@ -263,13 +263,6 @@ public:
         return -EINVAL;
       }
 
-      mds_rank_t oldmax = fs->mds_map.get_max_mds();
-
-      if (!fs->mds_map.allows_multimds() && n > oldmax &&
-         n > 1) {
-       ss << "multi-MDS clusters are not enabled; set 'allow_multimds' to enable";
-       return -EINVAL;
-      }
       if (n > MAX_MDS) {
         ss << "may not have more than " << MAX_MDS << " MDS ranks";
         return -EINVAL;
@@ -377,28 +370,7 @@ public:
        ss << "enabled new snapshots";
       }
     } else if (var == "allow_multimds") {
-      bool enable_multimds = false;
-      int r = parse_bool(val, &enable_multimds, ss);
-      if (r != 0) {
-       return r;
-      }
-
-      if (!enable_multimds) {
-       fsmap.modify_filesystem(fs->fscid,
-            [](std::shared_ptr<Filesystem> fs)
-               {
-                 fs->mds_map.clear_multimds_allowed();
-               });
-       ss << "disallowed increasing the cluster size past 1";
-      } else {
-        fsmap.modify_filesystem(
-            fs->fscid,
-            [](std::shared_ptr<Filesystem> fs)
-        {
-          fs->mds_map.set_multimds_allowed();
-        });
-       ss << "enabled creation of more than 1 active MDS";
-      }
+          ss << "Multiple MDS is always enabled. Use the max_mds parameter to control the number of active MDSs allowed. This command is DEPRECATED and will be REMOVED from future releases.";
     } else if (var == "allow_dirfrags") {
       bool enable_dirfrags = false;
       int r = parse_bool(val, &enable_dirfrags, ss);
index d6c4634c5601b36ebf58a9bfffb00b1dac21be5f..9daefb0671d710c36dedec72f38e08c3fe1f9063 100644 (file)
@@ -385,7 +385,7 @@ COMMAND("fs get name=fs_name,type=CephString", \
 COMMAND("fs set " \
        "name=fs_name,type=CephString " \
        "name=var,type=CephChoices,strings=max_mds|max_file_size"
-        "|allow_new_snaps|inline_data|cluster_down|allow_multimds|allow_dirfrags|balancer" \
+        "|allow_new_snaps|inline_data|cluster_down|allow_dirfrags|balancer" \
         "|standby_count_wanted|session_timeout|session_autoclose " \
        "name=val,type=CephString "                                     \
        "name=confirm,type=CephString,req=false",                       \
index 878730ae4cfd52ae331e9918796cd9a1496c736d..a372aefc3d88a141620f07295c85a714501d92f8 100755 (executable)
@@ -946,7 +946,6 @@ do
     [ $fs -eq $CEPH_NUM_FS ] && break
     fs=$(($fs + 1))
     if [ "$CEPH_MAX_MDS" -gt 1 ]; then
-        ceph_adm fs set "cephfs_${name}" allow_multimds true --yes-i-really-mean-it
         ceph_adm fs set "cephfs_${name}" max_mds "$CEPH_MAX_MDS"
     fi
 done