-
Notifications
You must be signed in to change notification settings - Fork 271
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
Mark last instance unhealthy if BuildkiteTerminateInstanceAfterJob
is enabled
#1245
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
4a5abec
Correctly terminate single-job instances
moskyb 7eec130
Fix missing equals
moskyb 4e95386
FFFFFFFF
moskyb 11a5832
Accursed plusses
moskyb 916dfe1
Only terminate on shutdown when BuildkiteTerminateInstanceAfterJob is…
triarius cee477c
Also set BUILDKITE_TERMINATE_INSTANCE_AFTER_JOB in cfn-env
triarius f05546d
Use systemd service overrides instead of systemctl set-env
triarius d9fe204
Ensure BUILDKITE_TERMINATE_INSTANCE_AFTER_JOB is shown in job logs on…
triarius f9d7731
Mark instance unhealthy instead of shutting down
triarius d2927cf
Mark as unhealthy on windows
triarius c3ebaa5
Modify terminate-instance on windows to stop the agent earlier, but r…
triarius 5b02d95
Remove unused condition
triarius 198db6e
Respect grace period on windows
triarius File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
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.
The ps1 includes
--no-should-respect-grace-period
- I think this should have it too, if the goal is to emulateshutdown
(and where someone has configured a grace period).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.
Looks like I copy-pasted that from your PR 😅.
The grace period is set by the
HealthCheckGracePeriod
field of anAWS::AutoScaling::AutoScalingGroup
, but that is not set here:elastic-ci-stack-for-aws/templates/aws-stack.yml
Lines 1253 to 1304 in 5b02d95
So the default of
0s
is what all stacks have by default. Given this, I think if the user has gone out of their way to set a grace period, we should not interfere.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.
I'm split on this. On the one hand, that's a fairly good argument for respecting the grace period. But on the other, why would they configure
BuildkiteTerminateInstanceAfterJob
at all (if they also want a grace period, in which to... recover the agent?)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.
IDK, but if they explicitly did both, they may have thought of a reason we haven't.