Source migration prechecks infrastructure #6088

Merged
merged 10 commits into from Aug 25, 2016

Conversation

Projects
None yet
3 participants
Contributor

mjs commented Aug 24, 2016

This PR is mainly about adding the plumbing to support prechecks for the source controller and model. The infrastructure of target controller prechecks, as well as more precheck implementations, are coming.

Here we have:

  • Cleaned up existing precheck code and tests
  • Added a check to ensure that all machines in the source model have the same tools version as the version set on the model
  • Added precheck support to the MigrationMaster facade (apiserver and api)
  • migrationmaster worker now calls precheck API in PRECHECK phase
+ machine.Id(), machineVersion, modelVersion)
+ }
+ }
+
@howbazaar

howbazaar Aug 24, 2016

Owner

Do you want to add TODO comment for other prechecks?

@mjs

mjs Aug 25, 2016

Contributor

I had it in a text file but you're right that it would be better in the code. Done.

+ w.setErrorStatus("prechecks failed, %v", err)
+ return coremigration.ABORT, nil
+ }
+ // TODO(mjs) - perform prechecks on target controller
@howbazaar

howbazaar Aug 24, 2016

Owner

what checks? like existence of model name?

@mjs

mjs Aug 25, 2016

Contributor

Yep and a bunch of other things such as the health of the controller machines, that the controller isn't upgrading.

Owner

howbazaar commented Aug 24, 2016

Looks like a good start. LGTM

Contributor

mjs commented Aug 25, 2016

$$merge$$

Contributor

jujubot commented Aug 25, 2016

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

Contributor

jujubot commented Aug 25, 2016

Build failed: Does not match ['fixes-1616584', 'fixes-1611514', 'fixes-1475212']
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/8924

mjs added some commits Aug 24, 2016

migration: Separate source & target prechecks
The checks to perform on the source and target will be different and
done separately.
migration: Check machine tools match model
Ensure that an upgrade isn't in progress by checking that all machines
in the model have the same tools version as what's set for the model.
migration: Implemented PrecheckShim
This wraps a *state.State to implement the interface required for
migration prechecks.
apiserver/migrationmaster: Add precheck support
A new Precheck method will run pre-migration checks on the model and
source controller.
Contributor

mjs commented Aug 25, 2016

$$merge$$

Contributor

jujubot commented Aug 25, 2016

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

@jujubot jujubot merged commit cd722b6 into juju:master Aug 25, 2016

@mjs mjs deleted the mjs:MM-source-prechecks branch Aug 26, 2016

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