[ARVADOS] created: 25236212b8f726335ede5d4aa5da120b81ef19a4
Git user
git at public.curoverse.com
Sat Oct 8 16:20:05 EDT 2016
at 25236212b8f726335ede5d4aa5da120b81ef19a4 (commit)
commit 25236212b8f726335ede5d4aa5da120b81ef19a4
Author: Ward Vandewege <ward at curoverse.com>
Date: Sat Oct 8 16:19:06 2016 -0400
Make sure that we can set ARVADOS_KEEP_SERVICES via the
crunch-dispatch-slurm configuration file.
refs #10041 #9550
diff --git a/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go b/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go
index 5a1ebc5..85a71d4 100644
--- a/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go
+++ b/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go
@@ -32,6 +32,8 @@ type Config struct {
//
// Example: []string{"crunch-run", "--cgroup-parent-subsystem=memory"}
CrunchRunCommand []string
+
+ ArvadosKeepServices []string
}
func main() {
@@ -83,7 +85,7 @@ func doMain() error {
if theConfig.Client.Insecure {
os.Setenv("ARVADOS_API_INSECURE", "1")
}
- os.Setenv("ARVADOS_KEEP_SERVICES", "")
+ os.Setenv("ARVADOS_KEEP_SERVICES", strings.Join(theConfig.ArvadosKeepServices, " "))
os.Setenv("ARVADOS_EXTERNAL_CLIENT", "")
} else {
log.Printf("warning: Client credentials missing from config, so falling back on environment variables (deprecated).")
diff --git a/services/crunch-dispatch-slurm/usage.go b/services/crunch-dispatch-slurm/usage.go
index e8a1f18..cd2d8ad 100644
--- a/services/crunch-dispatch-slurm/usage.go
+++ b/services/crunch-dispatch-slurm/usage.go
@@ -14,6 +14,7 @@ var exampleConfigFile = []byte(`
"Insecure": false
},
"CrunchRunCommand": ["crunch-run"],
+ "ArvadosKeepServices": [""],
"PollPeriod": "10s",
"SbatchArguments": ["--partition=foo", "--exclude=node13"]
}`)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list