X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/590c491796ece16caa4251dd443412f323492fea..64e387b2f4f0fe6c4c7bf16232706c7cf194caf0:/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..36bcef4f26 100644 --- a/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go +++ b/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go @@ -13,17 +13,16 @@ import ( "fmt" "log" "math" - "net/url" "os" "regexp" "strings" "time" - "git.curoverse.com/arvados.git/lib/config" - "git.curoverse.com/arvados.git/lib/dispatchcloud" - "git.curoverse.com/arvados.git/sdk/go/arvados" - "git.curoverse.com/arvados.git/sdk/go/arvadosclient" - "git.curoverse.com/arvados.git/sdk/go/dispatch" + "git.arvados.org/arvados.git/lib/config" + "git.arvados.org/arvados.git/lib/dispatchcloud" + "git.arvados.org/arvados.git/sdk/go/arvados" + "git.arvados.org/arvados.git/sdk/go/arvadosclient" + "git.arvados.org/arvados.git/sdk/go/dispatch" "github.com/coreos/go-systemd/daemon" "github.com/ghodss/yaml" "github.com/sirupsen/logrus" @@ -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).") }