]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: fix promotion test 50756/head
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 21 Sep 2021 00:07:42 +0000 (20:07 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Mon, 10 Apr 2023 15:21:01 +0000 (11:21 -0400)
The test is not needing to check that the new MDS becomes active, only
that a replacement occurs.

Fixes: https://tracker.ceph.com/issues/52677
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit b56623342e76aa956c37c6a27b21983ff681fe66)

qa/tasks/cephfs/test_failover.py

index 3d7637112b8b3c810761ebfcd72113c11759dd9b..bc1657b096849953d0a34e9a586485366c346532 100644 (file)
@@ -310,9 +310,6 @@ class TestFailover(CephFSTestCase):
         in thrashing tests.
         """
 
-        # Need all my standbys up as well as the active daemons
-        self.wait_for_daemon_start()
-
         (original_active, ) = self.fs.get_active_names()
         original_standbys = self.mds_cluster.get_standby_daemons()
 
@@ -321,12 +318,12 @@ class TestFailover(CephFSTestCase):
 
         # Wait until the monitor promotes his replacement
         def promoted():
-            active = self.fs.get_active_names()
-            return active and active[0] in original_standbys
+            ranks = list(self.fs.get_ranks())
+            return len(ranks) > 0 and ranks[0]['name'] in original_standbys
 
         log.info("Waiting for promotion of one of the original standbys {0}".format(
             original_standbys))
-        self.wait_until_true(promoted, timeout=self.fs.beacon_timeout)
+        self.wait_until_true(promoted, timeout=self.fs.beacon_timeout*2)
 
         # Start the original rank 0 daemon up again, see that he becomes a standby
         self.fs.mds_restart(original_active)