Skip to content
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

Scaler seems to bypass Lifecycle Hooks #8

Closed
lox opened this issue Mar 25, 2019 · 6 comments
Closed

Scaler seems to bypass Lifecycle Hooks #8

lox opened this issue Mar 25, 2019 · 6 comments

Comments

@lox
Copy link
Contributor

lox commented Mar 25, 2019

In my initial testing, it looks like lifecycle hooks didn't seem to be triggered on scale-ins 🤔

@etaoins have you noticed that?

@etaoins
Copy link
Contributor

etaoins commented Mar 25, 2019

It appeared to work for me but due to #6 and #7 the ASG always wanted to scale in. I had an agent terminate between two jobs in the same build but never while a job was running. That could’ve just been luck, though.

@lox
Copy link
Contributor Author

lox commented Mar 25, 2019

Just did some testing and not seeing lifecycle events firing. I suspect that lifecycle hooks only fire when there are autoscaling rules on an ASG.

@lox
Copy link
Contributor Author

lox commented Mar 25, 2019

I wonder if we could use target tracking to scale-in, but use the lamba for scale-out 🤔

@lucasteligioridis
Copy link

Is this issue relevant anymore with the new version? @lox

@lox
Copy link
Contributor Author

lox commented May 8, 2019

It is in the sense that it's still a thing if you try and use the scale-in support in the lambda, but we disable it in Elastic Stack.

I'd still love to know why it doesn't work.

@keithduncan
Copy link
Contributor

This appears to have been fixed some time between last being looked at and now.

In buildkite/elastic-ci-stack-for-aws#964 I’m looking at re-enabling scale in (set desired count to less than current) in the Lambda and using service-side ASG lifecycle hook handlers to orchestrate the agent exit, and the lifecycle hooks are firing:

Screenshot 2021-11-24 at 09 24 45

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants