From: Patrick Donnelly Date: Thu, 21 Jul 2022 20:28:08 +0000 (-0400) Subject: qa: test for standby-replay removal in MDSMonitor::prepare_beacon X-Git-Tag: v16.2.11~350^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e59b22fac2de199a4aea1fddfed1bf0d01dc1ff4;p=ceph.git qa: test for standby-replay removal in MDSMonitor::prepare_beacon Signed-off-by: Patrick Donnelly (cherry picked from commit 5495fe8c42095d3b8b97c4681e167e1ce5e73378) --- diff --git a/qa/tasks/cephfs/test_failover.py b/qa/tasks/cephfs/test_failover.py index db33b10a86c2..74548930976c 100644 --- a/qa/tasks/cephfs/test_failover.py +++ b/qa/tasks/cephfs/test_failover.py @@ -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