X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/72a8b3582d925ea30fe78697ff76bafb20d8bd9e..e5a8dfa1ceeceacf8a51e99d2138d4b2b89411e8:/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 75e6146f53..e4a1e4840b 100644 --- a/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go +++ b/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go @@ -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 { @@ -109,7 +109,6 @@ func (disp *Dispatcher) configure(prog string, args []string) error { disp.logger.Printf("crunch-dispatch-slurm %s started", version) - loader.LegacyComponentConfig = loader.CrunchDispatchSlurmPath cfg, err := loader.Load() if err != nil { return err @@ -133,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).") }