[Docs] CE to EE upgrade guide is broken
I upgraded our GitLab instance from 11.3.4
to 11.3.4-ee
using https://gitlab.com/gitlab-org/gitlab-ee/blob/master/doc/update/11.3-ce-to-ee.md and encountered several issues.
We used GitLab with Postgesql and without aws and kerberos.
The first thing which does not work was the migration. On half the way it throws the following error:
sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
== 20151113115819 CanonicalizeKerberosIdentities: migrating ===================
rake aborted!
LoadError: cannot load such file -- krb5_auth
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `block in require'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
/home/git/gitlab/ee/db/migrate/20151113115819_canonicalize_kerberos_identities.rb:10:in `kerberos_default_realm'
/home/git/gitlab/ee/db/migrate/20151113115819_canonicalize_kerberos_identities.rb:23:in `block in change'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/migration.rb:547:in `block in reversible'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/migration.rb:746:in `execute_block'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/migration.rb:547:in `reversible'
/home/git/gitlab/ee/db/migrate/20151113115819_canonicalize_kerberos_identities.rb:21:in `change'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/migration.rb:608:in `exec_migration'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/migration.rb:592:in `block (2 levels) in migrate'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/migration.rb:591:in `block in migrate'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/migration.rb:590:in `migrate'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/migration.rb:768:in `migrate'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/migration.rb:1023:in `block in execute_migration_in_transaction'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/migration.rb:1069:in `block in ddl_transaction'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/transactions.rb:220:in `transaction'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/migration.rb:1069:in `ddl_transaction'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/migration.rb:1022:in `execute_migration_in_transaction'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/migration.rb:984:in `block in migrate'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/migration.rb:980:in `each'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/migration.rb:980:in `migrate'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/migration.rb:823:in `up'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/migration.rb:801:in `migrate'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/tasks/database_tasks.rb:139:in `migrate'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => db:migrate
In order to fix this I had to remove kerberos
from the without section in .bundle/config
.
After this bundle install
fails due to missing dependencies
sudo -u git -H bundle install --without mysql development test aws --deployment
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/git/gitlab/vendor/bundle/ruby/2.4.0/gems/timfel-krb5-auth-0.8.3/ext
/usr/bin/ruby2.4 -r ./siteconf20181011-18614-1mshow6.rb extconf.rb
checking for main() in -lc... yes
checking for krb5_init_context() in -lkrb5... no
*** extconf.rb failed ***
In my case (running Ubuntu) I fixed this running apt install libkrb5-dev
After this the install works and GitLab started again. But after a while I noticed that the UI is somewhat broken.
For example the Issue Board page is missing the title and therefore prevents users from creating additional boards and the related issues sections was missing the add button.
It seems that you have to use the asset creation is just incomplete. Instead of using this
sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production
you have to use
sudo -u git -H bundle exec rake gettext:compile RAILS_ENV=production
sudo -u git -H bundle exec rake yarn:install gitlab:assets:clean gitlab:assets:compile RAILS_ENV=production NODE_ENV=production
It is not very helpful to collect the correct commands from three different guides. In my case I had to use the ce-ee upgrade guide, the 11.2 to 11.3 upgrade guide and the installation guide.