Skip to content

Update to Gitlab 18.2.0 fails on gitlab-ce installations that were formerly gitlab-ee instances

It appears there is a bug in the gitlab-ce 18.2.0 packages (in my case the Ubuntu 20.04 amd64 package) that seems to execute some parts of the gitlab-ee cookbook upon upgrade from earlier releases, fail during installation, and

I suspect that this is caused by 31692942 and affects only gitlab-ce installations that have been gitlab-ee installations in the past and were migrated to gitlab-ce at some point in time. This seems to result in the /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab-ee directory remaining in place (in my case, that directory was from 2019, which would roughly match the time where the Gitlab installation in question was migrated from EE to CE).

To other users affected by this: I'm currently only testing this in a testing instance, and you probably should only try this if you have a working backup, and you should never try this on a production instance, yadda yadda. I've tried the following successfully:

  • gitlab-ctl stop
  • restore the file ${FQDN}.json in /opt/gitlab/embedded/nodes/ from a backup or a file system snapshot
  • rm -rf /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab-ee
  • gitlab-ctl start (Gitlab needs to be running before Gitlab Omnibus/deb package installations, otherwise the deb installation will fail at least on Debian/Ubuntu)
  • downgrade the gitlab-ce package to 18.1.2
  • upgrade the gitlab-ce package to 18.2.0

This seems to work for me so far, but of course I'm just some random guy on the internet, so don't blame me if this causes data loss/corruption on your Gitlab instance.

I've attached an anonymized excerptapt_term.log of my /var/log/apt/term.log where both the failed upgrade attempts and the subsequent successful downgrade to 18.1.2 and upgrade to 18.2.0 are visible.

Edited by Pascal Ernster