crowbar/barclamp-dns — pull request #66 by VictorLowther (2013-10-11 19:35:24+00:00)
Title: Fix several Run-related race conditions [3/4]

Fix a few races around Runs:
* Only one caller at a time should mess with the Run table.
Since we are using a database that has the right capabilities,
throw a table lock into all top-level transactions that mess with
the Runs table in any way.
* Refactor Run.enqueue and Run.run! to make the former a
special-purpose function used to bypass some of the one-job-per-node
rules, and let Run.run! handle all the usual use cases.
* Refactor the jigs to let Run.run! precalculate what any given jig
will need for a run and then pass that in instead of letting the run
use whatever state happens to be lying around when delayed_jobs gets
around to doing its thing. This helps keep parallel Jig runs
interconsistent.

.../app/models/barclamp_dns/database.rb | 34 ++++++++++++----------
1 file changed, 19 insertions(+), 15 deletions(-)

Crowbar-Pull-ID: 7e4d4af3d6449b9d69d65e99a3e4e9c72ba47979

Crowbar-Release: development