fritteli / gentoo-overlay

https://gittr.ch/linux/gentoo-overlay
GNU General Public License v2.0
24 stars 7 forks source link

gitlabhq-8.0.3 migrations failure #25

Closed Kami-no closed 8 years ago

Kami-no commented 8 years ago

Failed to run migration commands... emerge --config "=www-apps/gitlabhq-8.0.3"

https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/update/patch_versions.md sudo -u git -H bundle install --without development test postgres --deployment sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production sudo -u git -H bundle exec rake assets:clean RAILS_ENV=production sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production sudo -u git -H bundle exec rake cache:clear RAILS_ENV=production sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

Missing db_key_base for 'production' environment. The secrets will be generated and stored in config/secrets.yml rake aborted! Errno::EACCES: Permission denied @ rb_sysopen - config/secrets.yml /opt/gitlab/config/initializers/secret_token.rb:45:in initialize' /opt/gitlab/config/initializers/secret_token.rb:45:inopen' /opt/gitlab/config/initializers/secret_token.rb:45:in <top (required)>' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.12/lib/active_support/dependencies.rb:241:inload' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.12/lib/active_support/dependencies.rb:241:in block in load' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.12/lib/active_support/dependencies.rb:232:inload_dependency' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.12/lib/active_support/dependencies.rb:241:in load' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.1.12/lib/rails/engine.rb:648:inblock in load_config_initializer' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.12/lib/active_support/notifications.rb:161:in instrument' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.1.12/lib/rails/engine.rb:647:inload_config_initializer' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.1.12/lib/rails/engine.rb:612:in block (2 levels) in <class:Engine>' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.1.12/lib/rails/engine.rb:611:ineach' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.1.12/lib/rails/engine.rb:611:in block in <class:Engine>' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.1.12/lib/rails/initializable.rb:30:ininstance_exec' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.1.12/lib/rails/initializable.rb:30:in run' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.1.12/lib/rails/initializable.rb:55:inblock in run_initializers' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.1.12/lib/rails/initializable.rb:44:in each' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.1.12/lib/rails/initializable.rb:44:intsort_each_child' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.1.12/lib/rails/initializable.rb:54:in run_initializers' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.1.12/lib/rails/application.rb:300:ininitialize!' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.1.12/lib/rails/railtie.rb:194:in public_send' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.1.12/lib/rails/railtie.rb:194:inmethod_missing' /opt/gitlab/config/environment.rb:5:in <top (required)>' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.12/lib/active_support/dependencies.rb:247:inrequire' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.12/lib/active_support/dependencies.rb:247:in block in require' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.12/lib/active_support/dependencies.rb:232:inload_dependency' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.12/lib/active_support/dependencies.rb:247:in require' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.1.12/lib/rails/application.rb:276:inrequire_environment!' /opt/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.1.12/lib/rails/application.rb:405:in `block in run_tasks_blocks' Tasks: TOP => gitlab:check => gitlab:gitlab_shell:check => environment (See full trace by running task with --trace)

http://doc.gitlab.com/ce/migrate_ci_to_ce/README.html how:secrets problem (Omnibus-only) If you see errors like this: Missing secret_key_base or db_key_base for 'production' environment. The secrets will be generated and stored in config/secrets.yml rake aborted! Errno::EACCES: Permission denied @ rb_sysopen - config/secrets.yml This can happen if you are updating from versions prior to 7.13 straight to 8.0. The fix for this is to update to Omnibus 7.14 first and then update it to 8.0.

I've got latest 7.14 I suppose...

fritteli commented 8 years ago

Does the file /etc/gitlab/secrets.yml exist? If not:

cd /etc/gitlab
cp secrets.yml.example secrects.yml

Has it got the correct owner (git:git)? If not:

chown git:git /etc/gitlab/secrects.yml

Has it got the correct access rights (0600)? If not:

chmod 0600 /etc/gitlab/secrects.yml
fritteli commented 8 years ago

Also, the jump from 7.14 to 8.0 is a very big one, because now gitlab-ci is directily included in gitlab-ce. Please, please read the upgrade guide! I believe, your problem is addressed in item numer 6 in the guide.

If you were using gitlab-ci before, also be sure to read the migration guide.

Kami-no commented 8 years ago

Yep, that was the solution. Also I've prepared updates for systemd support. Tomorrow I'll make a merge request.

fritteli commented 8 years ago

Perfect, thank you!

Manuel Friedli Bürenstrasse 31 CH-3007 Bern

Tel:   +41 31 931 01 10 Mobil: +41 77 469 29 93 Mail:  manuel@fritteli.ch Web:   http://www.fritteli.ch/

-------- Ursprüngliche Nachricht --------
Von: Dmitriy Zinin notifications@github.com
Datum:05.10.2015 09:48 (GMT+01:00)
An: fritteli/gentoo-overlay gentoo-overlay@noreply.github.com
Cc: fritteli manuel@fritteli.ch
Betreff: Re: [gentoo-overlay] gitlabhq-8.0.3 migrations failure (#25)
Yep, that was the solution. Also I've prepared updates for systemd support. Tomorrow I'll make a merge request. — Reply to this email directly or view it on GitHub.