From: Douglas Fuller Date: Mon, 31 Jul 2017 18:23:55 +0000 (-0400) Subject: cephfs: Kill allow_multimds X-Git-Tag: v13.1.0~200^2~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ae3992ce4f730979fc3e3a04f3840af3ce206734;p=ceph.git cephfs: Kill allow_multimds 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 allow_multimds is now deprecated and prints a warning message. Signed-off-by: Douglas Fuller --- diff --git a/PendingReleaseNotes b/PendingReleaseNotes index c8e3734626013..38bcc47fa8414 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -33,6 +33,10 @@ - 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 diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index b10a64f075b8c..35b94e9b72147 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -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 diff --git a/src/include/ceph_fs.h b/src/include/ceph_fs.h index b3c32dd18882d..3fada89a77db0 100644 --- a/src/include/ceph_fs.h +++ b/src/include/ceph_fs.h @@ -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 diff --git a/src/mds/FSMap.cc b/src/mds/FSMap.cc index 9831c605b0d7e..a7e3cbcc1b77a 100644 --- a/src/mds/FSMap.cc +++ b/src/mds/FSMap.cc @@ -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); diff --git a/src/mds/MDSMap.cc b/src/mds/MDSMap.cc index 909c2141d97fb..f47427383cf85 100644 --- a/src/mds/MDSMap.cc +++ b/src/mds/MDSMap.cc @@ -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); diff --git a/src/mds/MDSMap.h b/src/mds/MDSMap.h index c5d4194982063..2a8c1070dd5e6 100644 --- a/src/mds/MDSMap.h +++ b/src/mds/MDSMap.h @@ -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; diff --git a/src/mon/FSCommands.cc b/src/mon/FSCommands.cc index 3b0be2b4f4289..03498e3a49e64 100644 --- a/src/mon/FSCommands.cc +++ b/src/mon/FSCommands.cc @@ -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 fs) - { - fs->mds_map.clear_multimds_allowed(); - }); - ss << "disallowed increasing the cluster size past 1"; - } else { - fsmap.modify_filesystem( - fs->fscid, - [](std::shared_ptr 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); diff --git a/src/mon/MonCommands.h b/src/mon/MonCommands.h index d6c4634c5601b..9daefb0671d71 100644 --- a/src/mon/MonCommands.h +++ b/src/mon/MonCommands.h @@ -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", \ diff --git a/src/vstart.sh b/src/vstart.sh index 878730ae4cfd5..a372aefc3d88a 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -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