1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

avoid the instance start--state-fetch race

This commit is contained in:
milan 2013-03-06 09:34:29 +01:00
parent c4aa72f1fd
commit 78d1e2483a

View file

@ -231,6 +231,9 @@ def main():
res_list = res.connection.get_all_instances(instids) res_list = res.connection.get_all_instances(instids)
this_res = res_list[0] this_res = res_list[0]
if wait: if wait:
# there's a race between start and get an instance state
import time
time.sleep(5)
# wait here until the instances are up # wait here until the instances are up
num_running = 0 num_running = 0
while num_running != len(instids): while num_running != len(instids):