Discussion:
[ansible-project] ec2_asg timeout issue
Nicolas G
2015-07-22 17:11:41 UTC
Permalink
Hi,

I have the bellow config using the ec2_asg module :

"""
# AutoScaling group
- ec2_asg:
name: "asg"
state: present
region: "{{ region }}"
load_balancers: "{{ elb_name }}"
availability_zones: [ '{{ az1 }}', '{{ az2 }}', '{{ az3 }}' ]
launch_config_name: "config"
min_size: "{{ min_size }}"
max_size: "{{ max_size }}"
desired_capacity: "{{ desired_capacity }}"
vpc_zone_identifier: "{{ vpc_zone_identifier }}"
# Length of time in seconds after a new EC2 instance comes into
service that Auto Scaling starts checking its health
health_check_period: 900
health_check_type: ELB
tags:
- Name: "AutoScalingNode"
propagate_at_launch: true
- Environment: "Dev"
propagate_at_launch: true
"""


Unfortunately this task will always fail as my instance needs about 10
minutes to be up and running but this task fails after about 5 minutes with
the bellow error :
""
msg: Waited too long for ELB instances to be healthy. Wed Jul 22 19:56:37
2015
"""

The health_check_period config doesn't see to be related with this... How
can I increase the timeout of this task ?

Regards,
Nicolas.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c5dbb7e4-6df2-4518-a864-369caa32b8a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jon Hadfield
2015-07-22 17:29:55 UTC
Permalink
Have you tried specifying a wait_timeout, i.e.:

- wait_for_instances
Wait for the ASG instances to be in a ready state before
exiting. If instances are behind an ELB, it will wait until
the instances are considered by the ELB. [Default: True]

- wait_timeout
how long before wait instances to become viable when replaced.
Used in concjunction with instance_ids option. [Default: 300]

The 300 second default would explain the 5 minute failure.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/6f23b6c2-d0bc-4901-ab84-754f5ae1af48%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Nicolas G.
2015-07-22 18:37:43 UTC
Permalink
cheers somehow I didn't noticed these 2 options, I'v set wait_for_instances
to False.
Post by Jon Hadfield
- wait_for_instances
Wait for the ASG instances to be in a ready state before
exiting. If instances are behind an ELB, it will wait until
the instances are considered by the ELB. [Default: True]
- wait_timeout
how long before wait instances to become viable when replaced.
Used in concjunction with instance_ids option. [Default: 300]
The 300 second default would explain the 5 minute failure.
--
You received this message because you are subscribed to a topic in the
Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/ansible-project/F0D8S5E9zLg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/6f23b6c2-d0bc-4901-ab84-754f5ae1af48%40googlegroups.com
<https://groups.google.com/d/msgid/ansible-project/6f23b6c2-d0bc-4901-ab84-754f5ae1af48%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CALpo6LWN32ChioycGC-QhdUUcHfyGMN0i9bHuVrQnczvHGM0wA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...