From 9a48afa0b08cb5b17a31e4bbe18730300a910ff3 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Mon, 30 Sep 2019 17:05:09 -0700 Subject: Support configurable Git config search path for Rugged This commit adds an optional `git_config_search_path` parameter for gitaly-ruby. By default, Rugged searches inside `/etc/gitconfig` instead of `/opt/gitlab/embedded/etc/gitconfig` for system-wide options unless the `Rugged::Settings['search_path_system']` is set. This means that important options such as `core.fsyncObjectFiles` are not propagated to gitaly-ruby, which can result in data loss after servers are rebooted. The command-line `git` doesn't have this issue because it uses the `prefix` compile-time option, but this isn't available in Rugged. With this new parameter, package managers (e.g. Omnibus) can specify where the system `gitconfig` file should be. Closes https://gitlab.com/gitlab-org/gitaly/issues/2051 --- config.toml.example | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'config.toml.example') diff --git a/config.toml.example b/config.toml.example index 3ef031451..faf8ea92a 100644 --- a/config.toml.example +++ b/config.toml.example @@ -73,6 +73,10 @@ dir = "/home/git/gitaly/ruby" # # # Number of gitaly-ruby worker processes # num_workers = 2 +# +# # Search path for system gitconfig file (e.g. /etc, /opt/gitlab/embedded/etc) +# # NOTE: This only affects RPCs that use Rugged. +# git_config_search_path = "/etc" [gitlab-shell] # The directory where gitlab-shell is installed -- cgit v1.2.3