juju / 1.25-upgrade

Tools to upgrade and move a 1.25 environment to a 2.2.4+ controller
4 stars 7 forks source link

Upgrade provider tagging while importing #26

Closed babbageclunk closed 7 years ago

babbageclunk commented 7 years ago

Before the machine sanity check at the end of the import can succeed we need to update the provider's tags on the instances to match what Juju 2 expects so that the target controller can find them. The tagging is provider-specific, so each provider that we support in the upgrade will need to implement the TagUpgrader interface.

Add code to import to upgrade the tags before checking machines between the provider and new model. Add downgrading the tags to the abort command. Also call AdoptResources on the newly imported model after activating it.

(I had done an implementation of TagUpgrader for the ec2 provider, but testing showed that we need to rename security groups as well for that to work, so I've backed that out until we need it, if ever.)

babbageclunk commented 7 years ago

This follows on from #25, so you can skip the first commit.