Locks on runner config files prevent more than one runner with shared config
Summary
The recent change in !1496 (merged) has broken our ability to start more than one runner on containers in a Docker swarm. We mount in a shared config file from a single source so all replica containers in the swarm service have the same shared config. Only the first container will start now. All other containers error out that the config file is locked
Steps to reproduce
Were using the gitlab/gitlab-runner image and using a bind mount so all runner containers in the swarm service share the following config file:
/etc/gitlab-runner/config.toml
This has worked great until we updated to the latest runner.
Actual behavior
Configuration loaded builds=0
Locking configuration file builds=0 file=/etc/gitlab-runner/config.toml pid=7
FATAL: Could not handle configuration file locking builds=0 error=file "/etc/gitlab-runner/config.toml" is locked by another process file=/etc/gitlab-runner/config.toml pid=7
Expected behavior
I'd like to be able to run more than one runner container in a docker swarm with the config file mounted externally.
Environment description
Running Swarm 18.06.1-ce
Used GitLab Runner version
Version: 12.2.0
Git revision: a987417a
Git branch: 12-2-stable
GO version: go1.8.7
Built: 2019-08-22T13:06:00+0000
OS/Arch: linux/amd64