Version check to enforce and recommend upgrade path
Problem
GitLab Omnibus has upgrade recommendations that can be hard to find.
The upgrade recommendation docs have good mandatory upgrade paths but lack command examples illustrating how to do a multi-step upgrade while specifying package versions.
Linux package managers (apt/yum) install the latest gitlab-ee package during apt-get upgrade, yum update etc.
Example:
Context:
- customer installed omnibus using apt/yum and upstream repo.
- currently running 11.11.x
Problem:
-
yum updateupdates from 11.11.2 to thegitlab-ee12.8.2, skipping 12.0.x entirely.
Results
Missing migrations or db columns cause problems: gitlab#30370
Idea:
- version-check block in place.
-
sudo apt updateto latest will fail for the gitlab-ee package with a message like:
to ensure a smooth GitLab upgrade process,
we suggest the following upgrade path:
current -> 11.11.8 -> 12.0.12 -> 12.x
To upgrade to the latest version, you'd need to execute:
sudo apt install gitlab-ee=11.11.8-ee &&
sudo apt install gitlab-ee=12.0.12-ee &&
sudo apt upgrade gitlab-ee
Maybe a sleep step after the 12.0.12 step? Or message after installing 12.0.13 that says to let the migrations finish before upgrading again?
Proposal
Modify/iterate on the Omnibus upgrade_check to add new triggers and notification messages.
Limitations
This solution will only work for GitLab Omnibus when installed by adding the upstream repository source and using a Linux package manager for GitLab installation and updates.
This won't work, or won't' be relevant, if running:
- GitLab Docker
- GitLab charts
- Source
- GitLab installed via
.debor.rpmpackage directly without adding upstream GitLab repo to package manager sources