Change-Id: I5e0186db88c9db16a8212b1c52e03fb9d6cf6adc
Signed-off-by: Alex Yang <yangyang1@zte.com.cn>
def discover_host(hosts_name, client):
- while True:
+ retry = 90
+ while retry:
hosts_info = get_hosts(client)
if len(hosts_info) == len(hosts_name):
print('discover hosts success!')
- break
+ return
else:
time.sleep(10)
+ retry = retry - 1
+ err_exit('Failed to discover hosts')
def update_network(cluster_id, network_map, client):