This repository was archived by the owner on May 6, 2025. It is now read-only.
Ignore draining instances when checking ASG state#10
Merged
omerxx merged 1 commit intoomerxx:masterfrom Jan 26, 2019
Merged
Conversation
DesiredCapacity does not correctly represent the current state of an ECS cluster, so I've replaced it with the clusters activeInstanceCount. Some problems with DesiredCapacity are: 1) It includes instances that are in the Draining state, causing the ASG to appear bigger than it actually is. 2) When DesiredCapacity is updated it takes time to fulfil the request, causing the script to misunderstand the number of instances currently powering the ECS cluster.
Contributor
Author
|
This should resolve some of the edge cases that could have caused #6 , however, there may be additional edge cases that could cause an issue. For example, I am not sure how a clusters reservation metrics are affected when an instance is in the draining state, still running tasks, and the tasks have not yet been started on other hosts. |
Contributor
Author
|
I'll have to improve this after #7 is merged because of the new code that would be added. |
Contributor
Author
|
@oytuntez I've merged everything into the fork that my job is using if you want to see the full changes: |
|
Thanks @cbankston! I also did the same over the weekend... :) I have a couple more updates on the script, but I couldn't commit them yet. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DesiredCapacity does not correctly represent the current state of an ECS cluster, so I've replaced it with the clusters activeInstanceCount.
Some problems with DesiredCapacity are: