"WARNING: Environment variable prometheus_multiproc_dir does not exist or is not pointing to a valid directory." out of the box


Summary

We run Gitlab CE on Kubernetes in GCP (image: gitlab/gitlab-ce:10.0.3-ce.0). Out of the box I see the following warning in admin UI:

WARNING: Environment variable prometheus_multiproc_dir does not exist or is not pointing to a valid directory.

Probably because of that /-/metrics gives me 404. I tried to setup the value for the environment variable manually and restart the pod:

~/pro/gitlab-ci-kubernetes (master *$=) → kubectl exec  gitlab-1205450473-4zmwv -n gitlab -- env | grep 'prometheus_multiproc_dir'
Defaulting container name to gitlab.
Use 'kubectl describe pod/gitlab-1205450473-4zmwv' to see all of the containers in this pod.
prometheus_multiproc_dir=/tmp/prometheus_multiproc_dir

but it didn't help. Probably because the directory does not exist:

~/pro/gitlab-ci-kubernetes (master *$=) → kubectl exec  gitlab-1205450473-4zmwv -n gitlab -- env | ls /tmp/prometheus_multiproc_dir
ls: /tmp/prometheus_multiproc_dir: No such file or directory
Defaulting container name to gitlab.
Use 'kubectl describe pod/gitlab-1205450473-4zmwv' to see all of the containers in this pod.

I couldn't find any official recommendation about the way the value should be setup so that would be great to have. But more importantly I believe the variable should be populated with a valid value out of the box.

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info
System information
System:
Current User:	git
Using RVM:	no
Ruby Version:	2.3.5p376
Gem Version:	2.6.13
Bundler Version:1.13.7
Rake Version:	12.0.0
Redis Version:	3.2.5
Git Version:	2.13.5
Sidekiq Version:5.0.4
Go Version:	unknown

GitLab information Version: 10.0.3 Revision: 8895150 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://gitlab.bol.io HTTP Clone URL: https://gitlab.bol.io/some-group/some-project.git SSH Clone URL: git@gitlab.bol.io:some-group/some-project.git Using LDAP: no Using Omniauth: no

GitLab Shell Version: 5.9.0 Repository storage paths:

  • default: /gitlab-data/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git

Results of GitLab application Check

Expand for output related to the GitLab application check
Checking GitLab Shell ...

GitLab Shell version >= 5.9.0 ? ... OK (5.9.0) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 9/2 ... ok 8/5 ... ok 12/9 ... ok 16/10 ... ok 19/43 ... ok 20/44 ... repository is empty 17/48 ... ok 17/49 ... ok 17/50 ... ok 17/51 ... ok 17/52 ... ok 17/53 ... ok 17/54 ... ok 17/55 ... ok 17/56 ... ok 17/57 ... ok 17/58 ... ok 17/59 ... ok 17/60 ... ok 17/61 ... ok 17/62 ... ok 17/63 ... ok 17/64 ... ok 17/65 ... ok 17/66 ... ok 17/67 ... ok 17/68 ... ok 17/69 ... ok 17/70 ... ok 17/71 ... ok 17/72 ... ok 17/73 ... ok 17/74 ... ok 17/75 ... ok 17/76 ... ok 21/77 ... ok 22/78 ... ok 23/79 ... ok 24/80 ... ok 19/81 ... ok 41/87 ... ok 33/98 ... ok 9/99 ... ok 40/100 ... ok 40/101 ... ok 45/102 ... ok 11/103 ... ok 10/104 ... ok 40/105 ... ok 40/107 ... ok 41/108 ... ok 19/109 ... ok Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK

Access to /gitlab-data/ssh/authorized_keys: OK gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Reply by email is disabled in config/gitlab.yml Checking LDAP ...

LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab ...

Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 9/2 ... yes 8/5 ... yes 12/9 ... yes 16/10 ... yes 19/43 ... yes 20/44 ... yes 17/48 ... yes 17/49 ... yes 17/50 ... yes 17/51 ... yes 17/52 ... yes 17/53 ... yes 17/54 ... yes 17/55 ... yes 17/56 ... yes 17/57 ... yes 17/58 ... yes 17/59 ... yes 17/60 ... yes 17/61 ... yes 17/62 ... yes 17/63 ... yes 17/64 ... yes 17/65 ... yes 17/66 ... yes 17/67 ... yes 17/68 ... yes 17/69 ... yes 17/70 ... yes 17/71 ... yes 17/72 ... yes 17/73 ... yes 17/74 ... yes 17/75 ... yes 17/76 ... yes 21/77 ... yes 22/78 ... yes 23/79 ... yes 24/80 ... yes 19/81 ... yes 41/87 ... yes 33/98 ... yes 9/99 ... yes 40/100 ... yes 40/101 ... yes 45/102 ... yes 11/103 ... yes 10/104 ... yes 40/105 ... yes 40/107 ... yes 41/108 ... yes 19/109 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.3 ? ... yes (2.3.5) Git version >= 2.7.3 ? ... yes (2.13.5) Git user has default SSH configuration? ... yes Active users: ... 31

Checking GitLab ... Finished