-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add validation to ensure ecs service is deployed successfully #91
Add validation to ensure ecs service is deployed successfully #91
Conversation
This expands the existing delay and repeat parameters to also check if a service is deployed successfully. This is done by checking the running count is equal to the desired count for the active deployment. When delay is set to 0, it'll disable this check.
d9818a7
to
16e84d8
Compare
@raags thanks for your pr. basically waiting for In case you doesn't have a load balancer configuration (you do some background processing jobs with ecs), it might be sufficient. You can achive something similar by using the - name: wait until at least one target is registered and healthy
elb_target_group_facts:
names:
- "{{ SERVICE }}"
collect_targets_health: yes
register: TG
retries: 10
delay: 15
until: TG.target_groups[0].targets_health_description | count == DESIRED_COUNT and TG.target_groups[0].targets_health_description[0].target_health.state == "healthy" But as you see, it gets complicated. But it is definitely a "very nice to have" feature. Furthermore, consider to add a waiter to the |
There's actually 2 waiters already:
They test for the states you're interested in. We often add waiters to amazon.aws because the built in waiters bomb out if you hit the API rate limits |
Looking a little deeper into this PR, it looks like it's been superseded by #1209 which uses the botocore waiters. @raags Thanks for taking the time to submit this PR. It looks like this PR stalled out a couple of years ago, and looking at the module as it stands today I believe that this has been achieved through a different mechanism. The updated behaviour should be available with community.aws 4.1.0. There's no fixed release dates yet. I'm going to close out this PR, hopefully any future PRs won't spend quite so long waiting on reviews (we're finally getting on top of our backlog) |
SUMMARY
This expands the existing
delay
andrepeat
parameters to also check if a service is deployed successfully. This is done by checking the running count is equal to the desired count for the active deployment.When the
delay
is set to 0, it'll disable this check.ISSUE TYPE
COMPONENT NAME
ecs_service
ADDITIONAL INFORMATION
Currently, the ecs_service module starts a ECS service deployment but doesn't validate the deployment success. This change will optionally validate if the deployment succeeded, giving early feedback on the service status.