GitLab Pages in Docker doesn't serve newly created URLs until a container restart
Summary
Whenever we create a new project that tries to publish to GitLab Pages, GitLab serves 404s until we restart the container.
Updates to existing URLs get deployed immediately as we'd expect.
It's a bit suspicious that we have both gitlab-pages
and gitlab-pages-unprivileged
running at the same time:
root 622 0.0 0.0 4240 664 ? Ss Nov28 0:00 runsv gitlab-pages
root 2114 0.0 0.0 15380 9368 ? Sl Nov28 0:00 /opt/gitlab/embedded/bin/gitlab-pages -listen-proxy=localhost:8090 -listen-http=0.0.0.0:8081 -daemon-uid=998 -daemon-gid=998 -daemon-inplace-chroot=false -pages-domain=kiwi.wiki -pages-root=/var/opt/gitlab/gitlab-rails/shared/pages -redirect-http=false -use-http2=true -artifacts-server=https://gitlab.kiwi.com/api/v4 -artifacts-server-timeout=10 -admin-secret-path=/var/opt/gitlab/gitlab-pages/admin.secret -admin-unix-listener=/var/opt/gitlab/gitlab-pages/admin.socket
git 2123 0.0 0.0 25244 13288 ? Ssl Nov28 1:57 gitlab-pages-unprivileged
root 2244 0.0 0.0 4384 644 ? S Nov28 0:00 svlogd -tt /var/log/gitlab/gitlab-pages
Steps to reproduce
- Run the latest gitlab-ee Docker image
- Create a new project with a pages pipeline:
pages:
image: alpine
script: ['mkdir public', 'echo hi > public/index.html']
artifacts:
paths: ['public']
What is the current bug behavior?
Opening the new GitLab pages site will serve a 404 until you restart.
What is the expected correct behavior?
HTTP 200 should be served instantly after the pages:deploy step completes.
Relevant logs
Details of package version
gitlab/gitlab-ee:11.5.1-ee.0
Environment details
- Installation Target, remove incorrect values:
- Other: Rancher on AWS
- Installation Type:
- Have been upgrading monthly from the 8.x days
- Is there any other software running on the machine:
- No
- Is this a single or multiple node installation?
- 4 containers total
- Resources
- CPU: 4 nodes with 8x3 GHz each
- Memory total: 4 nodes with 60 GiB each
Configuration details
Provide the relevant sections of `/etc/gitlab/gitlab.rb`
pages_external_url "http://kiwi.wiki/" gitlab_pages['enable'] = true gitlab_pages['external_http'] = '0.0.0.0:8081' pages_nginx['enable'] = false
Edited by Bence Nagy