After upgrading to 12.2 Pages shows 404 when access control enabled
Summary
I've upgraded our self-hosted GitLab instance from a previous 12.x release to latest version 12.2 using apt packages just a few days before. It's running on a Ubuntu Bionic-based server. I had some issue after upgrading. It was related to redis error for failing to increment some integer causing 500 views in admin section and occasionally on every view of GitLab. I fixed that by disabling request throttling via gitlab console as explained in a different thread.
Today I've tried to open a private project's pages site that has been successfully deployed before upgrading. Instead of the documents I get a 404 Not Found. I'm owner of the related project and I'm logged into GitLab in same browser. Pages are exposed using "wildcard domain with TLS" setup. In project settings, on Pages tab there is still the same URL promoted for accessing the pages.
Reloading didn't help. Re-running latest pipeline didn't help either. Tried adjusting the access control setting, which is basically enabled. I switched to "Everyone". After that I can see the pages. Tried to switch access control setting back to "Only Project Members". After that reloading pages results in 404 Not Found error.
I was checking the files in /var/opt/gitlab/gitlab-rails/shared/pages/. There are still some files.
I currently assume it's related to upgrading from 12.x to 12.2 instance.
Steps to reproduce
Example Project
(If possible, please create an example project here on GitLab.com that exhibits the problematic behavior, and link to it here in the bug report)
(If you are using an older version of GitLab, this will also determine whether the bug is fixed in a more recent version)
What is the current bug behavior?
There is a 404 when accessing pages.
What is the expected correct behavior?
There should be no error or at least it should redirect to sign-in if it's missing credentials.
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 18.04 Current User: git Using RVM: no Ruby Version: 2.6.3p62 Gem Version: 2.7.9 Bundler Version:1.17.3 Rake Version: 12.3.2 Redis Version: 3.2.12 Git Version: 2.22.0 Sidekiq Version:5.2.7 Go Version: unknownGitLab information Version: 12.2.0 Revision: 1c1d47c5974 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 10.9 URL: https://git.cepharum.de HTTP Clone URL: https://git.cepharum.de/some-group/some-project.git SSH Clone URL: git@git.cepharum.de:some-group/some-project.git Using LDAP: no Using Omniauth: yes Omniauth Providers:
GitLab Shell Version: 9.3.0 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ...Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 9.3.0 ? ... OK (9.3.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Checking Reply by email ...
IMAP server credentials are correct? ... yes Init.d configured correctly? ... skipped MailRoom running? ... skipped
Checking Reply by email ... Finished
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
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: ... 6/1 ... yes 8/2 ... yes 8/3 ... yes 8/4 ... yes 9/5 ... yes 8/7 ... yes 8/8 ... yes 10/9 ... yes 10/10 ... yes 10/11 ... yes 10/12 ... yes 8/13 ... yes 4/15 ... yes 11/17 ... yes 16/19 ... yes 11/20 ... yes 11/21 ... yes 13/23 ... yes 17/24 ... yes 8/25 ... yes 8/26 ... yes 17/27 ... yes 8/28 ... yes 17/29 ... yes 15/30 ... yes 15/31 ... yes 15/32 ... yes 15/33 ... yes 15/34 ... yes 15/35 ... yes 15/36 ... yes 16/37 ... yes 10/38 ... yes 10/39 ... yes 10/40 ... yes 10/41 ... yes 16/42 ... yes 8/43 ... yes 8/44 ... yes 9/45 ... yes 8/46 ... yes 3/47 ... yes 8/48 ... yes 14/49 ... yes 4/50 ... yes 19/51 ... yes 43/52 ... yes 43/53 ... yes 22/54 ... yes 19/55 ... yes 22/56 ... yes 43/57 ... yes 7/58 ... yes 24/59 ... yes 24/60 ... yes 24/61 ... yes 24/62 ... yes 24/63 ... yes 24/64 ... yes 24/65 ... yes 24/66 ... yes 24/67 ... yes 24/68 ... yes 24/69 ... yes 24/70 ... yes 18/71 ... yes 24/73 ... yes 25/74 ... yes 24/75 ... yes 24/76 ... yes 8/77 ... yes 43/78 ... yes 26/79 ... yes 26/80 ... yes 43/81 ... yes 10/82 ... yes 27/83 ... yes 27/84 ... yes 27/85 ... yes 6/86 ... yes 8/87 ... yes 31/88 ... yes 8/89 ... yes 10/90 ... yes 8/91 ... yes 8/94 ... yes 37/95 ... yes 37/96 ... yes 13/97 ... yes 13/98 ... yes 13/99 ... yes 13/100 ... yes 40/101 ... yes 31/102 ... yes 10/103 ... yes 19/104 ... yes 41/107 ... yes 10/108 ... yes 10/109 ... yes 13/110 ... yes 4/111 ... yes 4/112 ... yes 20/113 ... yes 20/114 ... yes 20/115 ... yes 20/116 ... yes 20/117 ... yes 20/118 ... yes 20/119 ... yes 20/120 ... yes 20/121 ... yes 20/122 ... yes 20/123 ... yes 20/128 ... yes 8/129 ... yes 20/130 ... yes 13/131 ... yes 20/132 ... yes 8/133 ... yes 3/134 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.3) Git version >= 2.22.0 ? ... yes (2.22.0) Git user has default SSH configuration? ... yes Active users: ... 16
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)