Merge branch '10534-go-systemd-sdnotify-v14' of https://github.com/wtsi-hgi/arvados
authorTom Clegg <tom@curoverse.com>
Tue, 15 Nov 2016 16:35:15 +0000 (11:35 -0500)
committerTom Clegg <tom@curoverse.com>
Tue, 15 Nov 2016 16:35:15 +0000 (11:35 -0500)
refs #10534

1  2 
services/crunch-dispatch-slurm/crunch-dispatch-slurm.go

index f28d4c2826dcd9aff2069d749dab0c706520590d,7e690eba80ae035bfe5ebbe9a086597680abd56d..3c4f281912842a0ceedb6df409aa61e80fa38fa2
@@@ -105,7 -105,7 +105,7 @@@ func doMain() error 
                PollInterval:   time.Duration(theConfig.PollPeriod),
                DoneProcessing: make(chan struct{})}
  
-       if _, err := daemon.SdNotify("READY=1"); err != nil {
+       if _, err := daemon.SdNotify(false, "READY=1"); err != nil {
                log.Printf("Error notifying init daemon: %v", err)
        }
  
@@@ -127,8 -127,8 +127,8 @@@ func sbatchFunc(container arvados.Conta
        sbatchArgs = append(sbatchArgs, fmt.Sprintf("--job-name=%s", container.UUID))
        sbatchArgs = append(sbatchArgs, fmt.Sprintf("--mem-per-cpu=%d", int(memPerCPU)))
        sbatchArgs = append(sbatchArgs, fmt.Sprintf("--cpus-per-task=%d", container.RuntimeConstraints.VCPUs))
 -      if container.RuntimeConstraints.Partition != nil {
 -              sbatchArgs = append(sbatchArgs, fmt.Sprintf("--partition=%s", strings.Join(container.RuntimeConstraints.Partition, ",")))
 +      if container.SchedulingParameters.Partitions != nil {
 +              sbatchArgs = append(sbatchArgs, fmt.Sprintf("--partition=%s", strings.Join(container.SchedulingParameters.Partitions, ",")))
        }
  
        return exec.Command("sbatch", sbatchArgs...)