Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2021-08-25 17:58:16 +0300
committerNick Thomas <nick@gitlab.com>2021-08-25 17:58:16 +0300
commit271222521f189da3dfb1ab0055583e0838b2416b (patch)
tree7a37357788eeb8e9fc04eaa3e78179fc669f4dd7
parentbe4f7300be6d3ee01017300782abdca0d151db6b (diff)
Ensure an absolute path is used for the internal socket dirmake-internal-socket-dir-absolute
In GDK, this is sometimes configured to a relative path, which doesn't work with the GRPC dialer. Join it with the current working directory to make these paths work. Changelog: fixed
-rw-r--r--internal/gitaly/config/config.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/gitaly/config/config.go b/internal/gitaly/config/config.go
index 09d6df1c2..687fecdb6 100644
--- a/internal/gitaly/config/config.go
+++ b/internal/gitaly/config/config.go
@@ -219,6 +219,11 @@ func (cfg *Cfg) setDefaults() error {
cfg.InternalSocketDir = tmpDir
}
+ // The GRPC dialer requires an absolute path, so convert relative paths
+ if !filepath.IsAbs(cfg.InternalSocketDir) {
+ cfg.InternalSocketDir = filepath.Abs(cfg.InternalSocketDir)
+ }
+
if reflect.DeepEqual(cfg.DailyMaintenance, DailyJob{}) {
cfg.DailyMaintenance = defaultMaintenanceWindow(cfg.Storages)
}