From 129ddb31dd0ed7fbff2dba4547287cd0a4370531 Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Wed, 24 Jan 2018 09:17:34 +0800 Subject: Break dead loop in discover_host() Change-Id: I5e0186db88c9db16a8212b1c52e03fb9d6cf6adc Signed-off-by: Alex Yang --- deploy/tempest.py | 7 +++++-- 1 file 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): -- cgit 1.2.3-korg