9187: Improve squeue synchronization
authorPeter Amstutz <peter.amstutz@curoverse.com>
Thu, 2 Jun 2016 21:59:20 +0000 (17:59 -0400)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Fri, 3 Jun 2016 02:07:03 +0000 (22:07 -0400)
commitd77c4cc58d393c48ce46b987f6eada7c7cc381c6
treefb27b3a5274cc5ba6f78ce4b2605bcdba87bdd62
parent3ae9a789410e93eeb31ca5670c17a6d03d77f608
9187: Improve squeue synchronization

* Put squeue functions into separate file.

* CheckSqueue() now blocks on a condition variable until the next successful
update of squeue, which then wakes up all goroutines waiting on CheckSqueue().

* Never do anything when squeue returns an error.

* Merge submitting, monitoring, and cleanup behaviors into a single goroutine
which updates based on CheckSqueue() instead of a ticker.

* Introduce a lock on squeue, sbatch and scancel operations, so that on next
wakeup the queue is guaranteed to reflect most recent sbatch/scancel
operations.
services/crunch-dispatch-slurm/crunch-dispatch-slurm.go
services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go
services/crunch-dispatch-slurm/squeue.go [new file with mode: 0644]