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

Lifecycle hook to properly drain instances #25

Open
nitrocode opened this issue May 16, 2022 · 3 comments
Open

Lifecycle hook to properly drain instances #25

nitrocode opened this issue May 16, 2022 · 3 comments

Comments

@nitrocode
Copy link

nitrocode commented May 16, 2022

It would be handy to have a lifecycle hook on the autoscaling group to safely spin down instances when updating the AMI. The hook could pause the ec2 termination, wait for spacelift to finish any remaining jobs on its agents, drain the instance, and continue the termination.

references

@xophere
Copy link

xophere commented Apr 3, 2023

Yes please.

@lorengordon
Copy link
Contributor

lorengordon commented Apr 2, 2024

Yeah, this would be very handy. I have a spacelift stack that is actually managing this worker pool, and the pool is linked to the stack. A little self-referential I guess. Which is of course the problem. But, as it is, when I modify the launch template, the instance refresh kicks off, which terminates the runner that the stack run is on, crashing the worker as far as spacelift sees and often leaving the state locked and requiring manual intervention! Some kind of lifecycle hook to properly drain instances would resolve the problem without complicating the architecture.

@zhimsel
Copy link

zhimsel commented Jan 28, 2025

👍🏻 this. I've been speaking to our Spacelift reps to try and get this feature worked on. 🤞🏻

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