FS#65074 - [gitlab] cannot migrate db after 12.6 update

Attached to Project: Community Packages
Opened by Mathieu (mfc_alpha) - Tuesday, 07 January 2020, 13:40 GMT
Last edited by Anatol Pomozov (anatolik) - Monday, 13 January 2020, 12:39 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Anatol Pomozov (anatolik)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
After 12.6, the migrate command fail.




Additional info:
* gitlab v12.6.0-1


Steps to reproduce:

su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; EXECJS_RUNTIME=Disabled bundle exec rake db:migrate RAILS_ENV=production"
rake aborted!
LoadError: cannot load such file -- /usr/share/webapps/gitlab/config/application
/usr/share/webapps/gitlab/Rakefile:5:in `require'
/usr/share/webapps/gitlab/Rakefile:5:in `<top (required)>'
/usr/share/webapps/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
/usr/bin/bundle:23:in `load'
/usr/bin/bundle:23:in `<main>'
This task depends upon

Closed by  Anatol Pomozov (anatolik)
Monday, 13 January 2020, 12:39 GMT
Reason for closing:  Fixed
Comment by Anatol Pomozov (anatolik) - Sunday, 12 January 2020, 02:00 GMT
it is fixed in 12.6.2
Comment by Mathieu (mfc_alpha) - Sunday, 12 January 2020, 21:48 GMT
Still got the issue with 12.6.2 and 12.6.3.
What could be the root cause ? Right access ? A migration that did not go well ?
It's an old install that I kept upgrading, maybe I miss something ?

Thanks !
Comment by Anatol Pomozov (anatolik) - Sunday, 12 January 2020, 22:18 GMT
The stacktrace indicates that you still use ruby2.6. Please make sure you updated your system - it should update ruby to version 2.7. Partial updates are not supported.
Comment by Mathieu (mfc_alpha) - Sunday, 12 January 2020, 22:39 GMT
Got the same with last ruby:
rake aborted!
LoadError: cannot load such file -- /usr/share/webapps/gitlab/config/application
/usr/share/webapps/gitlab/Rakefile:5:in `require'
/usr/share/webapps/gitlab/Rakefile:5:in `<top (required)>'
/usr/share/webapps/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
/usr/bin/bundle:23:in `load'
/usr/bin/bundle:23:in `<main>'
(See full trace by running task with --trace)

Comment by Anatol Pomozov (anatolik) - Sunday, 12 January 2020, 23:07 GMT
Your script cannot find '/usr/share/webapps/gitlab/config/application.rb' file. Could you please check that the file exists and has a valid content like:

```
require_relative 'boot'

# Based on https://github.com/rails/rails/blob/v5.2.3/railties/lib/rails/all.rb
# Only load the railties we need instead of loading everything
require 'active_record/railtie'
require 'action_controller/railtie'
require 'action_view/railtie'
require 'action_mailer/railtie'
require 'rails/test_unit/railtie'

Bundler.require(*Rails.groups)

.....
```
Comment by Mathieu (mfc_alpha) - Monday, 13 January 2020, 08:13 GMT
Ok, fixed with chmod o+x /etc/webapps/gitlab.

During th eupdate, I recall some warning message saying that some of my FS right were different from the package.
I may have messed up some commands for fixing that...

Thanks for the support !
Comment by Anatol Pomozov (anatolik) - Monday, 13 January 2020, 12:39 GMT
Great to hear it!

Loading...