- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 338
cancel-spot-instances.sh fails in Terraform container #493
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
Comments
Thanks for reporting. I see not another way to cancel spot instances when destroy than using a local executor. We could explore the following options:
|
As far as I remember this null_resource has been removed some time ago. Could you please check the module version you are using? Any chance to update to 5.0.2? EDIT: Ah, I see. This |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days. |
To be tackled in #623 as we need an option to remove resources created during runtime. |
The script will be removed. A Lambda function will handle the cancellation of spot instances when the agent is shutdown. |
The script was created to support the examples (for testing purpose). |
## Description Whenever a spot executor is created a spot request is created. Occasionally there might be open spot requests which have not been fulfilled. These spot requests have to be deleted as soon as the agent terminates as no executors are needed. Challenge: Make sure that spot requests are deleted only which belong to our module. Unfortunately the GitLab Runner does not tag them. We use the following logic for determinination: - state is open or active - they are associated to a SSH key which name starts with `runner` - they have the `var.environment`/`var.overrides['name_docker_machine']` somewhere in the name Solves part of #623 Closes #493
This module "npalm/gitlab-runner/aws" is meant to be run in a Terraform container, however script
bin/cancel-spot-instances.sh
doesn't work because it requires bash which doesn't exist in Terraform images. Terraform images only have sh. Besides, the script also requires jq and awscli which don't exist either in Terraform alpine based images.I get this error:
The text was updated successfully, but these errors were encountered: