Failed to update executor docker+machine: open /root/.docker/machine/machines: no such file or directory
Summary
After updating to the latest gitlab-runner:alpine
, my docker+machine runner doesn't want to start anymore.
> docker logs gitlab-ci-runner
Starting multi-runner from /etc/gitlab-runner/config.toml ... builds=0
Running in system-mode.
Configuration loaded builds=0
Metrics server disabled
WARNING: Failed to update executor docker+machine for abcd1234 open /root/.docker/machine/machines: no such file or directory
The last message keeps repeating. The docker+machine runner has worked fine for about half a year so I'm not sure what changed.
Steps to reproduce
My config.toml
is:
concurrent = 2
check_interval = 0
[[runners]]
name = "GCE on-demand runner"
limit = 1
url = "https://gitlab.com/ci"
token = "abcd1234....."
executor = "docker+machine"
cache_dir = "/cache"
[runners.docker]
tls_verify = false
image = "my-default-image:alpine"
privileged = true
disable_cache = false
volumes = [
"/var/run/docker.sock:/var/run/docker.sock:ro",
"/root/.docker/config.json:/root/.docker/config.json:ro",
"/mnt/gitlab-ci-cache:/cache",
"/mnt/builds:/builds",
]
[runners.machine]
IdleCount = 0
IdleTime = 420
MaxBuilds = 50
MachineDriver = "google"
MachineName = "vita-ci-%s"
MachineOptions = [
"google-project=vita-io-app",
"google-zone=europe-west1-d",
"google-machine-type=n1-standard-1",
"google-machine-image=https://www.googleapis.com/compute/v1/projects/vita-io-app/global/images/vita-ci-debian-8-v20161203",
"google-disk-size=10",
"google-disk-type=pd-standard",
"google-preemptible=true",
"google-use-internal-ip=true",
"google-scopes=https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/devstorage.read_write",
"google-tags=ci-runner",
]
[[runners]]
name = "deploys docker-containers"
url = "https://gitlab.com/ci"
token = "ghij1234...."
executor = "docker"
[runners.docker]
tls_verify = false
image = "my-other-default-image:alpine"
allowed_images = ["my-other-default-image:*"]
privileged = false
disable_cache = true
volumes = [
"/var/run/docker.sock:/var/run/docker.sock:ro",
"/root/.docker-gitlab/config.json:/root/.docker/config.json:ro",
]
And I start the gitlab-ci-runner via docker-compose:
gitlab-ci-runner:
image: gitlab/gitlab-runner:alpine
restart: unless-stopped
container_name: gitlab-ci-runner
volumes:
- /etc/google/auth/gitlab_ci_credentials.json:/etc/gitlab-runner/credentials.json:ro
- "/root/gitlab-ci-config.toml:/etc/gitlab-runner/config.toml:ro"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "/root/.docker-gitlab/config.json:/root/.docker/config.json:ro"
environment:
- "GOOGLE_APPLICATION_CREDENTIALS=/etc/gitlab-runner/credentials.json"
What I've tried so far
- stopping + removing the gitlab-ci container + its volume
- not giving
/root/.docker/config.json
to the executer / runner - removing read-only from
/root/.docker/config.json
Used GitLab Runner version
> docker exec gitlab-ci-runner gitlab-runner --version
Version: 1.9.1
Git revision: b23d3d4
Git branch:
GO version: go1.7.4
Built: Tue, 27 Dec 2016 15:30:25 +0000
OS/Arch: linux/amd64
docker: 1.11.2