MADE-state-workers #4787

Merged
merged 33 commits into from Mar 18, 2016

Conversation

Projects
None yet
4 participants

cherylj commented Mar 18, 2016

In its last CI run, this branch only exhibited the same known restore failures as master:
http://reports.vapour.ws/releases/3761

Restore failure inherited from master: https://bugs.launchpad.net/juju-core/+bug/1558158

There are no bugs against this branch.

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

mjs and others added some commits Feb 15, 2016

worker/voyeur: Added voyeur worker manifold
This wraps a voyeur.Value for use within the dependency engine
framework. It will watch the voyeur.Value and restart itself whenever
Set is called voyeur.Value.
Merge pull request #4420 from mjs/MADE-voyeur
worker/voyeur: Added voyeur worker manifold

This wraps a voyeur.Value for use within the dependency engine framework. It will watch the voyeur.Value and restart itself whenever Set is called voyeur.Value.

(Review request: http://reviews.vapour.ws/r/3860/)
worker/state: New state worker
Creates, watches and makes available a *state.State for use in the
machine agent.
Specialise voyeur manifold to stateconfigwatcher
The voyeur manifold was created to be used with the state manifold but
wasn't suitable as is because it would cause the state manifold to
restart for *any* agent config change. We only want the state manifold
to be bounced if there's a change in state serving info.

The stateconfigwatcher manifold watches the agent config and only
bounces itself when state serving info is added or removed.
worker/state: Use stateconfigwatcher
The state manifold now has a stateconfigwatcher dependency instead of
the voyeur dependency. The voyeur manifold was reworked into the
stateconfigwatcher.
worker/stateconfigwatcher: Handle watcher being closed
When the manifold worker exited, the voyeur.Value's watcher was closed
and the inner goroutine was handling this incorrectly, spinning in a
tight loop instead of exiting. This has been fixed.

The consume of the initial watcher event has also been removed as it
is no longer necessary.
Merge pull request #4472 from mjs/MADE-state
Add state and stateconfigwatcher manifolds

The stateconfigwatcher manifold will replace the "state-starter" worker and the state manifold will replace the "state" worker. They are wired up and running in the machine agent but the replacement of the existing workers will be done in the next PR (in order to make things easier for reviewers).



(Review request: http://reviews.vapour.ws/r/3907/)
worker/state: Implement StateTracker
StateTracker wraps a *state.State, closing it when there are no longer
any references to it. This will be returned by the state manifold.
worker/state: state manifold now outputs a StateTracker
This allows the State to be closed only once it is no longer in use by
*both* the state manifold and any dependent manifolds.
Merge pull request #4488 from mjs/MADE-statetracker
worker/state: Implement StateTracker

StateTracker wraps a *state.State, closing it when there are no longer any references to it. This is output by the state manifold. 

(Review request: http://reviews.vapour.ws/r/3921/)
Complete the removal NewStorage & registerSimplestreamsDataSource calls
.. in the machine agent.

The NewStorage and registerSimplestreamsDataSource calls has been
removed from StateWorker, but the related
unregisterSimplestreamsDataSource call had been left behind. Similar
updated hadn't been made to openStateForUpgrade either.

All this allows the call signature for openStateForUpgrade to be
simplified. This flowed through to the upgradesteps manifold.

registerSimplestreamsDataSource and unregisterSimplestreamsDataSource
aren't used any more so they've been removed.
Merge pull request #4489 from mjs/clean-up-simplestream-storage
Complete the removal NewStorage & registerSimplestreamsDataSource calls

.. in the machine agent.

The NewStorage and registerSimplestreamsDataSource calls has been removed from StateWorker, but the related unregisterSimplestreamsDataSource call had been left behind. Similar updated hadn't been made to openStateForUpgrade either.

All this allows the call signature for openStateForUpgrade to be simplified. This flowed through to the upgradesteps manifold.

registerSimplestreamsDataSource and unregisterSimplestreamsDataSource aren't used any more so they've been removed.


(Review request: http://reviews.vapour.ws/r/3922/)
cmd/jujud/agent/machine: Introduce stateworkers manifold
"stateworkers" is a temporary manifold that runs workers which have
not yet been converted to run directly under the dependency engine. It
obtains a *state.State from the "state" manifold and passes it to a
function which starts the workers.

As part of this change the old "state-starter" and "state" workers
have been removed from the machine agent. They have been replaced by
equivalent dependency engine manifolds.
worker/state: Change StateTracker to be an interface
This will simplify testing elsewhere.
Merge pull request #4528 from mjs/MADE-state-workers
cmd/jujud/agent/machine: Introduce stateworkers manifold

"stateworkers" is a temporary manifold that runs workers which have not yet been converted to run directly under the dependency engine. It obtains a *state.State from the "state" manifold and passes it to a function which starts the workers.

As part of this change the old "state-starter" and "state" workers have been removed from the machine agent. They have been replaced by equivalent dependency engine manifolds.


(Review request: http://reviews.vapour.ws/r/3964/)
Resync MADE-state-workers to latest blessed master
Merge commit 'e13ffd1c3d751be653dac2a8ed0adc233f8c75d6'

Conflicts:
	cmd/jujud/agent/machine/manifolds_test.go
Resync MADE-state-workers to master
This merges master up to 2564190.

Conflicts:
	cmd/jujud/agent/machine/manifolds.go
	cmd/jujud/agent/machine/manifolds_test.go
Merge pull request #4644 from mjs/MADE-state-workers-resync
Resync MADE-state-workers to master

This merges master up to 2564190.

(Review request: http://reviews.vapour.ws/r/4087/)
Merge pull request #4658 from mjs/StateWorkersSuite-race
cmd/jujud/agent/machine: Fix race in StateWorkersSuite



(Review request: http://reviews.vapour.ws/r/4098/)
Merge pull request #4690 from howbazaar/update-MADE-state-workers
Update made state workers

Merge in tip of master.

(Review request: http://reviews.vapour.ws/r/4129/)
Merge latest blessed master into MADE-state-workers-resync
Merge commit 'f5dfd407949ee31d8f657a05533be92196569e60'.

Conflicts:
	cmd/jujud/agent/machine/manifolds_test.go
Merge pull request #4729 from mjs/MADE-state-workers-resync
Resync MADE-state-workers to latest blessed master

Merge commit 'f5dfd407949ee31d8f657a05533be92196569e60'.

Conflicts:
	cmd/jujud/agent/machine/manifolds_test.go

(Review request: http://reviews.vapour.ws/r/4167/)
Merge pull request #4731 from mjs/MADE-state-workers-race
worker/stateconfigwatcher: Fix a trival race in the tests



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

cherylj commented Mar 18, 2016

$$JFDI$$

Contributor

jujubot commented Mar 18, 2016

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

Contributor

jujubot commented Mar 18, 2016

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

cherylj commented Mar 18, 2016

$$JFDI$$

Contributor

jujubot commented Mar 18, 2016

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

jujubot added a commit that referenced this pull request Mar 18, 2016

Merge pull request #4787 from cherylj/merge-MADE-state-workers
MADE-state-workers

In its last CI run, this branch only exhibited the same known restore failures as master:
http://reports.vapour.ws/releases/3761

Restore failure inherited from master: https://bugs.launchpad.net/juju-core/+bug/1558158

There are no bugs against this branch.

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

@jujubot jujubot merged commit d253078 into juju:master Mar 18, 2016

dimitern pushed a commit to dimitern/juju that referenced this pull request Mar 18, 2016

Merge pull request #4787 from cherylj/merge-MADE-state-workers
MADE-state-workers

In its last CI run, this branch only exhibited the same known restore failures as master:
http://reports.vapour.ws/releases/3761

Restore failure inherited from master: https://bugs.launchpad.net/juju-core/+bug/1558158

There are no bugs against this branch.

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