diff options
author | Alex Yang <yangyang1@zte.com.cn> | 2018-01-24 09:17:34 +0800 |
---|---|---|
committer | Alex Yang <yangyang1@zte.com.cn> | 2018-01-24 09:57:33 +0800 |
commit | 129ddb31dd0ed7fbff2dba4547287cd0a4370531 (patch) | |
tree | d7f6d115868e781e34b832c37f600947ab3fa9cf | |
parent | 15772db47091b35d612f5d50bcf4584330b966ac (diff) |
Break dead loop in discover_host()
Change-Id: I5e0186db88c9db16a8212b1c52e03fb9d6cf6adc
Signed-off-by: Alex Yang <yangyang1@zte.com.cn>
-rw-r--r-- | deploy/tempest.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/deploy/tempest.py b/deploy/tempest.py index 0c48d778..e403cd2f 100644 --- a/deploy/tempest.py +++ b/deploy/tempest.py @@ -164,13 +164,16 @@ def install_os_for_vm_step2(cluster_id, client): 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): |