start failed due to /var/lib/gitlab-runner not exists
## Summary start failed due to /var/lib/gitlab-runner not exists ## Steps to reproduce - ubuntu 17.04 - installed gitlab-ci-multi-runner ( it was a mistake cause outdated ) - then installed correct latest ( https://docs.gitlab.com/runner/install/linux-repository.html ) - registered some runners - service gitlab-runner start - if your system lacks of the /var/lib/gitlab-runner directory it fails ( see syslog ) ## Actual behavior - service gitlab-runner status ( not started ) ## Expected behavior - it should ensure /var/lib/gitlab-runner ( may a package post-install check could enough ) ## Relevant logs and/or screenshots /var/log/syslog : ``` Dec 24 03:47:25 srv2 systemd[1]: Started GitLab Runner. Dec 24 03:47:25 srv2 gitlab-runner[602]: time="2017-12-24T03:47:25+01:00" level=info msg="Starting multi-runner from /etc/gitlab-runner/config.toml ..." builds=0 Dec 24 03:47:25 srv2 gitlab-runner[602]: time="2017-12-24T03:47:25+01:00" level=info msg="Running in system-mode." Dec 24 03:47:25 srv2 gitlab-runner[602]: time="2017-12-24T03:47:25+01:00" level=info msg="Starting multi-runner from /etc/gitlab-runner/config.toml ..." builds=0 Dec 24 03:47:25 srv2 gitlab-runner[602]: time="2017-12-24T03:47:25+01:00" level=info msg="Running in system-mode." Dec 24 03:47:25 srv2 gitlab-runner[602]: time="2017-12-24T03:47:25+01:00" level=info Dec 24 03:47:25 srv2 gitlab-runner[602]: time="2017-12-24T03:47:25+01:00" level=fatal msg="chdir /var/lib/gitlab-runner: no such file or directory" Dec 24 03:47:25 srv2 gitlab-runner[602]: time="2017-12-24T03:47:25+01:00" level=info Dec 24 03:47:25 srv2 gitlab-runner[602]: time="2017-12-24T03:47:25+01:00" level=fatal msg="chdir /var/lib/gitlab-runner: no such file or directory" Dec 24 03:47:25 srv2 systemd[1]: gitlab-runner.service: Main process exited, code=exited, status=1/FAILURE Dec 24 03:47:25 srv2 systemd[1]: gitlab-runner.service: Unit entered failed state. Dec 24 03:47:25 srv2 systemd[1]: gitlab-runner.service: Failed with result 'exit-code'. ``` ## Environment description ``` root@phy:/etc/gitlab-runner# docker info Containers: 16 Running: 13 Paused: 0 Stopped: 3 Images: 233 Server Version: 17.09.1-ce Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge host macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog Swarm: inactive Runtimes: runc Default Runtime: runc Init Binary: docker-init containerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0 runc version: 3f2f8b84a77f73d38244dd690525642a72156c64 init version: 949e6fa Security Options: apparmor seccomp Profile: default Kernel Version: 4.10.0-19-generic Operating System: Ubuntu 17.04 OSType: linux Architecture: x86_64 CPUs: 8 Total Memory: 31.16GiB Name: phy ID: QSK5:5N6W:NPZ6:EM7F:GBTE:VFO5:QM6U:OTSS:WB3T:BIYD:QGB2:5XSU Docker Root Dir: /var/lib/docker Debug Mode (client): false Debug Mode (server): false Registry: https://index.docker.io/v1/ Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false WARNING: bridge-nf-call-iptables is disabled WARNING: bridge-nf-call-ip6tables is disabled ``` ### Used GitLab Runner version ``` root@phy:/etc/gitlab-runner# gitlab-runner -v Version: 10.3.0 Git revision: 5cf5e19a Git branch: 10-3-stable GO version: go1.8.5 Built: Fri, 22 Dec 2017 08:47:19 +0000 OS/Arch: linux/amd64 ```
issue