Omnibus generates invalid gitlab-pages-config: "auth-redirect-uri must be defined if authentication is supported"

Summary

Since updating to GitLab CE 13.8.0 our GitLab's pages daemon is broken and no longer starts.

This is probably related to 03078ac3

Steps to reproduce

Install GitLab via the official Docker image with disabled pages access control (see config below).

What is the current bug behavior?

The generated gitlab-pages-config contains some OAuth2-related config settings, but no auth-redirect-uri causing the startup to fail.

What is the expected correct behavior?

The GitLab pages config is generated consistently so that the GitLab pages daemon will start.

Relevant logs

Relevant logs
==> /var/log/gitlab/gitlab-pages/current <==
{"level":"info","msg":"GitLab Pages Daemon","revision":"e4ddf96","time":"2021-01-22T19:27:09Z","version":"1.34.0"}
{"level":"info","msg":"URL: https://gitlab.com/gitlab-org/gitlab-pages","time":"2021-01-22T19:27:09Z"}
{"level":"fatal","msg":"auth-redirect-uri must be defined if authentication is supported","time":"2021-01-22T19:27:09Z"}
{"level":"info","msg":"GitLab Pages Daemon","revision":"e4ddf96","time":"2021-01-22T19:27:10Z","version":"1.34.0"}
{"level":"info","msg":"URL: https://gitlab.com/gitlab-org/gitlab-pages","time":"2021-01-22T19:27:10Z"}
{"level":"fatal","msg":"auth-redirect-uri must be defined if authentication is supported","time":"2021-01-22T19:27:10Z"}

Details of package version

Provide the package version installation details
gitlab-ce=13.8.0-ce.

$ docker image ls

gitlab/gitlab-ce latest 3a69f304b219 27 hours ago 2.15GB

Environment details

  • Operating System: Linux *REDACTED* 5.4.0-62-generic #70-Ubuntu SMP Tue Jan 12 12:45:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
  • Installation Target, remove incorrect values:
    • Bare Metal Machine
  • Installation Type, remove incorrect values:
    • Upgrade from version 13.7.4
  • Is this a single or multiple node installation? single

Configuration details

Provide the relevant sections of `/etc/gitlab/gitlab.rb`
pages_external_url "http://pages.*REDACTED*/"

gitlab_pages['enable'] = true gitlab_pages['inplace_chroot'] = true gitlab_pages['external_http'] = ['0.0.0.0:81'] pages_nginx['enable'] = false gitlab_pages['access_control'] = false

gitlab-pages-config

pages-domain=pages.REDACTED pages-root=/var/opt/gitlab/gitlab-rails/shared/pages daemon-uid=998 daemon-gid=998 daemon-inplace-chroot=true api-secret-key=/var/opt/gitlab/gitlab-pages/.gitlab_pages_secret auth-client-id=REDACTED auth-client-secret=REDACTED auth-secret=REDACTED listen-proxy=localhost:8090 log-format=json artifacts-server=https://gitlab.REDACTED/api/v4 artifacts-server-timeout=10 gitlab-server=https://gitlab.REDACTED listen-http=0.0.0.0:81

Edited by Thilo-Alexander Ginkel