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 <pdonnell@redhat.com>
This commit is contained in:
Patrick Donnelly 2017-01-26 00:25:48 -05:00
parent 8f3e745344
commit 638bccb2bb
No known key found for this signature in database
GPG Key ID: 3A2A7E25BEA8AADB

View File

@ -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()