Assign unit worker #3698

Merged
merged 4 commits into from Nov 12, 2015

Conversation

Projects
None yet
3 participants
Contributor

natefinch commented Nov 9, 2015

This re-applies the original PR (since it had been reverted) and fixes the two bugs that were found with it - unable to deploy units (actually, the problem was that the units were getting assigned multiple times) and machines were getting created with non-sequential numbers. both were caused by the fact that the unitassigner was being run on all machines, and so every machine would issue a request to assign a unit whenever one was ready to be assigned. Now we use a singular runner to ensure that only one unitassigner is running.

(Review request: http://reviews.vapour.ws/r/3103/)

natefinch and others added some commits Nov 9, 2015

Merge pull request #3427 from natefinch/assign-worker
UnitAssigner worker

This PR moves unit assignment during service deployment into a worker.  Thus, when you deploy a service, we don't immediately create machines and assign units to them.  Instead, we record what you'd like to have happen, and have the worker do that.  This makes service deployment atomic, and allows for retrying of unit assignment as needed.  However, it complicates tests, because now the assignment is not synchronous, so there's some changes to tests to poll for the expected units/machines while we wait for the worker to do its thing.

(Review request: http://reviews.vapour.ws/r/2814/)
Contributor

kat-co commented Nov 12, 2015

$$merge$$

Contributor

jujubot commented Nov 12, 2015

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

jujubot added a commit that referenced this pull request Nov 12, 2015

Merge pull request #3698 from natefinch/assign-worker
Assign unit worker

This re-applies the original PR (since it had been reverted) and fixes the two bugs that were found with it - unable to deploy units (actually, the problem was that the units were getting assigned multiple times) and machines were getting created with non-sequential numbers.  both were caused by the fact that the unitassigner was being run on all machines, and so every machine would issue a request to assign a unit whenever one was ready to be assigned.  Now we use a singular runner to ensure that only one unitassigner is running.

(Review request: http://reviews.vapour.ws/r/3103/)

@jujubot jujubot merged commit d42c6f4 into juju:master Nov 12, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment