Gitlab Update 14.2.0 (conflict)

When updating Gitlab this morning, there was a conflict caused by the update. This is on purpose because there is an issue with Gitlab 14.1.x –> 14.2.0 upgrade process which was fixed in the latest Gitlab 14.1 release (14.1.3).

First Attempt

The exact version needed wasn’t listed, so I needed to figure it out:

yum list --show-duplicates gitlab-ce

Will show all package versions in the repository. Then I found the latest 14.1.x release – just before the current release (14.2.0).

To force an update to a specific version, its package name is the name shown in the output of yum list with the version number tacked on the end:

yum update gitlab-ce-14.1.3-ce.0.el7

Edit: Even after the update, the upgrade still fails, waiting for a solution on this one :)

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

Issue Tracker Fix

Edit2: found a fix on the gitlab issue tracker:

mv /opt/gitlab/embedded/service/gitlab-rails/db/ci_migrate /opt/gitlab/embedded/service/gitlab-rails/db/ci_migrate_back
yum update

Usual caveats about messing with files managed by packages apply, but until an official fix is released it’ll do.

See also: https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/6347 which mentions a merge to fix the issue.