]> git-server-git.apps.pok.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>
Fri, 19 Aug 2022 14:12:06 +0000 (10:12 -0400)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 5495fe8c42095d3b8b97c4681e167e1ce5e73378)

qa/tasks/cephfs/test_failover.py

index db33b10a86c2d2003542f5ad4d26a543ff3df741..74548930976c1a99f72ca275fa4c9fb998aed4fe 100644 (file)
@@ -620,6 +620,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