How to revert a broken omnibus gitlab update

Find an article
Sep 28
Published by in · Leave your thoughts
( words)
Warning! There was an error loading some of the images for this post.

GitLab is great until it breaks, and they have a habit of pushing updates so often that bugs and regressions occur just as often.

Fortunately they’ve accounted for this and created documentation to help revert bad updates. However… their instructions for reverting Omnibus installations falls short when you get to:

If there is a GitLab version mismatch between your backup tar file and the installed version of GitLab the restore command will abort with an error. Install the correct GitLab version and try again.

If you’re using a modern version of GitLab (> 8.7) then the link you’re looking for to find Omnibus¬†packages for every version of Gitlab can be found here:¬†https://packages.gitlab.com/gitlab/gitlab-ce. Conveniently upon selecting a package it also gives you instructions on how to install it.

 

So… OK great we’ve followed the instructions but now what?

Centos:

yum downgrade gitlab-ce-<version>

gitlab-rake gitlab:backup:restore BACKUP=<backup number>

gitlab-rake cache:clear

If you want to avoid the hassle of accidentally upgrading to the bad version again you can lock the package to the current (reverted) version:

yum -y install yum-versionlock

yum versionlock gitlab-ce

This will allow you to run yum update without gitlab-ce updating. When you’re certain that GitLab has fixed the problem you were experiencing you can delete the version lock:

yum versionlock delete gitlab-ce

Leave a Reply

Your email address will not be published.