-
Notifications
You must be signed in to change notification settings - Fork 4
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
Option to not wait or stop when draining has started #25
Comments
@eric-kinsa to make sure I understand, we are looking for a new new option that will still wait after making the UpdateService call to ECS, but the idea is to wait only until draining has started, not until the draining has finished. |
Yeah, either wait until the connections start draining or not wait at all. Whichever is easier. I can make a AWS CLI call to check for connections to start draining like I was doing for the ecs-deploy script. |
I think I started to see the appeal of this option. I have created a WIP branch (https://github.com/Autodesk/go-awsecs/compare/add-wait-until-option?expand=1), if you want to try it out. Logs are changed like this: No service update in progress:
With previous service update still in progress, trigger update again:
@eric-kinsa please test it out if you can. |
Works great! I ran a couple of test runs and it finished as soon as one target starting connection draining. There's another plus to this: I usually see a cpu spike when there's a deployment of a set of new containers, which will kick off the autoscaling once. This would cause the desired count check to kick off (example below) and add a couple of minutes. Now with this drain flag, it ignores what the previous count of containers were, which works out well for me. Thanks for implementing this!
|
@eric-kinsa , these are older logs right? My branch in progress is not yet merged, and you will need to pass the Thanks again. |
That was an example of the logs of what I was occasionally getting without this new "wait-until-draining-started" flag. I compiled this branch and it works great. |
Do you need any more testing on this feature that I can help with before merging in? |
Is there an option or could there be an option to not wait for containers to be fully drained and stopped? Right now I'm testing your tool as an alternative to ecs-deploy, and it works great by the way since all my services are multi-container, however, the time it takes for containers to drain and close would probably annoy the devs I support. And I would prefer not to change the drain time on my target groups.
I currently use the "--skip-deployment-check" on ecs-deploy and run a wait loop using the aws cli utility to check for a drain status on my target groups. Once the draining starts, the job moves on from there with post deployment steps. With my current setup, the connection draining doesn't start until the health check passes on the target group, so I'm confident in not holding up a deployment job until the containers are fully deregistered or closed.
The text was updated successfully, but these errors were encountered: