]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/cephfs: make test_journal_repair work with more daemons
authorJohn Spray <john.spray@redhat.com>
Mon, 14 Nov 2016 16:57:08 +0000 (16:57 +0000)
committerJohn Spray <john.spray@redhat.com>
Wed, 7 Dec 2016 00:46:12 +0000 (00:46 +0000)
Previously this assumed it was running with exactly two MDS
daemons.  When there were more, it would fail to execute
"fs reset" because the extra daemons were active in
the map.

Signed-off-by: John Spray <john.spray@redhat.com>
tasks/cephfs/test_journal_repair.py

index 68cac7de48103c686c2fd2025497502024aff5b2..4b108061d41f890c35dfca3e1c4f4e7e86ddbeea 100644 (file)
@@ -169,6 +169,11 @@ class TestJournalRepair(CephFSTestCase):
                               reject_fn=lambda v: v > 2 or v < 1)
         active_mds_names = self.fs.get_active_names()
 
+        # Switch off any unneeded MDS daemons
+        for unneeded_mds in set(self.mds_cluster.mds_ids) - set(active_mds_names):
+            self.mds_cluster.mds_stop(unneeded_mds)
+            self.mds_cluster.mds_fail(unneeded_mds)
+
         # Do a bunch of I/O such that at least some will hit the second MDS: create
         # lots of directories so that the balancer should find it easy to make a decision
         # to allocate some of them to the second mds.