From a4f6ceab053e96cc16a8f3edcbcb5fce877092cc Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Mon, 8 Nov 2021 14:55:05 -0500 Subject: [PATCH] mds: test connections to bootstrapping MDS Signed-off-by: Patrick Donnelly (cherry picked from commit 402919cbe65c9fa219a9ec7a0f6534c6e1479f03) Conflicts: src/common/options/mds.yaml.in: legacy option conversion --- .../fs/thrash/workloads/overrides/races.yaml | 5 ++++ qa/tasks/cephfs/test_failover.py | 10 ++++++++ src/common/options.cc | 10 ++++++++ src/mds/MDSRank.cc | 23 +++++++++++++++++-- 4 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 qa/suites/fs/thrash/workloads/overrides/races.yaml diff --git a/qa/suites/fs/thrash/workloads/overrides/races.yaml b/qa/suites/fs/thrash/workloads/overrides/races.yaml new file mode 100644 index 00000000000..e7d75389699 --- /dev/null +++ b/qa/suites/fs/thrash/workloads/overrides/races.yaml @@ -0,0 +1,5 @@ +overrides: + ceph: + conf: + mds: + mds_sleep_rank_change: 5000000.0 diff --git a/qa/tasks/cephfs/test_failover.py b/qa/tasks/cephfs/test_failover.py index f2032b23741..db33b10a86c 100644 --- a/qa/tasks/cephfs/test_failover.py +++ b/qa/tasks/cephfs/test_failover.py @@ -459,6 +459,16 @@ class TestFailover(CephFSTestCase): self.assertEqual(mds_0['gid'], self.fs.get_rank(rank=0)['gid']) self.fs.rank_freeze(False, rank=0) + def test_connect_bootstrapping(self): + self.config_set("mds", "mds_sleep_rank_change", 10000000.0) + self.config_set("mds", "mds_connect_bootstrapping", True) + self.fs.set_max_mds(2) + self.fs.wait_for_daemons() + self.fs.rank_fail(rank=0) + # rank 0 will get stuck in up:resolve, see https://tracker.ceph.com/issues/53194 + self.fs.wait_for_daemons() + + class TestStandbyReplay(CephFSTestCase): CLIENTS_REQUIRED = 0 MDSS_REQUIRED = 4 diff --git a/src/common/options.cc b/src/common/options.cc index 6a2115e15a0..a5d22fb6385 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -8874,6 +8874,16 @@ std::vector