Create git_data_dirs even if gitlab_rails is disabled
Currently, `gitlab_rails` service needs to be enabled in order for `gitaly` service to function properly. Specifically, `gitlab_rails` creates `git_data_dirs` (e.g. `/var/opt/gitlab/git-data/repositories`) which is needed for Gitaly to start-up. If only the `gitaly` service is enabled, then Gitaly won't start due to config validation error (i.e. storage directories have to be present). This MR makes the creation of these directories the responsibility of the `gitaly` cookbook. The `gitlab` cookbook still creates the directories as backward-compatibility measure, as I'm not sure if these directories are needed outside of Gitaly. This is needed as part of https://gitlab.com/gitlab-com/gl-infra/production-engineering/-/issues/24530. Changelog: fixed
parent
3c1c33892d8a
No related branches found
No related tags found
Showing
- files/gitlab-cookbooks/gitaly/recipes/enable.rb 2 additions, 0 deletionsfiles/gitlab-cookbooks/gitaly/recipes/enable.rb
- files/gitlab-cookbooks/gitaly/recipes/git_data_dirs.rb 41 additions, 0 deletionsfiles/gitlab-cookbooks/gitaly/recipes/git_data_dirs.rb
- files/gitlab-cookbooks/gitlab/recipes/gitlab-rails.rb 1 addition, 20 deletionsfiles/gitlab-cookbooks/gitlab/recipes/gitlab-rails.rb
- spec/chef/cookbooks/gitaly/recipes/gitaly_spec.rb 20 additions, 0 deletionsspec/chef/cookbooks/gitaly/recipes/gitaly_spec.rb
- spec/chef/cookbooks/gitlab/recipes/gitlab-rails_spec.rb 1 addition, 7 deletionsspec/chef/cookbooks/gitlab/recipes/gitlab-rails_spec.rb
- spec/chef/support/shared_examples/git_data_dirs.rb 9 additions, 0 deletionsspec/chef/support/shared_examples/git_data_dirs.rb
Loading
Please register or sign in to comment