Rake tasks "env:info" and "check" abort on correctly configured Pages server
Summary
After setting up a separate Pages server, gitlab-rake gitlab:env:info
does not run through completely.
Steps to reproduce
- Follow docs to "Running[…] GitLab Pages on a separate server"
- Run
gitlab-rake gitlab:env:info
andgitlab-rake gitlab:check
on that Pages server
Example Project
What is the current bug behavior?
For both tasks:
rake aborted!
PG::ConnectionBad: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/opt/gitlab/postgresql/.s.PGSQL.5432"?
…trace…
(See full trace by running task with --trace)
env:info
's …trace…
is
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/info.rake:48:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Tasks: TOP => gitlab:env:info
check
's …trace…
is
/opt/gitlab/embedded/service/gitlab-rails/ee/lib/gitlab/geo.rb:36:in `block in enabled?'
/opt/gitlab/embedded/service/gitlab-rails/ee/lib/gitlab/geo.rb:100:in `block (2 levels) in cache_value'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/json_cache.rb:51:in `fetch'
/opt/gitlab/embedded/service/gitlab-rails/ee/lib/gitlab/geo.rb:100:in `block in cache_value'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/json_cache.rb:51:in `fetch'
/opt/gitlab/embedded/service/gitlab-rails/ee/lib/gitlab/geo.rb:99:in `cache_value'
/opt/gitlab/embedded/service/gitlab-rails/ee/lib/gitlab/geo.rb:36:in `enabled?'
/opt/gitlab/embedded/service/gitlab-rails/ee/lib/ee/system_check/rake_task/gitlab_task.rb:16:in `subtasks'
/opt/gitlab/embedded/service/gitlab-rails/lib/system_check/rake_task/gitlab_task.rb:16:in `manual_run_checks!'
/opt/gitlab/embedded/service/gitlab-rails/lib/system_check/rake_task/rake_task_helpers.rb:13:in `run!'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/check.rake:4:in `block (2 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Tasks: TOP => gitlab:check
What is the expected correct behavior?
Rake task should complete and reflect the fact that postgresql['enable'] = false
(and others) was set as expected during the Pages config.
Relevant logs and/or screenshots
See above.
Output of checks
See above.
Results of GitLab environment info
See above.
Results of GitLab application Check
See above.
Possible fixes
Maybe the Rake task could be expanded with a check for disabled PG but correctly set pages_external_url "http://<your-pages-server-URL>"
and if so, output:
GitLab information
…
DB Adapter: none, see https://gitlab.com/gitlab-org/gitlab/-/blob/#{GitLab::VERSION}/doc/administration/pages/index.md#running-gitlab-pages-on-a-separate-server
…
Or a rescue
or try_fixing_it can be inserted? Likely at info.rake#L50.
Something similar is done when upgrading:
gitlab preinstall: This node does not appear to be running a database
gitlab preinstall: Skipping version check, if you think this is an error exit now
Edited by Katrin Leinweber (GTLB)