From: Patrick Donnelly Date: Thu, 25 Jul 2019 21:42:12 +0000 (-0700) Subject: qa: wait for MDS to come back after removing it X-Git-Tag: v15.1.0~2065^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F29336%2Fhead;p=ceph.git qa: wait for MDS to come back after removing it Fixes: http://tracker.ceph.com/issues/40967 Signed-off-by: Patrick Donnelly --- diff --git a/qa/tasks/cephfs/test_failover.py b/qa/tasks/cephfs/test_failover.py index 527386006fb9..786980ba0876 100644 --- a/qa/tasks/cephfs/test_failover.py +++ b/qa/tasks/cephfs/test_failover.py @@ -364,7 +364,7 @@ class TestStandbyReplay(CephFSTestCase): self.assertEqual(0, len(list(self.fs.get_replays(status=status)))) return status - def _confirm_single_replay(self, full=True, status=None): + def _confirm_single_replay(self, full=True, status=None, retries=3): status = self.fs.wait_for_daemons(status=status) ranks = sorted(self.fs.get_mds_map(status=status)['in']) replays = list(self.fs.get_replays(status=status)) @@ -377,7 +377,11 @@ class TestStandbyReplay(CephFSTestCase): has_replay = True checked_replays.add(replay['gid']) if full and not has_replay: - raise RuntimeError("rank "+str(rank)+" has no standby-replay follower") + if retries <= 0: + raise RuntimeError("rank "+str(rank)+" has no standby-replay follower") + else: + retries = retries-1 + time.sleep(2) self.assertEqual(checked_replays, set(info['gid'] for info in replays)) return status