From 271222521f189da3dfb1ab0055583e0838b2416b Mon Sep 17 00:00:00 2001 From: Nick Thomas Date: Wed, 25 Aug 2021 15:58:16 +0100 Subject: [PATCH] Ensure an absolute path is used for the internal socket dir 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 --- internal/gitaly/config/config.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/gitaly/config/config.go b/internal/gitaly/config/config.go index 09d6df1c21a..687fecdb646 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) } -- GitLab