migrations: Add AdoptInstances to maas provider #6829

Merged
merged 2 commits into from Jan 18, 2017

Conversation

Projects
None yet
3 participants
Member

babbageclunk commented Jan 18, 2017

Part of https://bugs.launchpad.net/juju/+bug/1648063

Implement AdoptInstances in the maas provider using machine.SetOwnerData.

QA steps - none, this code isn't runnable until the migration master is updated.

Member

babbageclunk commented Jan 18, 2017

!!chittychitty!!

axw approved these changes Jan 18, 2017

provider/maas/environ.go
+ return errors.Errorf("instance %q wasn't a maas2Instance", instance.Id())
+ }
+ // SetOwnerData will update the existing tags with this data.
+ err := maas2Instance.machine.SetOwnerData(map[string]string{tags.JujuController: controllerUUID})
@axw

axw Jan 18, 2017

Member

just want to confirm, SetOwnerData doesn't wipe out the existing keys != tags.JujuController?

@babbageclunk

babbageclunk Jan 18, 2017

Member

No it doesn't - I'll clarify the comment with a link to the docs.

Member

babbageclunk commented Jan 18, 2017

$$merge$$

Contributor

jujubot commented Jan 18, 2017

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

@jujubot jujubot merged commit 920f411 into juju:2.1 Jan 18, 2017

@babbageclunk babbageclunk deleted the babbageclunk:mm-destroy-controller-maas branch Jan 18, 2017

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