mirror of
https://github.com/ceph/ceph
synced 2025-01-19 09:32:00 +00:00
ceph_manager: wait for all_up in test_map_discontinuity
Signed-off-by: Samuel Just <sam.just@inktank.com>
This commit is contained in:
parent
e703942ce4
commit
8284e19226
@ -211,6 +211,9 @@ class Thrasher:
|
||||
while len(self.in_osds) < (self.minin + 1):
|
||||
self.in_osd()
|
||||
self.log("Waiting for recovery")
|
||||
self.ceph_manager.wait_for_all_up(
|
||||
timeout=self.config.get('timeout')
|
||||
)
|
||||
self.ceph_manager.wait_for_clean(
|
||||
timeout=self.config.get('timeout')
|
||||
)
|
||||
@ -799,6 +802,21 @@ class CephManager:
|
||||
time.sleep(3)
|
||||
self.log("clean!")
|
||||
|
||||
def are_all_osds_up(self):
|
||||
x = self.get_osd_dump()
|
||||
return (len(x) == \
|
||||
sum([(y['up'] > 0) for y in x]))
|
||||
|
||||
def wait_for_all_up(self, timeout=None):
|
||||
self.log("waiting for all up")
|
||||
start = time.time()
|
||||
while not self.are_all_osds_up():
|
||||
if timeout is not None:
|
||||
assert time.time() - start < timeout, \
|
||||
'timeout expired in wait_for_all_up'
|
||||
time.sleep(3)
|
||||
self.log("all up!")
|
||||
|
||||
def wait_for_recovery(self, timeout=None):
|
||||
self.log("waiting for recovery to complete")
|
||||
start = time.time()
|
||||
|
Loading…
Reference in New Issue
Block a user