Commit aa8c2628 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Add a timeout on NEOCluster.start().


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@1266 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 6e7ce189
......@@ -65,6 +65,7 @@ NEO_STORAGE = 'neostorage'
NEO_ADMIN = 'neoadmin'
DELAY_SAFETY_MARGIN = 10
MAX_START_TIME = 30
class AlreadyRunning(Exception):
pass
......@@ -260,7 +261,10 @@ class NEOCluster(object):
process.start()
# Try to put cluster in running state. This will succeed as soon as
# admin node could connect to the primary master node.
end_time = time.time() + MAX_START_TIME
while True:
if time.time() > end_time:
raise AssertionError, 'Timeout when starting cluster'
try:
neoctl.startCluster()
except NotReadyException:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment