-
Notifications
You must be signed in to change notification settings - Fork 94
filter warm-pool activities from status check in aws-asg target #1151
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @kemaldev and thanks for raising this PR.
I just wanted to check my logic around warm pools as I don't have practical experience using them. From the descriptions you have given and the documentation on AWS that I have written, it seems that when the ASG has an associated warm pool, the describe scaling activities for the ASG will include both ASG and warm pool events? If so, this looks like a great fix to avoid having warm pool events block scaling of your ASG and makes total sense.
Overall the approach makes sense and while the string matching is unfortunate, it doesn't look like there is a better approach currently. Do you mind adding a changelog entry too? It would also be nice to have a small test to cover the warmPoolActivity function if possible, so any changes to functionality don't break this check.
I do wonder in what situations an operator would want to block ASG scaling due to warm pool events. I think it's therefore OK to ignore by default, and we can add a config parameter in the future if there is need.
|
Hi @jrasell Yes, you got it right. The scaling activities will include both ASG and warm pool events. I'll add a changelog entry and a test as soon as I get the time. |
2d05788 to
cede98a
Compare
|
@jrasell I've added some unit tests and a changelog entry now, let me know if you think something is missing. |
jrasell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @kemaldev!
At least partly related to #885.
For specific information about the issues this PR fixes read: #885 (comment)
I am not very happy about having to filter on the activity description since this may be bound to change on AWS side whenever they want. However, we don't have any activityType field we can use and the only way we can differentiate activities is on the description right now. I might've also missed some descriptions that I haven't seen with my curent ASG-setup and from my searches I haven't found a list of possible combinations in the AWS docs.
Therefore I've only targeted the activity descriptions I've seen from my side that are related to launching/terminating instances in/from warm-pools. This way we only ignore warm-pool events, preventing other unknown activities from being affected by these changes. If the description would change for some reason the worst thing that can happen is that we wait for these activities again, so I suppose this could be acceptable.
In some cases some people would want to wait for these warm-pool events as well perhaps, so maybe it should be a configurable option?