From: Tom Clegg Date: Thu, 18 Feb 2021 16:43:27 +0000 (-0500) Subject: 17398: Skip gateway server if dispatcher does not send desired addr. X-Git-Tag: 2.2.0~121^2 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/3193023d7335f793d5cc015aa185f7a450e650f7 17398: Skip gateway server if dispatcher does not send desired addr. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- diff --git a/lib/crunchrun/crunchrun.go b/lib/crunchrun/crunchrun.go index 7d6fb4ed47..969682f465 100644 --- a/lib/crunchrun/crunchrun.go +++ b/lib/crunchrun/crunchrun.go @@ -1887,10 +1887,12 @@ func (command) RunCommand(prog string, args []string, stdin io.Reader, stdout, s Log: cr.CrunchLog, } os.Unsetenv("GatewayAuthSecret") - err = cr.gateway.Start() - if err != nil { - log.Printf("error starting gateway server: %s", err) - return 1 + if cr.gateway.Address != "" { + err = cr.gateway.Start() + if err != nil { + log.Printf("error starting gateway server: %s", err) + return 1 + } } parentTemp, tmperr := cr.MkTempDir("", "crunch-run."+containerID+".")