-
-
Notifications
You must be signed in to change notification settings - Fork 329
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
Module update removes registered runner but does not create a new runner #1074
Comments
Having old SSM parameters with old tokens is usually the problem, yes. But this shouldn't be the case here. What you should observe in the logs is, that a new token is fetched from GitLab and stored as SSM parameter. The Runner should be shown in GitLab. Just checked my configuration
The Runner creates a SSM parameter holding the |
There are multiple SSM parameter tokens created:
My configuration is similar except it's an instance runner. runner_gitlab = {
runner_version = "16.8.0"
url = "https://gitlab...."
access_token_secure_parameter_store_name = "gitlab-runner-access-token"
}
runner_gitlab_registration_config = {
type = "instance"
tag_list = "tag1,tag2"
description = "name"
locked_to_project = "false"
run_untagged = "true"
maximum_timeout = "3600"
} Anyways, after updating to 7.3.1, it has re-registered itself correctly first try. I wonder if #1058 fixed the issue in this case. |
This has happened again with simple update of VPC module to 5.7.0 and GitLab Runner version to 16.10.0, no update to this project. SSM Parameter Store shows all tokens, with EC2 System Log shows nothing about fetching a new token though. Update to 7.4.0 also didn't have any issues, so maybe this is only happening when not updating this project? |
is there any way of setting this up without having to register a runner? i already have my runner created in the visual interface |
## Description GitLab announced then [Next GitLab Runner Token Architecture](https://docs.gitlab.com/ee/architecture/blueprints/runner_tokens/index.html#proposal). Runners have to be registered manually. This PR adds a new import parameter `runner_gitlab.preregistered_runner_token_ssm_parameter_name` holding the name of a SSM parameter (type: `SecuredString`). This parameter contains the GitLab Runner token obtained from GitLab. All other registration methods will still work, but have been marked as deprecated and will be removed with [v8.0.0](https://github.com/cattle-ops/terraform-aws-gitlab-runner/milestone/4) end of the year. This also solves the problems with Runners removed from GitLab at shutdown, resulting in new Runners not able to start. Closes #1074 and #1109 ## Verification - [x] deployed the module using the new registration version. Runner is online. - [x] deployed the module using the old authentication schema. Runner is online.
Yes, that is possible. We added a variable in the last release. There is also a PR ongoing to allow zero downtime updates. |
Describe the bug
Updating GitLab Runner version by re-deploying a Terraform project using this module with the new "Next GitLab Runner Token Architecture", as the new EC2 instance is created, GitLab Runner is removed from the GitLab instance, but a new one is not registered.
Before "Next GitLab Runner Token Architecture", the GitLab Runner was simply updated.
To Reproduce
Steps to reproduce the behavior:
runner_gitlab = { runner_version = "16.7.0" }
to a newer version (eg.16.8.0
)terraform plan
+terraform apply
Expected behavior
A GitLab Runner to either be recreated or re-use the existing runner registration.
Additional context
Upgrade to "Next GitLab Runner Token Architecture" was performed with a completely fresh setup, no old SSM parameters remained. We deploy using and GitLab's Terraform state handling through GitLab's CI (running on a instance completely separated from any auto-deployed ones from this module).
We have to fully destroy the runner and recreate it to get the runner re-registered. EC2 system logs show nothing different from the past, but I can supply a log if no other ideas are available.
The text was updated successfully, but these errors were encountered: