Stop nesting storages of Gitaly secondaries
What does this Merge Request do?
There's currently several different storage locations for Gitaly's
repositories. We have /repositories
for the primary Gitaly node's
repositories, /repositories_gitaly-#{i}
for additional storages for
the primary Gitaly nodes and /repositories/praefect-internal-#{i}
for
Praefect secondaries' storages. Next to being quite inconsistent, the
nested storages of primary node and Praefect secondaries is an
unsupported configuration and causes bugs with the praefect reconcile
command.
Let's improve the situation and fix the invalid configuration by using a
new storage layout of /repository_storages/#{NODE}/#{STORAGE}
. Like
this, all repositories are nested inside of a single hierarchy, but not
nested into each other. In order to keep backwards compatibility with
existing setups, we keep the /repositories
default for the primary
Gitaly node's "default" storage as otherwise people would need to
migrate their repositories directory.
The result for a gdk.yml with three storages and three Praefect nodes thus looks like following:
repositories
├── +gitaly
└── @hashed
repository_storages
├── gitaly
│ ├── gitaly-1
│ └── gitaly-2
├── praefect-gitaly-1
│ └── praefect-internal-1
└── praefect-gitaly-2
└── praefect-internal-2
Merge Request checklist
-
Tests added for new functionality. If not, please raise Issue to follow-up. -
This change is backward compatible. If not, please include steps to communicate to our users. -
Documentation added/updated, if needed. -
gdk doctor
test added, if needed.