Panic / SIGSEGV in docker+machine executor if [runners.docker] missing from confgi
Summary
docker+machine executor crashes as soon as a build is about to start with a panic / runtime error.
The docker-machine provisioning works. I see the provisioned machine in docker-machine ls
and I can connect to it using docker-machine env
and it is in a working state, ready to run containers.
Log
Jun 8 21:27:00 gitlab gitlab-runner[28283]: time="2017-06-08T21:27:00-04:00" level=info msg="Job succeeded" job=15 project=3 runner=c956eabb #012<nil>
Jun 8 21:27:00 gitlab gitlab-ci-multi-runner[28283]: time="2017-06-08T21:27:00-04:00" level=info msg="Job succeeded" job=15 project=3 runner=c956eabb
Jun 8 21:27:00 gitlab gitlab-ci-multi-runner[28283]: panic: runtime error: invalid memory address or nil pointer dereference
Jun 8 21:27:00 gitlab gitlab-ci-multi-runner[28283]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4bed42]
Jun 8 21:27:00 gitlab gitlab-ci-multi-runner[28283]: goroutine 21 [running]:
Jun 8 21:27:00 gitlab gitlab-ci-multi-runner[28283]: panic(0x148d5a0, 0xc42000e020)
Jun 8 21:27:00 gitlab gitlab-ci-multi-runner[28283]: #011/usr/local/go/src/runtime/panic.go:500 +0x1a1
Jun 8 21:27:00 gitlab gitlab-ci-multi-runner[28283]: gitlab.com/gitlab-org/gitlab-ci-multi-runner/executors/docker/machine.(*machineExecutor).Prepare(0xc420306000, 0xc42034a280, 0xc4204b0900, 0x3080960, 0xc4204b06c0, 0x7fffd34e3f77, 0xd, 0x307f640, 0xc4201a2060, 0x307f600, ...)
Jun 8 21:27:00 gitlab gitlab-ci-multi-runner[28283]: #011/go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/executors/docker/machine/executor.go:68 +0x1a2
Jun 8 21:27:00 gitlab gitlab-ci-multi-runner[28283]: gitlab.com/gitlab-org/gitlab-ci-multi-runner/common.(*Build).retryCreateExecutor(0xc4204b0900, 0xc42034a280, 0xc4204b0900, 0x3080960, 0xc4204b06c0, 0x7fffd34e3f77, 0xd, 0x307f640, 0xc4201a2060, 0x3080900, ...)
Jun 8 21:27:00 gitlab gitlab-ci-multi-runner[28283]: #011/go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/common/build.go:314 +0x123
Jun 8 21:27:00 gitlab gitlab-ci-multi-runner[28283]: gitlab.com/gitlab-org/gitlab-ci-multi-runner/common.(*Build).Run(0xc4204b0900, 0xc42033d680, 0x3080960, 0xc4204b06c0, 0x0, 0x0)
Jun 8 21:27:00 gitlab gitlab-ci-multi-runner[28283]: #011/go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/common/build.go:387 +0x55a
Jun 8 21:27:00 gitlab gitlab-ci-multi-runner[28283]: gitlab.com/gitlab-org/gitlab-ci-multi-runner/commands.(*RunCommand).processRunner(0xc4202aa800, 0x0, 0xc42034a280, 0xc420442360, 0x0, 0x0)
Jun 8 21:27:00 gitlab gitlab-ci-multi-runner[28283]: #011/go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/commands/multi.go:175 +0x851
Jun 8 21:27:00 gitlab gitlab-ci-multi-runner[28283]: gitlab.com/gitlab-org/gitlab-ci-multi-runner/commands.(*RunCommand).processRunners(0xc4202aa800, 0x0, 0xc420442540, 0xc420442360)
Jun 8 21:27:00 gitlab gitlab-ci-multi-runner[28283]: #011/go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/commands/multi.go:183 +0x21a
Jun 8 21:27:00 gitlab gitlab-ci-multi-runner[28283]: created by gitlab.com/gitlab-org/gitlab-ci-multi-runner/commands.(*RunCommand).startWorkers
Jun 8 21:27:00 gitlab gitlab-ci-multi-runner[28283]: #011/go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/commands/multi.go:199 +0x9f
Jun 8 21:27:00 gitlab systemd[1]: gitlab-runner.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jun 8 21:27:00 gitlab systemd[1]: gitlab-runner.service: Unit entered failed state.
Jun 8 21:27:00 gitlab systemd[1]: gitlab-runner.service: Failed with result 'exit-code'.
Expected behavior
The build should start on the remote docker machine.
Environment description
Self-hosted gitlab + gitlab-ci. Fresh install.
Used GitLab Runner version
Version: 9.2.0
Git revision: adfc387
Git branch: 9-2-stable
GO version: go1.7.5
Built: Mon, 22 May 2017 16:00:24 +0000
OS/Arch: linux/amd64
Docker version 17.03.1-ce, build c6d412e
docker-machine version 0.10.0, build 76ed2a6
Edited by Cedric Veilleux