On a CentOS 8 system we recently migrated and manually upgraded Gitlab (13.6.7 → 13.12.9 → 14.0.7 → 14.1.2) without any trouble. Today we found an update to 14.2.0 is available but trying to install that we got the following error:
dnf.exceptions.Error: Transaction test error:
file /opt/gitlab/embedded/service/gitlab-rails/db/ci_migrate from install of gitlab-ce-14.2.0-ce.0.el8.x86_64 conflicts with file from package gitlab-ce-14.1.2-ce.0.el8.x86_64
When taking a look at this path I find this:
ls -al /opt/gitlab/embedded/service/gitlab-rails/db/ci_migrate/
total 12
drwxr-xr-x. 2 root root 4096 Aug 5 11:55 .
drwxr-xr-x. 9 root root 4096 Aug 5 11:56 …
-rw-r–r–. 1 root root 1101 Aug 3 17:48 20210617101848_create_ci_instance_variables_on_ci.rb
I have the same problem with updating (ominbus) from gitlab 14.1.3 to 14.2 on a CentOS 7.9 system.
Error message is:
Transaction check error:
file /opt/gitlab/embedded/service/gitlab-rails/db/ci_migrate from install of gitlab-ce-14.2.0-ce.0.el7.x86_64 conflicts with file from package gitlab-ce-14.1.3-ce.0.el7.x86_64
Same here, also on an otherwise up to date CentOS 7.9 system.
Resolving Dependencies
--> Running transaction check
---> Package gitlab-ee.x86_64 0:14.1.2-ee.0.el7 will be updated
---> Package gitlab-ee.x86_64 0:14.2.0-ee.0.el7 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
===========================================================================================================================================================================================
Package Arch Version Repository Size
===========================================================================================================================================================================================
Updating:
gitlab-ee x86_64 14.2.0-ee.0.el7 gitlab_gitlab-ee 957 M
Transaction Summary
===========================================================================================================================================================================================
Upgrade 1 Package
Total size: 957 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction check error:
file /opt/gitlab/embedded/service/gitlab-rails/db/ci_migrate from install of gitlab-ee-14.2.0-ee.0.el7.x86_64 conflicts with file from package gitlab-ee-14.1.2-ee.0.el7.x86_64
Error Summary
-------------
And:
[GStep100@localhost ~]$ cd -
/opt/gitlab/embedded/service/gitlab-rails/db/ci_migrate
[GStep100@localhost ci_migrate]$ ls -l
total 4
-rw-r--r--. 1 root root 1101 Aug 3 16:34 20210617101848_create_ci_instance_variables_on_ci.rb
Downloading packages:
Running transaction check
Running transaction test
Transaction check error:
file /opt/gitlab/embedded/service/gitlab-rails/db/ci_migrate from install of gitlab-ce-14.2.0-ce.0.el7.x86_64 conflicts with file from package gitlab-ce-14.1.2-ce.0.el7.x86_64
Error Summary
Also not working with Debian10 - buster from 14.1.2-ce.0 to 14.2.1-ce.0
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-script20210824-2506-8d5afj” ----
STDOUT: rake aborted!
StandardError: An error has occurred, all later migrations canceled: