X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/e3566cdd48dd5c67ef9d0b1a45321f773b44b2a6..f5bba33140f89648ef07098e582b022e1ea1f9f9:/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go diff --git a/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go b/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go index 982141ad81..e4a1e4840b 100644 --- a/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go +++ b/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go @@ -13,7 +13,6 @@ import ( "fmt" "log" "math" - "net/url" "os" "regexp" "strings" @@ -133,18 +132,10 @@ func (disp *Dispatcher) configure(prog string, args []string) error { if disp.Client.Insecure { os.Setenv("ARVADOS_API_HOST_INSECURE", "1") } - ks := "" - if len(disp.cluster.Containers.SLURM.KeepServices) > 0 { - for _, svc := range disp.cluster.Containers.SLURM.KeepServices { - for k, _ := range svc.InternalURLs { - u := url.URL(k) - ks += u.String() - ks += " " - } - } - } - os.Setenv("ARVADOS_KEEP_SERVICES", strings.TrimSuffix(ks, " ")) os.Setenv("ARVADOS_EXTERNAL_CLIENT", "") + for k, v := range disp.cluster.Containers.SLURM.SbatchEnvironmentVariables { + os.Setenv(k, v) + } } else { disp.logger.Warnf("Client credentials missing from config, so falling back on environment variables (deprecated).") }