Model migration control #4662

Merged
merged 49 commits into from Mar 9, 2016

Conversation

Projects
None yet
3 participants
Owner

howbazaar commented Mar 9, 2016

Merge in the control aspects of model migration.

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

mjs and others added some commits Feb 5, 2016

state: Block model migration when model is not alive.
A Dying or Dead model model can't be migrated.
apiserver/controller: Add InitiateModelMigration API
This will be used by clients to start a model migration.
apiserver: rename systemmanager.go to controller.go
The systemmanager facade was renamed to controller but this file was
missed during that change.
Merge pull request #4359 from mjs/initmodelmigration-api
apiserver/controller: Add InitiateModelMigration API

This will be used by clients to start a model migration.

(Review request: http://reviews.vapour.ws/r/3804/)
Merge pull request #4360 from mjs/model-migration-env-life-check
state: Block model migration when model is not alive.

A Dying or Dead model model can't be migrated.
Merge pull request #4362 from mjs/rename-apiserver-systemmanager
apiserver: rename systemmanager.go to controller.go

The systemmanager facade was renamed to controller but this file was missed during that change.
apiserver: Send tags as strings not tag structs
Tag structs have private fields which can't be serialised. The
conventional approach is to send tags as strings.
Merge pull request #4375 from mjs/initiatemodelmigration-apiserver-ta…
…g-types

apiserver: Send tags as strings not tag structs

Tag structs have private fields which can't be serialised. The conventional approach is to send tags as strings.

(Review request: http://reviews.vapour.ws/r/3819/)
Merge pull request #4376 from mjs/initiatemodelmigration-api
api/controller: added InitiateModelMigration support



(Review request: http://reviews.vapour.ws/r/3820/)
api/controller: Make InitiateModelMigration's API more convenient
Unpack the returned result, handling the returned error (if any), and
return just the migration id.
cmd/juju: Add "juju migrate"
The "juju migrate" commmand is used to begin a model migration.
state: Block migration attempts to the same controller
It shouldn't be possible to start a migration to the controller the
model is already attached to.
Merge pull request #4398 from mjs/no-migration-to-same-controller
state: Block migration attempts to the same controller

It shouldn't be possible to start a migration to the controller the model is already attached to.

(Review request: http://reviews.vapour.ws/r/3840/)
Adjust client side migration API to not take tags
Tags are primarily an over-the-wire concern.
Merge pull request #4400 from mjs/model-migration-control-resync
Resync model-migration-control to master

Rev 99a4e07 is latest blessed master.

(Review request: http://reviews.vapour.ws/r/3842/)
Merge pull request #4397 from mjs/migrate-command
Implement "juju migrate" command

Make InitiateModelMigration's API more convenient and implement the "juju migrate" command.

(Review request: http://reviews.vapour.ws/r/3839/)
Resync model-migration-control with latest blessed master
Merges 'e13ffd1c3d751be653dac2a8ed0adc233f8c75d6'.
Merge pull request #4542 from mjs/model-migration-control-resync
Model migration control resync

Resync to master. The "juju migrate" command (new in this branch) required significant changes around config store handling as this as all changed in master.

(Review request: http://reviews.vapour.ws/r/3978/)
state: Add State.WatchForModelMigration
This new watcher reports when a migration is created for the model
associated with the State.
Merge pull request #4556 from mjs/watch-migrations-state
state: Add State.WatchForModelMigration

This new watcher reports when a migration is created for the model associated with the State.

(Review request: http://reviews.vapour.ws/r/3995/)
apiserver/testing: Introduce FakeNotifyWatcher
FakeNotifyWatcher is a fake state.NotifyWatcher, useful for
testing. It already exists in a few places in various apiserver
packages.
apiserver/common: Use FakeNotifyWatcher
Replace the various test state.NotifyWatcher implementations with the
new FakeNotifyWatcher.
Merge pull request #4581 from mjs/fakenotifywatcher
apiserver/testing: Introduce FakeNotifyWatcher

FakeNotifyWatcher is a fake state.NotifyWatcher, useful for testing. It already exists in a few places in various apiserver packages. This change consolidates the various implementations.

(Review request: http://reviews.vapour.ws/r/4020/)
state: Turn model migration funcs into methods
There's no reason not to and this makes it easier to provide fakes for
testing of model migration functionality in the API server.
Merge pull request #4595 from mjs/migration-state-methods
state: Turn model migration funcs into methods

There's no reason not to and this makes it easier to provide fakes for testing of model migration functionality in the API server.

(Review request: http://reviews.vapour.ws/r/4035/)
state: Turn ModelMigration into an interface
Simplifies testing elsewhere
apiserver: Add migrationmaster facade
This API facade will be used by the migration master worker to watch
for active migrations for a model.
apiserver: Add MigrationMasterWatcher facade
This supports retrieval of events from the watcher created by the
MigrationMaster.Watch API. The connection and authentication details
for target controller are returned.
Merge pull request #4610 from mjs/watch-migrations-apiserver
apiserver: Add MigrationMaster and MigrationMasterWatcher facades

These will be used by the migration master worker to watch for active migrations for a model.

To make testing easier state.ModelMigration was turned into an interface.

(Review request: http://reviews.vapour.ws/r/4050/)
Merge pull request #4645 from mjs/model-migration-control-resync
Resync model-migration-control to master

 This merges up to revision 2564190.


(Review request: http://reviews.vapour.ws/r/4088/)
api: Add client side APIs for the migration master worker
This covers the MigrationMaster and MigrationMasterWatcher facades.
api/migrationmaster: Remove version from stub calls.
With APICallerFunc, the facade version is always 0 so testing for it
is distracting.
api/migrationmaster: Turn Client into an interface.
This simplifies testing of the migrationmaster worker.
worker/migrationmaster: Add migrationmaster worker skeleton
This uses the migrationmaster facade and waits for an active
migration. For now it simply exits when a migration is reported.
Merge pull request #4618 from mjs/watch-migrations-api
api: Add client side APIs for the migration master worker

This covers the MigrationMaster and MigrationMasterWatcher facades.

(Review request: http://reviews.vapour.ws/r/4058/)
apiserver/migrationmaster: Add SetPhase API
This allows the migrationmaster worker to advance the model migration
state.
Merge pull request #4654 from mjs/set-phase-apiserver
apiserver/migrationmaster: Add SetPhase API

This allows the migrationmaster worker to advance the model migration state.

(Review request: http://reviews.vapour.ws/r/4095/)
Merge pull request #4649 from mjs/migration-master
worker/migrationmaster: Add migrationmaster worker skeleton

This uses the migrationmaster facade and waits for an active migration. For now it simply exits when a migration is reported.

(Review request: http://reviews.vapour.ws/r/4092/)
api/migrationmaster: Fix race in TestWatch tests
Allow for the Stop API call to happen after the worker exits.

Fixes LP #1554605.
Merge pull request #4663 from mjs/TestWatch-fix
api/migrationmaster: Fix race in TestWatch tests

Allow for the Stop API call to happen after the worker exits.

Fixes LP #1554605.

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

mjs commented Mar 9, 2016

$$merge$$

Contributor

jujubot commented Mar 9, 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 9, 2016

Merge pull request #4662 from juju/model-migration-control
Model migration control

Merge in the control aspects of model migration.

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

@jujubot jujubot merged commit 04a068f into model-migration Mar 9, 2016

@howbazaar howbazaar deleted the model-migration-control branch Mar 9, 2016

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