]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: fix promotion test 43231/head
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 21 Sep 2021 00:07:42 +0000 (20:07 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 5 Oct 2021 23:57:18 +0000 (19:57 -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>
qa/tasks/cephfs/test_failover.py

index 5cc8ec0d5899150d0da356b6e3271b49401b079d..7791e090e0c6116fe0b9df0d5745605844d844e4 100644 (file)
@@ -306,8 +306,7 @@ class TestFailover(CephFSTestCase):
         in thrashing tests.
         """
 
-        # Need all my standbys up as well as the active daemons
-        self.wait_for_daemon_start()
+        grace = float(self.fs.get_config("mds_beacon_grace", service_type="mon"))
 
         (original_active, ) = self.fs.get_active_names()
         original_standbys = self.mds_cluster.get_standby_daemons()
@@ -315,18 +314,14 @@ class TestFailover(CephFSTestCase):
         # Kill the rank 0 daemon's physical process
         self.fs.mds_stop(original_active)
 
-        grace = float(self.fs.get_config("mds_beacon_grace", service_type="mon"))
-
         # 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=grace*2)
+        self.wait_until_true(promoted, timeout=grace*2)
 
         # Start the original rank 0 daemon up again, see that he becomes a standby
         self.fs.mds_restart(original_active)