aws-samples / aws-samples/amazon-ec2-gitlab-runner

Error occurred during build: Command 09ConfigureDockerExecutor failed

Open
#17 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
65
Forks
34
PR merge metrics
No merged PRs in 30d

Description

Error when running `./deploy-runner.sh `

**Error message from EC2:**
`cloud-init[2273]: Error occurred during build: Command 09ConfigureDockerExecutor failed`

**Relevant code:**
```
09ConfigureDockerExecutor:
command: !Sub
- |
for GitlabGroupToken in `aws ssm get-parameters --names /${AWS::StackName}/ci-tokens --query 'Parameters[0].Value' | sed -e "s/\"//g" | sed "s/,/ /g"`;do
sudo gitlab-runner register \
--non-interactive \
--url "${GitlabServerURL}" \
--token $GitlabGroupToken \
--executor "docker" \
--docker-image "${DockerImagePath}" \
--description "Gitlab Runner with Docker Executor" \
--docker-volumes "/var/run/docker.sock:/var/run/docker.sock"
done
- isLOCKED: !FindInMap [GitlabRunnerRegisterOptionsMap, !Ref RunnerEnvironment, isLOCKED]
ACCESS: !FindInMap [GitlabRunnerRegisterOptionsMap, !Ref RunnerEnvironment, ACCESS]
```

**Possible root cause?**
The ability to pass a runner registration token, and support for certain configuration arguments was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/380872) in GitLab 15.6 and will be removed in GitLab 18.0. Runner authentication tokens should be used instead. For more information, see [Migrating to the new runner registration workflow](https://docs.gitlab.com/ee/ci/runners/new_creation_workflow.html).

Contributor guide

Open the contributing guide

Research direction

Start with deploy-runner.sh and the 09ConfigureDockerExecutor command shown in the issue, then reproduce the cloud-init failure using the documented properties, region, AWS profile, and stack name. Compare the runner registration arguments with GitLab's new runner creation workflow and verify the deployment completes without the EC2 build error.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, docker, shell
Domain
ci-cd, devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.