diff options
author | Andrew Newdigate <andrew@gitlab.com> | 2017-07-18 15:37:51 +0300 |
---|---|---|
committer | Andrew Newdigate <andrew@gitlab.com> | 2017-07-18 15:37:51 +0300 |
commit | 53ef75b0e4934fc0559c24248aa2d1a2835c3ab8 (patch) | |
tree | 0e53fbb8b71c23bf0e49be923888bef873d00638 | |
parent | 3f9d115f19df50e98e3df06eca5afcc4a5e153b1 (diff) | |
parent | 4dfb50884505bb042e309bab324727e4541ce3ef (diff) |
Merge branch '397-fix-bad-storages-configuration' into 'master'
Resolve "Fix bad [[storages]] configuration"
Closes #397
See merge request !227
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | internal/config/config.go | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 296a8840d..f3b728830 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Gitaly changelog +UNRELEASED +- Config: do not start Gitaly without at least one storage + https://gitlab.com/gitlab-org/gitaly/merge_requests/227 + v0.21.1 - Make sure stdout.Read has enough bytes buffered to read from https://gitlab.com/gitlab-org/gitaly/merge_requests/224 diff --git a/internal/config/config.go b/internal/config/config.go index 8727cd2a3..113047e22 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -80,6 +80,10 @@ func Validate() error { } func validateStorages() error { + if len(Config.Storages) == 0 { + return fmt.Errorf("config: no storage configurations found. Is your gitaly.config correctly configured? https://gitlab.com/gitlab-org/gitaly/issues/397") + } + seenNames := make(map[string]bool) for _, st := range Config.Storages { if st.Name == "" { |