From 638bccb2bb7eb71e6296d93e505ffae3f28d1422 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Thu, 26 Jan 2017 00:25:48 -0500 Subject: [PATCH] qa: timeout thrasher if fs does not stabilize After 5 minutes of waiting, it's reasonable to stop as the cluster is probably stuck. Signed-off-by: Patrick Donnelly --- qa/tasks/mds_thrash.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qa/tasks/mds_thrash.py b/qa/tasks/mds_thrash.py index c9f25451da0..b697125d6f8 100644 --- a/qa/tasks/mds_thrash.py +++ b/qa/tasks/mds_thrash.py @@ -187,7 +187,9 @@ class MDSThrasher(Greenlet): self.log('mds cluster has {count} alive and active, now stable!'.format(count = count)) return status, None itercount = itercount + 1 - if itercount > 10: + if itercount > 300/2: # 5 minutes + raise RuntimeError('timeout waiting for cluster to stabilize') + elif itercount > 10: self.log('mds map: {status}'.format(status=self.fs.status())) time.sleep(2) status = self.fs.status()