Katello/katello — pull request #1316 by ares (2012-12-19 12:10:33+00:00)
Title: Fixes 790216 running changesets concurently

Instead of disallow creation of changeset immediately check whether new
promotion/deletion is conflicting with any other that is currently
running. If it is not it's registered and run. Conflicting promotions
and deletion are refused in same way they were up to now. There are good
reasons for this - see bugzilla for more.

Conflicting (collision) is considered another runnin changeset (in state
promoting or deleting) which fits to one of these conditions:
* starts and ends on same environment
* starts on environment that is end for current changest
* ends on environment that is start for current changeset

All other cases are considered safe. With more than one worker they can
even run concurently.