Skip to content

Commit

Permalink
qa/mgr/progress: fix timeout error when waiting for osd in event
Browse files Browse the repository at this point in the history
Fixes: https://tracker.ceph.com/issues/40618

Signed-off-by: Ricardo Dias <[email protected]>
  • Loading branch information
rjfd committed Sep 3, 2019
1 parent 7d490c0 commit b035379
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions qa/tasks/mgr/test_progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,16 @@ def _simulate_back_in(self, osd_ids, initial_event):
self.wait_until_true(lambda: self._is_complete(initial_event['id']),
timeout=self.EVENT_CREATION_PERIOD)


# Wait for progress event marked in to pop up
self.wait_until_equal(lambda: len(self._events_in_progress()), 1,
timeout=self.EVENT_CREATION_PERIOD)
try:
# Wait for progress event marked in to pop up
self.wait_until_equal(lambda: len(self._events_in_progress()), 1,
timeout=self.EVENT_CREATION_PERIOD)
except RuntimeError as ex:
if not "Timed out after" in str(ex):
raise ex

log.info("There was no PGs affected by osd being marked in")
return None

new_event = self._events_in_progress()[0]
log.info(json.dumps(new_event, indent=1))
Expand Down Expand Up @@ -200,10 +206,11 @@ def test_osd_came_back(self):
ev1 = self._simulate_failure()

ev2 = self._simulate_back_in([0], ev1)

# Wait for progress event to ultimately complete
self.wait_until_true(lambda: self._is_complete(ev2['id']),
timeout=self.RECOVERY_PERIOD)

if ev2 is not None:
# Wait for progress event to ultimately complete
self.wait_until_true(lambda: self._is_complete(ev2['id']),
timeout=self.RECOVERY_PERIOD)

self.assertTrue(self._is_quiet())

Expand Down

0 comments on commit b035379

Please sign in to comment.