Model migration now possible with cross model relations

Migrating Remote Applications using cross model relations has now landed in develop branch and should be pushed to the edge snap as soon as it’s run through our CI (install via snap install juju --edge --classic).

Please have a play with this new feature and let us know if you encounter any issues.


An example of a need to migrate an application maybe to upgrade your application to a more up to date controller or help manage the usage of a application. Either way they’re super useful and add some powerful constructs to Juju itself.

More information about CMR can be found at the cross-mode-relations docs


Whilst developing the feature we also added some new integration tests. If you’re so inclined to see the code, you can have a look at how they work. Go crib from them if you want a more solid follow through, but as an abridge version below should be sufficient.

Migrating

Using your existing bootstrapped controller, bootstrap your new controller (dest in this example) and wait for it to come up.

juju migrate src-model dest

You can follow the progress by doing juju status (watch -c juju status is your friend) of the current model and also waiting for the src-model to appear in dest.

The migration should be repeatable if there are any problems in migration.

Caveats

It’s important to note that there are a few caveats when using relations and offers in general, that also affect CMR.

  1. If you attempt to destroy a model/controller that has an existing offer, you’ll be blocked and it’s important that you remove that offer first, before attempting to destroy the controller.
  2. Ensuring a relation is up and running before attempting to migrate the model is required. You’ll get an error when this happens, but retrying again should succeed.
3 Likes

This is really great work, Simon. Well done for landing this. If it’s in develop, it’ll likely hit users at 2.8, correct?

@timClicks yeah you’re correct, it’s 2.8. Unfortunately it was too complicated to land for 2.7 branch with all changes going on.

When do we expect 2.8 stable to be released ?

2.8 will be our release at the end of this Ubuntu cycle so towards the end of April.