[ARVADOS] updated: 5af1462689a77d3222fa29e547f1f38a80c3610d

Git user git at public.curoverse.com
Fri Feb 19 10:39:34 EST 2016


Summary of changes:
 services/crunch-dispatch-slurm/crunch-dispatch-slurm.go | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

       via  5af1462689a77d3222fa29e547f1f38a80c3610d (commit)
      from  e39e6831a61af3b889a78b2380bf978c48a20fb9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 5af1462689a77d3222fa29e547f1f38a80c3610d
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Thu Feb 18 22:20:14 2016 -0500

    6518: Add --share, quoting, shut down priority checking goroutine when
    container state is complete.

diff --git a/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go b/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go
index e053c21..5133c9f 100644
--- a/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go
+++ b/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go
@@ -139,7 +139,7 @@ func dispatchSlurm(priorityPollInterval int, crunchRunCommand string) {
 func run(uuid string, crunchRunCommand string, priorityPollInterval int) {
 	stdinReader, stdinWriter := io.Pipe()
 
-	cmd := exec.Command("sbatch", "--job-name="+uuid)
+	cmd := exec.Command("sbatch", "--job-name="+uuid, "--share")
 	cmd.Stdin = stdinReader
 	cmd.Stderr = os.Stderr
 	cmd.Stdout = os.Stderr
@@ -148,7 +148,7 @@ func run(uuid string, crunchRunCommand string, priorityPollInterval int) {
 		return
 	}
 
-	fmt.Fprintf(stdinWriter, "#!/bin/sh\nexec %s %s\n", crunchRunCommand, uuid)
+	fmt.Fprintf(stdinWriter, "#!/bin/sh\nexec '%s' '%s'\n", crunchRunCommand, uuid)
 
 	stdinWriter.Close()
 	cmd.Wait()
@@ -179,6 +179,9 @@ func run(uuid string, crunchRunCommand string, priorityPollInterval int) {
 					cancelcmd := exec.Command("scancel", "--name="+uuid)
 					cancelcmd.Run()
 				}
+				if container.State == "Complete" {
+					priorityTicker.Stop()
+				}
 			}
 		}
 	}()

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list