Inconsistent Gitaly configuration documentation
Hi all, I am trying to get Gitaly to work as an external component for an HA setup and I am having some issues, but aside from that, I am really confused by the configuration information provided on your site.
TL;DR:
- inconsistent configuration description and samples
- lack of per-gitaly-server token (is it elsewhere I missed?)
- unnecessary use of 'path' setting outside gitaly
The following are statements from 'https://docs.gitlab.com/ee/administration/gitaly/' which I do not see reflected in the actual samples.
Gitaly maps:
the storage name -> (Gitaly address, Gitaly token) map in gitlab.yml is the single source of truth for the Gitaly network topology
a (Gitaly address, Gitaly token) corresponds to a Gitaly server
Actual configuration:
omnibus:
# /etc/gitlab/gitlab.rb
git_data_dirs({
'default' => { 'gitaly_address' => 'tcp://gitaly.internal:8075' },
'storage1' => { 'gitaly_address' => 'tcp://gitaly.internal:8075' },
})
gitlab_rails['gitaly_token'] = 'abc123secret'
source:
# /home/git/gitlab/config/gitlab.yml
gitlab:
repositories:
storages:
default:
gitaly_address: tcp://gitaly.internal:8075
storage1:
gitaly_address: tcp://gitaly.internal:8075
gitaly:
token: 'abc123secret'
This configuration shows a single token that has no mapping to specific gitaly servers. Assuming there will only ever be one gitaly server, that is fine, but that is not the expectation for an HA setup.
Your statement says storage_name : {address: blah.local, token: asdf1234}
, yet your samples provide something completely different.
Also, the samples that I just mentioned here do not seem to be correct either. Using those samples (with an existing gitaly server and having that hostname and being reachable), gitlab would raise exceptions for a nil value that ends up being the missing path, which would mean the correct configuration is this sample:
omnibus:
# /etc/gitlab/gitlab.rb
git_data_dirs({
'default' => { 'path' => '/mnt/gitlab/default', 'gitaly_address' => 'tls://gitaly.internal:9999' },
'storage1' => { 'path' => '/mnt/gitlab/storage1', 'gitaly_address' => 'tls://gitaly.internal:9999' },
})
gitlab_rails['gitaly_token'] = 'abc123secret'
source:
# /home/git/gitlab/config/gitlab.yml
gitlab:
repositories:
storages:
default:
path: /mnt/gitlab/default/repositories
gitaly_address: tls://gitaly.internal:9999
storage1:
path: /mnt/gitlab/storage1/repositories
gitaly_address: tls://gitaly.internal:9999
gitaly:
token: 'abc123secret'
Now, this shows there are inconsistencies in the way the configuration samples are presented, and there are inconsistencies in what the configuration description is and the samples themselves.
On a separate note, I am looking to understand why gitlab needs to know the 'path' for a managed repository. From my PoV, only gitaly needs to know the path for the storages it manages.