Migrating from git_data_dirs makes repositories become unavailable

Problem to solve

I noticed the 'git_data_dirs deprication message so I tried changing the config but this results in a number of repositories becoming unavailable.
The first time I made a typo in the path and this made those repos permanently lose their data.
After restoring everything from backup I tried again and the same repos broke again, but changing the config back without having had an actual data move due to typos made things available again.

There are no errors other than the gui saying ‘repository does not exist’ and the automatic repo check starts complaining. It is also the same few repos that fail, not all.
also, the repocheck.log does not get created.

Steps to reproduce

Follow Configuration options for Linux package installations | GitLab Docs
Can’t find anything else on this.

Configuration

This is a VERY basic install. The only thing that is used is the repositories. No automation or integrations with anything. Runner is installed but unused.

SeLinux is enabled.

Versions

  • Self-managed

Versions

The first version ever to be installed was 13.11.2 and it’s been updated over time.
Updates are at least once every month so probably every minor version in between has been on here.
OS is RHEL 8.10

System information
System:
Proxy:          no
Current User:   git
Using RVM:      no
Ruby Version:   3.2.5
Gem Version:    3.6.3
Bundler Version:2.5.11
Rake Version:   13.0.6
Redis Version:  7.0.15
Sidekiq Version:7.2.4
Go Version:     unknown

GitLab information
Version:        17.9.2-ee
Revision:       56dedd4cf9e
Directory:      /opt/gitlab/embedded/service/gitlab-rails
DB Adapter:     PostgreSQL
DB Version:     14.17
URL:            https://gitlab.domain
HTTP Clone URL: https://gitlab.domain/some-group/some-project.git
SSH Clone URL:  git@gitlab.domain:some-group/some-project.git
Elasticsearch:  no
Geo:            no
Using LDAP:     no
Using Omniauth: yes
Omniauth Providers: 

GitLab Shell
Version:        14.40.0
Repository storages:
- default:      unix:/var/opt/gitlab/gitaly/gitaly.socket
GitLab Shell path:              /opt/gitlab/embedded/service/gitlab-shell

Gitaly
- default Address:      unix:/var/opt/gitlab/gitaly/gitaly.socket
- default Version:      17.9.2
- default Git Version:  2.47.2

Did you find any fix for this?

Sorry to address this again, but have anyone found a fix to this problem?

Due to the v18 release I made a snapshot of my VM and started testing a bit more.
I got it to work with gitlab-ee 17.11.1

It’s very important that if your old path is /my/path the new path is /my/path/repositories
Also the /repositories seems to be mandatory for any extra storage you configure.

It tried lots of things, making new storage areas and moving everything to the other store before switching to gitaly but it would always just break beyond what I was able to repair without a snapshot restore.

You also can’t have both git_data_dir and gitaly active at the same time if you used ‘default’ because gitaly is hard coded to have a ‘default’ storage path, this is probably where this issue originates from.

1 Like