-
Notifications
You must be signed in to change notification settings - Fork 202
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
Tag on-demand instances at creation time #496
Conversation
Signed-off-by: Clinton Wolfe <[email protected]>
Signed-off-by: Clinton Wolfe <[email protected]>
After some conversation with @tyler-ball, we think we may be able to use the AWS run_instances() call to tag spot instances at creation time as well. I'm placing this into draft status while I do a rewrite. |
This allows spot instances to be tagged at creation time. The tag-after-create code still needs to be removed, and there is still some refactoring to be done. Also, the ability to use "ondemand" as the spot price is currently broken. Signed-off-by: Clinton Wolfe <[email protected]>
Signed-off-by: Clinton Wolfe <[email protected]>
Signed-off-by: Clinton Wolfe <[email protected]>
Signed-off-by: Clinton Wolfe <[email protected]>
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.
1 small update then
Nice work @clintoncwolfe! This also removes about 2x as many lines as it adds 💪
Co-authored-by: Tyler Ball <[email protected]>
Way cool. Thanks @clintoncwolfe |
Description
This is started as an adoption of #414 by @sumitag, adding tests and rebasing. #414 applies tags at instance creation time to on-demand instances.
This PR then goes on to convert spot instance requests to use the
create_instances()
API call, which allows tagging at creation time. This allows all tagging to happen at creation time, so all post-hoc tagging code is removed.There are some fallout effects from using
create_instances()
instead ofspot_instance_request()
:create_instances()
is one-shot, so kitchen-ec2 must explicitly retry the call.There is a feature that allows the user to set the spot price to "on-demand" to get the on-demand price; internally this sets the bid price to an empty string. This is not allowed in theUpdate: When on-demand is specified, the max_price field may simply be omitted, causing the bid price to be set to the on-demand price.create_instances()
API. Currently this is not solved, and the feature is broken pending discussion.Issues Resolved
Fixes #360
Fixes #480
Fixes #464
I suggest PRs #364 and #414 be closed.
Check List