Skip to content

Add check for Gitaly configuration structure changes in GitLab 16+

In GitLab 16+, we changed the Gitaly configuration structure.

Specifically, we have this migration step:

When configuring storage to replace git_data_dirs, append /repositories to value of path as documented below. If you don’t complete this step, your Git repositories are inaccessible until the configuration is fixed. This misconfiguration can cause metadata deletion.

If this step is missed, it will appear to users that their repositories vanished into thin air.

We should:

  1. Check if gitaly['configuration'] exists from GitLab 16+
  2. If it does, check if storage.path includes /var/opt/gitlab/git-data, and ends with /repositories.
Edited by Anton Smith