Fail on unhandled exception in ec2_asg rather than raise
reviewable/pr18780/r1
Shawn Siefkas 8 years ago committed by Matt Davis
parent 528f9a1d0b
commit 380dbd4369

@ -334,8 +334,12 @@ def elb_healthy(asg_connection, elb_connection, module, group_name):
# but has not yet show up in the ELB # but has not yet show up in the ELB
try: try:
lb_instances = elb_connection.describe_instance_health(lb, instances=instances) lb_instances = elb_connection.describe_instance_health(lb, instances=instances)
except boto.exception.InvalidInstance: except boto.exception.BotoServerError as e:
pass if e.error_code == 'InvalidInstance':
return None
module.fail_json(msg=str(e))
for i in lb_instances: for i in lb_instances:
if i.state == "InService": if i.state == "InService":
healthy_instances.append(i.instance_id) healthy_instances.append(i.instance_id)

Loading…
Cancel
Save