thrashosds: timeout for every clean check, not just the last one

This commit is contained in:
Josh Durgin 2011-11-17 11:11:33 -08:00
parent 9d12b720e8
commit f4d527e743
2 changed files with 5 additions and 3 deletions

View File

@ -116,7 +116,9 @@ class Thrasher(gevent.Greenlet):
"dead_osds: ", self.dead_osds, "live_osds: ",
self.live_osds]]))
if random.uniform(0,1) < (float(delay) / cleanint):
self.ceph_manager.wait_till_clean()
self.ceph_manager.wait_till_clean(
timeout=self.config.get('timeout')
)
self.choose_action()()
time.sleep(delay)
self.all_up()

View File

@ -41,8 +41,8 @@ def task(ctx, config):
0.75).
timeout: (360) the number of seconds to wait for the cluster
to become clean before the task exits. If this doesn't happen,
an exception will be raised.
to become clean after each cluster change. If this doesn't
happen within the timeout, an exception will be raised.
example: