summaryrefslogtreecommitdiffstats
path: root/src/mon/FSCommands.cc
diff options
context:
space:
mode:
authorPatrick Donnelly <pdonnell@redhat.com>2023-06-23 23:01:00 +0200
committerPatrick Donnelly <pdonnell@redhat.com>2023-12-12 17:23:29 +0100
commit47342a8b3ce1ee998ac70687468253135e29f46b (patch)
tree0f6829b6f913ec075b9a7f0dc268426432d84e1d /src/mon/FSCommands.cc
parentMerge pull request #54337 from batrick/i63433 (diff)
downloadceph-47342a8b3ce1ee998ac70687468253135e29f46b.tar.xz
ceph-47342a8b3ce1ee998ac70687468253135e29f46b.zip
mds: add balance_automate fs setting
To turn off the automatic ("default") balancer in multiple MDS clusters. The new default is "off" as the balancer is a constant source of problems and surprise for administrators trying multiple actives. Instead, it should be a deliberate decision to turn it on and usually with customization like the "bal_rank_mask" setting or pinning. Fixes: https://tracker.ceph.com/issues/61378 Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Diffstat (limited to 'src/mon/FSCommands.cc')
-rw-r--r--src/mon/FSCommands.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mon/FSCommands.cc b/src/mon/FSCommands.cc
index 2faba87f73d..26061996907 100644
--- a/src/mon/FSCommands.cc
+++ b/src/mon/FSCommands.cc
@@ -665,6 +665,21 @@ public:
}
};
fsmap.modify_filesystem(fsp->get_fscid(), std::move(f));
+ } else if (var == "balance_automate") {
+ bool allow = false;
+ int r = parse_bool(val, &allow, ss);
+ if (r != 0) {
+ return r;
+ }
+
+ auto f = [allow](auto&& fs) {
+ if (allow) {
+ fs.get_mds_map().set_balance_automate();
+ } else {
+ fs.get_mds_map().clear_balance_automate();
+ }
+ };
+ fsmap.modify_filesystem(fsp->get_fscid(), std::move(f));
} else if (var == "min_compat_client") {
auto vno = ceph_release_from_name(val.c_str());
if (!vno) {