10041: Set ARVADOS_KEEP_SERVICES from Client.KeepServicesURIs field.
authorTom Clegg <tom@curoverse.com>
Sat, 8 Oct 2016 22:25:54 +0000 (18:25 -0400)
committerTom Clegg <tom@curoverse.com>
Sat, 8 Oct 2016 22:25:54 +0000 (18:25 -0400)
services/crunch-dispatch-slurm/crunch-dispatch-slurm.go
services/crunch-dispatch-slurm/usage.go

index 85a71d477437c44ad783dda08c9f710e61161727..aaea51cbf7950d30e2a8fe91aed8843566c98114 100644 (file)
@@ -32,8 +32,6 @@ type Config struct {
        //
        // Example: []string{"crunch-run", "--cgroup-parent-subsystem=memory"}
        CrunchRunCommand []string
-
-       ArvadosKeepServices []string
 }
 
 func main() {
@@ -85,7 +83,7 @@ func doMain() error {
                if theConfig.Client.Insecure {
                        os.Setenv("ARVADOS_API_INSECURE", "1")
                }
-               os.Setenv("ARVADOS_KEEP_SERVICES", strings.Join(theConfig.ArvadosKeepServices, " "))
+               os.Setenv("ARVADOS_KEEP_SERVICES", strings.Join(theConfig.Client.KeepServiceURIs, " "))
                os.Setenv("ARVADOS_EXTERNAL_CLIENT", "")
        } else {
                log.Printf("warning: Client credentials missing from config, so falling back on environment variables (deprecated).")
index cd2d8ad23dd98a4bf8b434297e2c5e91c5ac7be7..ddfbdb09266625dfa415166074a663c66273ff24 100644 (file)
@@ -12,9 +12,9 @@ var exampleConfigFile = []byte(`
            "APIHost": "zzzzz.arvadosapi.com",
            "AuthToken": "xyzzy",
            "Insecure": false
+           "KeepServiceURIs": [],
        },
        "CrunchRunCommand": ["crunch-run"],
-       "ArvadosKeepServices": [""],
        "PollPeriod": "10s",
        "SbatchArguments": ["--partition=foo", "--exclude=node13"]
     }`)