Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnitAssigner worker #3427

Merged
merged 41 commits into from
Nov 4, 2015
Merged

UnitAssigner worker #3427

merged 41 commits into from
Nov 4, 2015

Conversation

natefinch
Copy link
Contributor

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/)

@natefinch
Copy link
Contributor Author

$$merge$$

@jujubot
Copy link
Collaborator

jujubot commented Oct 30, 2015

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

@jujubot
Copy link
Collaborator

jujubot commented Oct 30, 2015

Build failed: Does not match ['fixes-1511771']
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/5264

@natefinch
Copy link
Contributor Author

$$merge$$

@jujubot
Copy link
Collaborator

jujubot commented Nov 4, 2015

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

@jujubot
Copy link
Collaborator

jujubot commented Nov 4, 2015

Build failed: Generating tarball failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/5288

@natefinch
Copy link
Contributor Author

$$merge$$

@jujubot
Copy link
Collaborator

jujubot commented Nov 4, 2015

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

@jujubot
Copy link
Collaborator

jujubot commented Nov 4, 2015

Build failed: Generating tarball failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/5298

jujubot and others added 21 commits November 4, 2015 10:01
store the charm settings in the same transaction that adds the service

This fixes part of https://bugs.launchpad.net/juju-core/+bug/1486553 **i/o timeout errors can cause non-atomic service deploys** - the part about settings not getting set atomically when the service is added, so you can have a service added without the settings set correctly.

Now the setting and service add are done in the same transaction, so if there's a service, it has the right settings, period.

This does not fix the second part of the problem, where the units may not get assigned, that can still happen (so if you deploy a service with non-zero units, you might get a service with zero units).

(Review request: http://reviews.vapour.ws/r/2639/)
Conflicts:
	state/state_test.go
…e during AddService (since it's not yet). Also change AssignUnits to return a list of the results of the assignation.
refactor the idprefixwatcher to a generic collection watcher and refactor the watcher to be a strings watcher.
… the logic for converting an instance.Placement into the magic string that provicers want
Moved the code to run the unitassigner worker into a couple base suites, which fixed a ton of tests.
@kat-co
Copy link
Contributor

kat-co commented Nov 4, 2015

$$merge$$

@jujubot
Copy link
Collaborator

jujubot commented Nov 4, 2015

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

@jujubot
Copy link
Collaborator

jujubot commented Nov 4, 2015

Build failed: Generating tarball failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/5307

@natefinch
Copy link
Contributor Author

$$merge$$

@jujubot
Copy link
Collaborator

jujubot commented Nov 4, 2015

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

@jujubot
Copy link
Collaborator

jujubot commented Nov 4, 2015

Build failed: Tests failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/5309

@natefinch
Copy link
Contributor Author

$$merge$$

@jujubot
Copy link
Collaborator

jujubot commented Nov 4, 2015

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

@jujubot
Copy link
Collaborator

jujubot commented Nov 4, 2015

Build failed: Tests failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/5312

@natefinch
Copy link
Contributor Author

this was a spurious test timeout, retrying.
$$merge$$

@jujubot
Copy link
Collaborator

jujubot commented Nov 4, 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 4, 2015
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/)
@jujubot jujubot merged commit 9462c5d into juju:master Nov 4, 2015
jujubot added a commit that referenced this pull request Nov 6, 2015
Revert unitassigner merge (PR #3427)

Reverts PR #3427 (merge of unitassigner)

This fixes https://bugs.launchpad.net/juju-core/+bug/1513552 (master cannot deploy charms)

$$fixes-1513552$$

(Review request: http://reviews.vapour.ws/r/3083/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants