From 757f8c087e9a5f4c553472209b46232b70a36b55 Mon Sep 17 00:00:00 2001 From: milan Date: Wed, 6 Mar 2013 09:34:29 +0100 Subject: [PATCH] avoid the instance start--state-fetch race --- ec2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ec2 b/ec2 index 2a239cc2ba7..54f131a3b90 100644 --- a/ec2 +++ b/ec2 @@ -231,6 +231,9 @@ def main(): res_list = res.connection.get_all_instances(instids) this_res = res_list[0] 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 num_running = 0 while num_running != len(instids):