Simplify importing existing projects into Gitaly cluster so they are tracked in the Praefect database
To expand the use of Praefect on .com, we would like to move some file servers into Praefect as non-replicating virtual storages. gitlab-com/gl-infra&640 (closed)
Assuming we have a storage named file-01
that is a Gitaly server not using Gitaly Cluster, we will do something like this:
- Add a new virtual storage to the existing Gitaly Cluster,
file-01
- Update the Rails storage mapping so that
file-01
points to the Gitaly Cluster LB
This ends up causing a failure however, because the projects on file-01
aren't automatically added to the Praefect database. There is a command to list untracked repositories and add them https://docs.gitlab.com/ee/administration/gitaly/recovery.html#manually-list-untracked-repositories, but I think this could be a bit simpler if we combined it into a single command track-untracked-repositories
for these types of migrations.
Taking a step further, is there a way that this could be automated fully so that repositories are automatically added for a migration situation like this?