v8.11.7 to v8.12.1 Upgrade /app/models/concerns/statuseable.rb is missing and trigger exception in unicorn
Summary
On Ubuntu 15.04 After an update from gitlab-ce (8.12.1-ce.0) to (8.11.7-ce.0) ...
Unicorn don't want to boot , the webpage say Gitlab make too much time to respond.
Steps to reproduce
Install a Gitlab 8.11.7-ce.0 on Ubuntu 14.05 via Omnibus then upgrade to 8.12.1-ce.0 (not sure if it can be reproducible)
Expected behavior
Gitlab must open after a short period of time
Actual behavior
Gitlab keep saying "Gitlab make too much time to respond."
Relevant logs and/or screenshots
Unicorn stderr
I, [2016-09-28T09:59:05.521044 #3369] INFO -- : Refreshing Gem list
NameError: uninitialized constant Ci::Commit::Statuseable
/opt/gitlab/embedded/service/gitlab-rails/app/models/ci/commit.rb:4:in `<class:Commit>'
/opt/gitlab/embedded/service/gitlab-rails/app/models/ci/commit.rb:2:in `<module:Ci>'
/opt/gitlab/embedded/service/gitlab-rails/app/models/ci/commit.rb:1:in `<top (required)>'
/opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:472:in `block (2 levels) in eager_load!'
/opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:471:in `each'
/opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:471:in `block in eager_load!'
/opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:469:in `each'
/opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:469:in `eager_load!'
/opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:346:in `eager_load!'
/opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/application/finisher.rb:56:in `each'
/opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
/opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:30:in `instance_exec'
/opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:30:in `run'
/opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
/opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
/opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
/opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
/opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:347:in `each'
/opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:347:in `call'
/opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
/opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
/opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
/opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:54:in `run_initializers'
/opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/application.rb:352:in `initialize!'
/opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:5:in `<top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/config.ru:19:in `require'
/opt/gitlab/embedded/service/gitlab-rails/config.ru:19:in `block in <main>'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
/opt/gitlab/embedded/service/gitlab-rails/config.ru:1:in `new'
/opt/gitlab/embedded/service/gitlab-rails/config.ru:1:in `<main>'
/opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/unicorn-4.9.0/lib/unicorn.rb:48:in `eval'
/opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/unicorn-4.9.0/lib/unicorn.rb:48:in `block in builder'
/opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/unicorn-4.9.0/lib/unicorn/http_server.rb:768:in `build_app!'
/opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/unicorn-4.9.0/lib/unicorn/http_server.rb:137:in `start'
/opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/unicorn-4.9.0/bin/unicorn:126:in `<top (required)>'
/opt/gitlab/embedded/service/gem/ruby/2.3.0/bin/unicorn:22:in `load'
/opt/gitlab/embedded/service/gem/ruby/2.3.0/bin/unicorn:22:in `<top (required)>'
Output of checks
Results of GitLab application Check
Checking GitLab Shell ...
GitLab Shell version >= 3.6.0 ? ... OK (3.6.0)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by git:git?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ...
8/2 ... ok
12/3 ... ok
12/4 ... ok
12/5 ... ok
12/6 ... ok
8/7 ... ok
8/8 ... ok
8/9 ... ok
8/10 ... ok
8/11 ... ok
8/12 ... ok
8/13 ... ok
8/16 ... ok
8/17 ... ok
14/18 ... ok
14/19 ... ok
15/22 ... ok
15/23 ... ok
16/24 ... ok
8/25 ... ok
14/26 ... ok
12/27 ... ok
14/29 ... ok
14/30 ... ok
17/31 ... ok
7/32 ... ok
7/33 ... ok
7/34 ... ok
21/35 ... ok
22/36 ... ok
23/37 ... ok
23/38 ... ok
23/39 ... ok
24/40 ... ok
23/41 ... ok
7/42 ... ok
12/43 ... ok
28/45 ... ok
29/46 ... ok
29/47 ... ok
23/48 ... ok
30/49 ... ok
31/50 ... ok
31/51 ... ok
31/52 ... ok
31/53 ... ok
31/54 ... ok
31/55 ... ok
31/56 ... ok
31/57 ... ok
31/58 ... ok
31/59 ... ok
31/60 ... ok
31/61 ... ok
31/62 ... ok
31/63 ... ok
16/64 ... ok
16/65 ... ok
23/66 ... ok
32/67 ... ok
32/68 ... ok
34/69 ... ok
8/70 ... ok
32/71 ... ok
35/73 ... ok
8/74 ... ok
36/75 ... ok
35/76 ... ok
22/77 ... ok
15/78 ... ok
38/80 ... ok
14/81 ... ok
15/82 ... ok
15/83 ... ok
15/84 ... ok
8/85 ... ok
8/86 ... ok
7/87 ... ok
8/88 ... ok
12/89 ... ok
34/90 ... ok
35/91 ... ok
15/92 ... ok
8/93 ... ok
8/94 ... ok
12/95 ... ok
35/96 ... ok
6/97 ... ok
35/98 ... ok
35/99 ... ok
35/100 ... ok
35/101 ... ok
14/102 ... ok
35/103 ... ok
7/104 ... ok
8/105 ... ok
15/106 ... ok
35/107 ... ok
8/108 ... ok
35/109 ... ok
35/110 ... ok
7/112 ... ok
34/113 ... ok
35/114 ... ok
35/115 ... ok
35/116 ... ok
35/117 ... ok
8/118 ... repository is empty
43/120 ... ok
43/121 ... ok
43/122 ... ok
8/123 ... ok
8/124 ... ok
35/125 ... ok
12/126 ... ok
44/127 ... ok
8/129 ... ok
8/130 ... ok
15/131 ... ok
34/132 ... ok
43/133 ... ok
7/134 ... ok
8/135 ... ok
12/137 ... ok
8/138 ... ok
35/139 ... repository is empty
35/140 ... ok
7/141 ... ok
7/142 ... ok
8/143 ... ok
44/144 ... ok
35/145 ... ok
39/146 ... ok
34/147 ... ok
35/148 ... ok
35/149 ... ok
35/150 ... repository is empty
8/151 ... ok
35/152 ... ok
31/153 ... ok
14/154 ... ok
35/155 ... ok
8/156 ... ok
35/157 ... ok
35/158 ... ok
39/159 ... ok
35/160 ... ok
8/161 ... ok
8/163 ... ok
43/164 ... ok
6/165 ... ok
15/166 ... ok
8/167 ... ok
35/168 ... repository is empty
7/169 ... ok
8/170 ... ok
35/171 ... ok
6/172 ... ok
8/173 ... ok
8/175 ... ok
8/176 ... ok
6/177 ... ok
7/178 ... ok
7/179 ... ok
47/180 ... ok
48/181 ... ok
35/182 ... ok
35/183 ... ok
35/184 ... repository is empty
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK
Send ping to redis server: OK
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ...
LDAP users with access to your GitLab server (only showing the first 100 results)
Server: ldapmain
[....]
DN: uid=thibault,cn=users,dc=display-interactive,dc=com uid: thibault
[...]
Checking LDAP ... Finished
Checking GitLab ...
Git configured with autocrlf=input? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory setup correctly? ... 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: ...
8/2 ... yes
12/3 ... yes
12/4 ... yes
12/5 ... yes
12/6 ... yes
8/7 ... yes
8/8 ... yes
8/9 ... yes
8/10 ... yes
8/11 ... yes
8/12 ... yes
8/13 ... yes
8/16 ... yes
8/17 ... yes
14/18 ... yes
14/19 ... yes
15/22 ... yes
15/23 ... yes
16/24 ... yes
8/25 ... yes
14/26 ... yes
12/27 ... yes
14/29 ... yes
14/30 ... yes
17/31 ... yes
7/32 ... yes
7/33 ... yes
7/34 ... yes
21/35 ... yes
22/36 ... yes
23/37 ... yes
23/38 ... yes
23/39 ... yes
24/40 ... yes
23/41 ... yes
7/42 ... yes
12/43 ... yes
28/45 ... yes
29/46 ... yes
29/47 ... yes
23/48 ... yes
30/49 ... yes
31/50 ... yes
31/51 ... yes
31/52 ... yes
31/53 ... yes
31/54 ... yes
31/55 ... yes
31/56 ... yes
31/57 ... yes
31/58 ... yes
31/59 ... yes
31/60 ... yes
31/61 ... yes
31/62 ... yes
31/63 ... yes
16/64 ... yes
16/65 ... yes
23/66 ... yes
32/67 ... yes
32/68 ... yes
34/69 ... yes
8/70 ... yes
32/71 ... yes
35/73 ... yes
8/74 ... yes
36/75 ... yes
35/76 ... yes
22/77 ... yes
15/78 ... yes
38/80 ... yes
14/81 ... yes
15/82 ... yes
15/83 ... yes
15/84 ... yes
8/85 ... yes
8/86 ... yes
7/87 ... yes
8/88 ... yes
12/89 ... yes
34/90 ... yes
35/91 ... yes
15/92 ... yes
8/93 ... yes
8/94 ... yes
12/95 ... yes
35/96 ... yes
6/97 ... yes
35/98 ... yes
35/99 ... yes
35/100 ... yes
35/101 ... yes
14/102 ... yes
35/103 ... yes
7/104 ... yes
8/105 ... yes
15/106 ... yes
35/107 ... yes
8/108 ... yes
35/109 ... yes
35/110 ... yes
7/112 ... yes
34/113 ... yes
35/114 ... yes
35/115 ... yes
35/116 ... yes
35/117 ... yes
8/118 ... yes
43/120 ... yes
43/121 ... yes
43/122 ... yes
8/123 ... yes
8/124 ... yes
35/125 ... yes
12/126 ... yes
44/127 ... yes
8/129 ... yes
8/130 ... yes
15/131 ... yes
34/132 ... yes
43/133 ... yes
7/134 ... yes
8/135 ... yes
12/137 ... yes
8/138 ... yes
35/139 ... yes
35/140 ... yes
7/141 ... yes
7/142 ... yes
8/143 ... yes
44/144 ... yes
35/145 ... yes
39/146 ... yes
34/147 ... yes
35/148 ... yes
35/149 ... yes
35/150 ... yes
8/151 ... yes
35/152 ... yes
31/153 ... yes
14/154 ... yes
35/155 ... yes
8/156 ... yes
35/157 ... yes
35/158 ... yes
39/159 ... yes
35/160 ... yes
8/161 ... yes
8/163 ... yes
43/164 ... yes
6/165 ... yes
15/166 ... yes
8/167 ... yes
35/168 ... yes
7/169 ... yes
8/170 ... yes
35/171 ... yes
6/172 ... yes
8/173 ... yes
8/175 ... yes
8/176 ... yes
6/177 ... yes
7/178 ... yes
7/179 ... yes
47/180 ... yes
48/181 ... yes
35/182 ... yes
35/183 ... yes
35/184 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.3.1)
Your git bin path is "/opt/gitlab/embedded/bin/git"
Git version >= 2.7.3 ? ... yes (2.7.4)
Active users: 19
Checking GitLab ... Finished
#### Results of GitLab environment info
System information
System: Ubuntu 15.04
Current User: git
Using RVM: no
Ruby Version: 2.3.1p112
Gem Version: 2.6.6
Bundler Version:1.13.1
Rake Version: 10.5.0
Sidekiq Version:4.1.4
GitLab information
Version: 8.12.1
Revision: ca3c6a4
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: https://gitlab.ugo-ife.com
HTTP Clone URL: https://gitlab.ugo-ife.com/some-group/some-project.git
SSH Clone URL: git@gitlab.ugo-ife.com:some-group/some-project.git
Using LDAP: yes
Using Omniauth: no
GitLab Shell
Version: 3.6.0
Repository storage paths:
- default: /home/gitlab-git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/
Git: /opt/gitlab/embedded/bin/git
Possible fixes
I took the statuseable.rb from the 8.11.7 (https://gitlab.com/gitlab-org/gitlab-ce/raw/v8.11.7/app/models/concerns/statuseable.rb) and pasted it in : /opt/gitlab/embedded/service/gitlab-rails/app/models/concerns/statuseable.rb and it worked instantly