Upgrade guide 9.0 to 9.1 missing Gitaly update step
Summary
The upgrade documentation for source installations to upgrade from 9.0 to 9.1 is not describing the upgrade process for Gitaly for users that installed it already when upgrading to 9.0.
This causes the upgrade process to strand at the "Gitaly config.toml" step of the upgrade instructions, since the config.toml.example file is not present in gitaly v0.3.0 which (for me) was the installed version.
Steps to reproduce
- Starting with a GitLab 9.0 installation and Gitaly 0.3.0 installed, follow the 9.0 to 9.1 upgrade guide
- In step 10 "Optional: install Gitaly" try copying the config.toml.example file.
- You'll receive a "No such file or directory" error message because gitaly does not contain a config.toml.example file.
Relevant logs and/or screenshots
me@machine:/home/git/gitaly$ sudo -u git cp config.toml.example config.toml
cp: cannot stat 'config.toml.example': No such file or directory
Possible fixes
I'd suggest editing the upgrade guide's Gitaly section to include the following (in line with the rest of the upgrade guide's style):
If you installed Gitaly in GitLab 9.0 you need to update Gitaly, make some changes in gitlab.yml, and create a new config.toml file.
Gitaly update
cd /home/git/gitaly sudo -u git -H git fetch --all --tags sudo -u git -H git checkout v$(</home/git/gitlab/GITALY_SERVER_VERSION)
This would result in the section to look like the following:
10. Optional: install Gitaly
Gitaly is still an optional component of GitLab. If you want to save time during your 9.1 upgrade you can skip this step.
If you have not yet set up Gitaly then follow Gitaly section of the installation guide.
If you installed Gitaly in GitLab 9.0 you need to update Gitaly, make some changes in gitlab.yml, and create a new config.toml file.
Gitaly update
cd /home/git/gitaly sudo -u git -H git fetch --all --tags sudo -u git -H git checkout v$(</home/git/gitlab/GITALY_SERVER_VERSION)
Gitaly gitlab.yml changes
Look for
socket_path:
thegitaly:
section. Its value is usually/home/git/gitlab/tmp/sockets/private/gitaly.socket
. Note what socket path your gitlab.yml is using. Now go to therepositories:
section, and for each entry understorages:
, add agitaly_address:
based on the socket path, but withunix:
in front.
repositories: storages: default: path: /home/git/repositories gitaly_address: unix:/home/git/gitlab/tmp/sockets/private/gitaly.socket other_storage: path: /home/git/other-repositories gitaly_address: unix:/home/git/gitlab/tmp/sockets/private/gitaly.socket
>Each entry under `storages:` should use the same `gitaly_address`.
>#### Gitaly config.toml
>In GitLab 9.1 we are replacing environment variables in Gitaly with a
TOML configuration file.
>```shell
>cd /home/git/gitaly
>sudo mv env env.old
>sudo -u git cp config.toml.example config.toml
># If you are using custom repository storage paths they need to be in config.toml
>sudo -u git -H editor config.toml
>```