migrations: Implement AdoptResources for the ec2 provider #6900

Merged
merged 1 commit into from Feb 2, 2017

Conversation

Projects
None yet
3 participants
Member

babbageclunk commented Feb 2, 2017

Description of change

The AdoptResources environ method will be used at the end of a model migration to update the controller tag for all of the resources used by the model, so that if the source controller is subsequently destroyed then these resources won't be cleaned up with it.

In the ec2 provider we tag volumes, instances and security groups with the controller UUID. We collect all of the resource IDs from these and call CreateTags in the ec2 API (which will overwrite tags, and leave tags in place if they aren't specified).

QA steps

None yet - this method isn't called from the migration master yet.

Documentation changes

N/A

Bug reference

This is part of the fix for https://bugs.launchpad.net/juju/+bug/1648063

axw approved these changes Feb 2, 2017

Nice and simple, LGTM.

Member

babbageclunk commented Feb 2, 2017

$$merge$$

Contributor

jujubot commented Feb 2, 2017

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

@jujubot jujubot merged commit 96835f3 into juju:2.1 Feb 2, 2017

@babbageclunk babbageclunk deleted the babbageclunk:mm-adopt-resources-ec2 branch Feb 2, 2017

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