]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: test for standby-replay removal in MDSMonitor::prepare_beacon
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 21 Jul 2022 20:28:08 +0000 (16:28 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Mon, 25 Jul 2022 13:57:15 +0000 (09:57 -0400)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
qa/tasks/cephfs/test_failover.py

index 7147807bf521cc4e770d5eae1c5affdbae601391..8fb9f2775a935eb5ef97eebf6e703854b2feae30 100644 (file)
@@ -602,6 +602,25 @@ class TestStandbyReplay(CephFSTestCase):
             self.fs.mds_restart(mds_id=victim['name'])
             status = self._confirm_single_replay(status=status)
 
+    def test_standby_replay_prepare_beacon(self):
+        """
+        That a MDSMonitor::prepare_beacon handles standby-replay daemons
+        correctly without removing the standby. (Note, usually a standby-replay
+        beacon will just be replied to by MDSMonitor::preprocess_beacon.)
+        """
+
+        status = self._confirm_no_replay()
+        self.fs.set_max_mds(1)
+        self.fs.set_allow_standby_replay(True)
+        status = self._confirm_single_replay()
+        replays = list(status.get_replays(self.fs.id))
+        self.assertEqual(len(replays), 1)
+        self.config_set('mds.'+replays[0]['name'], 'mds_inject_health_dummy', True)
+        time.sleep(10) # for something not to happen...
+        status = self._confirm_single_replay()
+        replays2 = list(status.get_replays(self.fs.id))
+        self.assertEqual(replays[0]['gid'], replays2[0]['gid'])
+
     def test_rank_stopped(self):
         """
         That when a rank is STOPPED, standby replays for