All project fork attempts return 500
Summary
Projects that used to be fork-able no longer fork, and instead return a 500 error.
What is the current bug behavior?
Any time a user attempts to fork a project, any project, and any user, an error 500 is returned. This is across all groups and projects, most with internal visibility. We have tried changing visibility to public, but this still fails.
What is the expected correct behavior?
A project with internal visibility should be forked by all logged on users.
Relevant logs and/or screenshots
Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
Started POST "/research/[REDACTED PROJECT]/forks?namespace_key=[FILTERED]" for [REDACTED IP] at 2018-01-30 09:13:49 -0500
Processing by Projects::ForksController#create as HTML
Parameters: {"authenticity_token"=>"[FILTERED]", "namespace_key"=>"[FILTERED]", "namespace_id"=>"research", "project_id"=>"[REDACTED]"}
Completed 500 Internal Server Error in 14ms (ActiveRecord: 2.3ms)
TypeError (no implicit conversion of nil into Array):
lib/gitlab/visibility_level.rb:63:in `-'
lib/gitlab/visibility_level.rb:63:in `allowed_levels'
lib/gitlab/visibility_level.rb:67:in `closest_allowed_level'
app/services/projects/fork_service.rb:84:in `allowed_visibility_level'
app/services/projects/fork_service.rb:24:in `fork_new_project'
app/services/projects/fork_service.rb:7:in `execute'
app/controllers/projects/forks_controller.rb:41:in `create'
lib/gitlab/i18n.rb:47:in `with_locale'
lib/gitlab/i18n.rb:53:in `with_user_locale'
app/controllers/application_controller.rb:324:in `set_locale'
lib/gitlab/middleware/multipart.rb:93:in `call'
lib/gitlab/request_profiler/middleware.rb:14:in `call'
lib/gitlab/middleware/go.rb:18:in `call'
lib/gitlab/etag_caching/middleware.rb:11:in `call'
lib/gitlab/middleware/read_only.rb:31:in `call'
lib/gitlab/request_context.rb:18:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 14.04 Current User: git Using RVM: no Ruby Version: 2.3.6p384 Gem Version: 2.6.13 Bundler Version:1.13.7 Rake Version: 12.3.0 Redis Version: 3.2.11 Git Version: 2.14.3 Sidekiq Version:5.0.5 Go Version: unknown
GitLab information Version: 10.4.1 Revision: be80a97 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://[internal].com HTTP Clone URL: https://[internal].com/some-group/some-project.git SSH Clone URL: git@[internal].com:some-group/some-project.git Using LDAP: yes Using Omniauth: no
GitLab Shell Version: 5.11.0 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab Shell ...GitLab Shell version >= 5.11.0 ? ... OK (5.11.0) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 3/1 ... ok 4/2 ... ok 3/3 ... ok 2/4 ... ok 3/5 ... ok 9/7 ... ok 3/8 ... ok 5/10 ... ok 10/11 ... ok 6/12 ... ok 19/15 ... ok 11/16 ... ok 10/19 ... ok 10/20 ... ok 10/21 ... ok 3/22 ... ok 11/23 ... ok 15/24 ... ok 3/25 ... ok 3/26 ... ok 3/27 ... ok 3/29 ... ok 17/30 ... ok 18/31 ... ok 3/32 ... ok 2/33 ... repository is empty 11/34 ... ok 16/35 ... ok 15/36 ... ok 15/37 ... ok 10/39 ... ok 14/41 ... ok 16/42 ... ok 14/43 ... ok 16/44 ... ok 14/46 ... ok 14/47 ... ok 10/48 ... ok 14/49 ... ok 23/51 ... ok 25/52 ... ok 25/53 ... ok 2/58 ... repository is empty 3/62 ... ok 10/63 ... ok 10/64 ... ok 22/66 ... ok 15/67 ... ok 25/68 ... ok 27/69 ... ok 27/70 ... repository is empty 27/71 ... ok 29/74 ... repository is empty 29/75 ... ok 25/77 ... ok 25/78 ... ok 19/79 ... ok 31/80 ... ok 31/82 ... ok 18/83 ... ok 28/84 ... ok 31/85 ... ok 10/87 ... ok 14/88 ... ok 14/89 ... ok 14/90 ... ok 26/91 ... ok 14/92 ... ok 31/94 ... ok 25/95 ... ok 31/99 ... ok 26/100 ... ok 25/101 ... ok 15/102 ... ok 25/104 ... ok 20/105 ... ok 20/107 ... repository is empty 31/108 ... ok 31/109 ... ok 16/110 ... ok 25/111 ... ok 31/112 ... ok 25/113 ... ok 10/115 ... ok 15/116 ... ok 25/117 ... ok 32/118 ... repository is empty 16/120 ... ok 25/121 ... ok 39/122 ... ok 39/123 ... ok 39/124 ... ok 39/125 ... ok 39/126 ... ok 10/127 ... ok 31/128 ... ok 31/129 ... ok 25/130 ... ok 25/131 ... ok 25/132 ... ok 25/133 ... ok 10/134 ... ok 32/135 ... ok 25/136 ... ok 25/137 ... ok 32/138 ... ok 15/139 ... ok 14/140 ... ok 25/141 ... ok 6/142 ... ok 30/143 ... ok 26/144 ... repository is empty 38/145 ... ok 10/147 ... ok 49/148 ... ok 10/149 ... ok 38/150 ... ok 22/151 ... repository is empty 25/153 ... ok 32/155 ... ok 31/157 ... ok 28/158 ... ok 32/159 ... ok 27/160 ... ok 10/163 ... ok 20/164 ... ok 14/165 ... ok 14/166 ... ok 25/167 ... ok 3/168 ... ok 14/170 ... ok 36/172 ... repository is empty 6/173 ... ok 38/174 ... ok 36/175 ... ok 25/176 ... ok 25/177 ... ok 32/178 ... ok 31/179 ... ok 31/182 ... ok 31/183 ... ok 39/184 ... ok 16/185 ... ok 30/186 ... ok 26/187 ... ok 6/188 ... ok 31/189 ... ok 22/190 ... ok 15/191 ... ok 38/192 ... repository is empty 31/193 ... ok 14/194 ... ok 33/195 ... ok 52/196 ... ok 52/197 ... ok 52/199 ... ok 52/200 ... ok 15/201 ... ok 50/202 ... ok 14/203 ... repository is empty 38/204 ... ok 50/206 ... ok 50/207 ... ok 50/208 ... ok 22/209 ... ok 52/210 ... ok 52/211 ... ok 20/212 ... ok 25/213 ... ok 20/214 ... ok 36/215 ... ok 25/216 ... ok 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 Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Reply by email is disabled in config/gitlab.yml Checking LDAP ...
Server: [redacted] LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results)
[redacted]
Checking LDAP ... Finished
Checking GitLab ...
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? ... no Try fixing it: sudo chown -R git /var/opt/gitlab/gitlab-rails/uploads sudo find /var/opt/gitlab/gitlab-rails/uploads -type f -exec chmod 0644 {} ; sudo find /var/opt/gitlab/gitlab-rails/uploads -type d -not -path /var/opt/gitlab/gitlab-rails/uploads -exec chmod 0700 {} ; For more information see: doc/install/installation.md in section "GitLab" Please fix the error above and rerun the checks. 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: ... 3/1 ... yes 4/2 ... yes 3/3 ... yes 2/4 ... yes 3/5 ... yes 9/7 ... yes 3/8 ... yes 5/10 ... yes 10/11 ... yes 6/12 ... yes 19/15 ... yes 11/16 ... yes 10/19 ... yes 10/20 ... yes 10/21 ... yes 3/22 ... yes 11/23 ... yes 15/24 ... yes 3/25 ... yes 3/26 ... yes 3/27 ... yes 3/29 ... yes 17/30 ... yes 18/31 ... yes 3/32 ... yes 2/33 ... yes 11/34 ... yes 16/35 ... yes 15/36 ... yes 15/37 ... yes 10/39 ... yes 14/41 ... yes 16/42 ... yes 14/43 ... yes 16/44 ... yes 14/46 ... yes 14/47 ... yes 10/48 ... yes 14/49 ... yes 23/51 ... yes 25/52 ... yes 25/53 ... yes 2/58 ... yes 3/62 ... yes 10/63 ... yes 10/64 ... yes 22/66 ... yes 15/67 ... yes 25/68 ... yes 27/69 ... yes 27/70 ... yes 27/71 ... yes 29/74 ... yes 29/75 ... yes 25/77 ... yes 25/78 ... yes 19/79 ... yes 31/80 ... yes 31/82 ... yes 18/83 ... yes 28/84 ... yes 31/85 ... yes 10/87 ... yes 14/88 ... yes 14/89 ... yes 14/90 ... yes 26/91 ... yes 14/92 ... yes 31/94 ... yes 25/95 ... yes 31/99 ... yes 26/100 ... yes 25/101 ... yes 15/102 ... yes 25/104 ... yes 20/105 ... yes 20/107 ... yes 31/108 ... yes 31/109 ... yes 16/110 ... yes 25/111 ... yes 31/112 ... yes 25/113 ... yes 10/115 ... yes 15/116 ... yes 25/117 ... yes 32/118 ... yes 16/120 ... yes 25/121 ... yes 39/122 ... yes 39/123 ... yes 39/124 ... yes 39/125 ... yes 39/126 ... yes 10/127 ... yes 31/128 ... yes 31/129 ... yes 25/130 ... yes 25/131 ... yes 25/132 ... yes 25/133 ... yes 10/134 ... yes 32/135 ... yes 25/136 ... yes 25/137 ... yes 32/138 ... yes 15/139 ... yes 14/140 ... yes 25/141 ... yes 6/142 ... yes 30/143 ... yes 26/144 ... yes 38/145 ... yes 10/147 ... yes 49/148 ... yes 10/149 ... yes 38/150 ... yes 22/151 ... yes 25/153 ... yes 32/155 ... yes 31/157 ... yes 28/158 ... yes 32/159 ... yes 27/160 ... yes 10/163 ... yes 20/164 ... yes 14/165 ... yes 14/166 ... yes 25/167 ... yes 3/168 ... yes 14/170 ... yes 36/172 ... yes 6/173 ... yes 38/174 ... yes 36/175 ... yes 25/176 ... yes 25/177 ... yes 32/178 ... yes 31/179 ... yes 31/182 ... yes 31/183 ... yes 39/184 ... yes 16/185 ... yes 30/186 ... yes 26/187 ... yes 6/188 ... yes 31/189 ... yes 22/190 ... yes 15/191 ... yes 38/192 ... yes 31/193 ... yes 14/194 ... yes 33/195 ... yes 52/196 ... yes 52/197 ... yes 52/199 ... yes 52/200 ... yes 15/201 ... yes 50/202 ... yes 14/203 ... yes 38/204 ... yes 50/206 ... yes 50/207 ... yes 50/208 ... yes 22/209 ... yes 52/210 ... yes 52/211 ... yes 20/212 ... yes 25/213 ... yes 20/214 ... yes 36/215 ... yes 25/216 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.3.6) Git version >= 2.7.3 ? ... yes (2.14.3) Git user has default SSH configuration? ... yes Active users: ... 37
Checking GitLab ... Finished