Update token in keepproxy test.
[arvados.git] / services / crunch-dispatch-slurm / crunch-dispatch-slurm.go
index 1a7ad6fac745067fa9da535ba3052321f062e9de..e4a1e4840b41cbf0385ec38fa12fcde44fd1b853 100644 (file)
@@ -24,8 +24,8 @@ import (
        "git.curoverse.com/arvados.git/sdk/go/arvadosclient"
        "git.curoverse.com/arvados.git/sdk/go/dispatch"
        "github.com/coreos/go-systemd/daemon"
+       "github.com/ghodss/yaml"
        "github.com/sirupsen/logrus"
-       "gopkg.in/yaml.v2"
 )
 
 type logger interface {
@@ -132,8 +132,10 @@ func (disp *Dispatcher) configure(prog string, args []string) error {
                if disp.Client.Insecure {
                        os.Setenv("ARVADOS_API_HOST_INSECURE", "1")
                }
-               os.Setenv("ARVADOS_KEEP_SERVICES", strings.Join(disp.Client.KeepServiceURIs, " "))
                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).")
        }