Skip to content

Pages "auto" configuration source doesn't work as expected

After 13.7 some people started to have problems with gitlab-pages. Most common symptom: pages are available 50% of the time.

The problem is only present if people have multiple servers running both pages and gitlab-rails(see below)

Consider this setup

  • client has gitlab instance "gitlab.example.com"
  • and multiple servers running both gitlab-rails and gitlab-pages simultaneously

How "auto" currently works

  • During startup gitlab-pages checks if the API is available multiple times until it gets 200 OK in response. Which it eventually does because there is a load balancer for "gitlab.example.com" and eventually gitlab-pages hits the same server as one it's running on.
  • Then gitlab-pages remembers that API is functioning and will serve 502 errors if it isn't.

Workaround

Suggested fix

change "auto" behavior: if we ever fail to access API with unauthorized error - fallback to disk. (do not do this if gitlab is set explicitly).

Edited by Vladimir Shushlin