add waiter after creating instances

pull/37/head
Minh Doan 6 years ago
parent d55dcfcfe1
commit 8662f6dabf
  1. 5
      aws-experiment-launch/create_instances.py

@ -77,6 +77,11 @@ def create_instances(config, ec2_client, region_number, number_of_instances):
], ],
) )
instance_ids = utils.get_instance_ids2(ec2_client, node_name_tag)
LOGGER.info("Waiting for all %d instances in region %s to be in RUNNING" % (len(instance_ids), region_number))
waiter = ec2_client.get_waiter('instance_running')
waiter.wait(InstanceIds=instance_ids)
count = 0 count = 0
while count < 40: while count < 40:
time.sleep(5) time.sleep(5)

Loading…
Cancel
Save