From 5e7e017d7dca262a368a52d1e5a3b5844cbba592 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Tue, 5 Apr 2016 01:38:59 -0700 Subject: [PATCH] cephfs: update tests to enable multimds when needed Signed-off-by: Greg Farnum --- tasks/ceph.py | 7 +++++++ tasks/cephfs/test_failover.py | 6 +++++- tasks/cephfs/test_journal_repair.py | 2 ++ tasks/cephfs/test_sessionmap.py | 2 ++ tasks/cephfs/test_strays.py | 2 ++ 5 files changed, 18 insertions(+), 1 deletion(-) diff --git a/tasks/ceph.py b/tasks/ceph.py index 81f769c1a71cf..e41dfdbd82c39 100644 --- a/tasks/ceph.py +++ b/tasks/ceph.py @@ -287,6 +287,13 @@ def cephfs_setup(ctx, config): is_active_mds = lambda role: role.startswith('mds.') and not role.endswith('-s') and role.find('-s-') == -1 all_roles = [item for remote_roles in mdss.remotes.values() for item in remote_roles] num_active = len([r for r in all_roles if is_active_mds(r)]) + mon_remote.run(args=[ + 'sudo', + 'adjust-ulimits', + 'ceph-coverage', + coverage_dir, + 'ceph', 'mds', 'set', 'allow_multimds', 'true', + '--yes-i-really-mean-it']) mon_remote.run(args=[ 'sudo', 'adjust-ulimits', diff --git a/tasks/cephfs/test_failover.py b/tasks/cephfs/test_failover.py index acf2824ef7621..e7e7e6a7ac80a 100644 --- a/tasks/cephfs/test_failover.py +++ b/tasks/cephfs/test_failover.py @@ -160,7 +160,11 @@ class TestMultiFilesystems(CephFSTestCase): def setUp(self): super(TestMultiFilesystems, self).setUp() self.fs.mon_manager.raw_cluster_cmd("fs", "flag", "set", - "enable_multiple", "true") + "enable_multiple", "true", + "--yes-i-really-mean-it") + self.fs.mon_manager.raw_cluster_cmd("mds", "set", + "allow_multimds", "true", + "--yes-i-really-mean-it") def _setup_two(self): fs_a = self.mds_cluster.get_filesystem("alpha") diff --git a/tasks/cephfs/test_journal_repair.py b/tasks/cephfs/test_journal_repair.py index 31ba94cec2af6..9ee4924720241 100644 --- a/tasks/cephfs/test_journal_repair.py +++ b/tasks/cephfs/test_journal_repair.py @@ -160,6 +160,8 @@ class TestJournalRepair(CephFSTestCase): """ # Set max_mds to 2 + self.fs.mon_manager.raw_cluster_cmd_result('mds', 'set', "allow_multimds", + "true", "--yes-i-really-mean-it") self.fs.mon_manager.raw_cluster_cmd_result('mds', 'set', "max_mds", "2") # See that we have two active MDSs diff --git a/tasks/cephfs/test_sessionmap.py b/tasks/cephfs/test_sessionmap.py index 9ee0a7e87c6f6..adab12433121a 100644 --- a/tasks/cephfs/test_sessionmap.py +++ b/tasks/cephfs/test_sessionmap.py @@ -96,6 +96,8 @@ class TestSessionMap(CephFSTestCase): self.fs.wait_for_daemons() # I would like two MDSs, so that I can do an export dir later + self.fs.mon_manager.raw_cluster_cmd_result('mds', 'set', "allow_multimds", + "true", "--yes-i-really-mean-it") self.fs.mon_manager.raw_cluster_cmd_result('mds', 'set', "max_mds", "2") self.fs.wait_for_daemons() diff --git a/tasks/cephfs/test_strays.py b/tasks/cephfs/test_strays.py index 6e22be73954aa..e01e0a1ee9404 100644 --- a/tasks/cephfs/test_strays.py +++ b/tasks/cephfs/test_strays.py @@ -414,6 +414,8 @@ class TestStrays(CephFSTestCase): """ # Set up two MDSs + self.fs.mon_manager.raw_cluster_cmd_result('mds', 'set', "allow_multimds", + "true", "--yes-i-really-mean-it") self.fs.mon_manager.raw_cluster_cmd_result('mds', 'set', "max_mds", "2") # See that we have two active MDSs -- 2.39.5