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

Asg offhours fixes #3875

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

gleework
Copy link
Contributor

  • EC2 instances have eligibility requirements before they can be stopped/started.
  • When ASG suspends/resumes, it should only stop/start eligible instances.

@kapilt
Copy link
Collaborator

kapilt commented Apr 24, 2019

Thanks for the pull request! Much appreciated, If you don't mind could you sign the CLA at the bottom of the README? Direct link here: https://docs.google.com/forms/d/e/1FAIpQLSfwtl1s6KmpLhCY6CjiY8nFZshDwf_wrmNYx1ahpsNFXXmHKw/viewform

@gleework
Copy link
Contributor Author

gleework commented Apr 24, 2019

Glad to be able to contribute back in some small way! I think that I'm supposed to be covered by a Corporate CLA submitted by Gil Yehuda on 1/2/19. It should have covered me and some teammates from Oath (now Verizon Media). Would the Individual CLA be equivalent for me?

@kapilt
Copy link
Collaborator

kapilt commented Apr 24, 2019

we typically ask folks to do both, on the corp (if their doing as part of a corporate activity) and on the individual as teams/groups change membership. if you cover on the individual we're good to go. thanks!

c7n/resources/asg.py Outdated Show resolved Hide resolved
@kapilt
Copy link
Collaborator

kapilt commented May 22, 2019

is this something that would be better handled with the use of a launch-filter? ie are the asgs here homongenous or are they being patched with spot and ephemeral instances at runtime ? i'm concerned about the additional api calls here and the implicit filtering, better would be an explicit filter on launch-config or adding in a new instance filter. but thats on the basis that the asgs are mostly homogenous. The only common use tool i'm aware of that does a lot of live patching of instances into asgs is something like https://github.com/AutoSpotting/AutoSpotting.. in which case we should probably just avoid the asg, buts thats easily done via adding a filter for the auto spot tag.

@tjstansell
Copy link
Contributor

This is biting us now ... what code changes are required to get this merged? FWIW, when stopping instances and ASGs with spot, we get the following error:

botocore.exceptions.ClientError: An error occurred (UnsupportedOperation) when calling the StopInstances operation: You can't stop the Spot Instance 'i-08a8540xxxxxxxxxx' because it is associated with a one-time Spot Instance request. You can only stop Spot Instances associated with persistent Spot Instance requests.

So, ideally we'd be able to detect the difference between one-time spot instances and persistent ones and still stop persistent ones.

@glc-gplassard
Copy link

Hello, we are also facing the issue described above. Can we help to get this merged ?

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

Successfully merging this pull request may close these issues.

None yet

4 participants