Commit 6f3d9187 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Avoid an infinite loop when strating the cluster (wmhen waiting for storages).


git-svn-id: https://svn.erp5.org/repos/neo/trunk@1303 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 45b0ddc2
...@@ -268,6 +268,8 @@ class NEOCluster(object): ...@@ -268,6 +268,8 @@ class NEOCluster(object):
break break
target_count = len(self.db_list) - len(except_storages) target_count = len(self.db_list) - len(except_storages)
while True: while True:
if time.time() > end_time:
raise AssertionError, 'Timeout when starting cluster'
storage_node_list = neoctl.getNodeList( storage_node_list = neoctl.getNodeList(
node_type=protocol.STORAGE_NODE_TYPE) node_type=protocol.STORAGE_NODE_TYPE)
if len(storage_node_list) == target_count: if len(storage_node_list) == target_count:
......
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