Upgrade to 14 failed, now reconfigure fails because of dpkg-tmp files

Hi guys,

I tried to upgrade to gitlab 14 without being on the latest 13 version first… So the upgrade failed.
Now I wanted to reconfigure my gitlab to first get it working again, but reconfigure fails, because dpkg left some temporary files in the gitlab directory:

There was an error running gitlab-ctl reconfigure:

rails_migration[gitlab-rails] (gitlab::database_migrations line 51) had an error: Mixlib::ShellOut::ShellCommandFailed: bash[migrate gitlab-rails database] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/resources/rails_migration.rb line 16) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of "bash"  "/tmp/chef-script20210709-15013-1cz7mgs" ----
STDOUT: rake aborted!
I18n::UnknownFileType: can not load translations from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/valid_email-0.1.3/config/locales/de.yml.dpkg-tmp, the file type dpkg-tmp is not known
/opt/gitlab/embedded/service/gitlab-rails/app/models/concerns/protected_ref.rb:36:in `block in protected_ref_access_levels'
/opt/gitlab/embedded/service/gitlab-rails/app/models/concerns/protected_ref.rb:27:in `each'
/opt/gitlab/embedded/service/gitlab-rails/app/models/concerns/protected_ref.rb:27:in `protected_ref_access_levels'
/opt/gitlab/embedded/service/gitlab-rails/app/models/protected_branch.rb:13:in `<class:ProtectedBranch>'
/opt/gitlab/embedded/service/gitlab-rails/app/models/protected_branch.rb:3:in `<top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/protected_branches.rb:58:in `block (2 levels) in <class:ProtectedBranches>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/protected_branches.rb:55:in `block in <class:ProtectedBranches>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/protected_branches.rb:18:in `<class:ProtectedBranches>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/protected_branches.rb:4:in `<module:API>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/protected_branches.rb:3:in `<top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/api.rb:246:in `block in <class:API>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/api.rb:136:in `<class:API>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/api.rb:4:in `<module:API>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/api.rb:3:in `<top (required)>'
(eval):6:in `draw_route'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/patch/draw_route.rb:30:in `instance_eval'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/patch/draw_route.rb:30:in `draw_route'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/patch/draw_route.rb:17:in `draw_ce'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/patch/draw_route.rb:11:in `draw'
/opt/gitlab/embedded/service/gitlab-rails/config/routes.rb:274:in `block in <top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/config/routes.rb:7:in `<top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:7:in `<top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Tasks: TOP => gitlab:db:configure => environment
(See full trace by running task with --trace)
STDERR: 
---- End output of "bash"  "/tmp/chef-script20210709-15013-1cz7mgs" ----
Ran "bash"  "/tmp/chef-script20210709-15013-1cz7mgs" returned 1

How can I clean this mess and get the gitlab working again? Any help is appreciated :slight_smile: Thanks!

@MartiniMoe have you already re-installed the version that you previously had working?

The package is meant to prevent you from being able to upgrade to 14.0 unless you are already on 13.12. Even if you’ve somehow managed to get around that, you will need to go back and upgrade along the proper upgrade path before you can move forward to 14.0.

1 Like