migration: set model.Type now that 2.2 is exporting a v4 Model #7991

Merged
merged 2 commits into from Oct 31, 2017

Conversation

Projects
None yet
3 participants
Member

babbageclunk commented Oct 31, 2017

Description of change

The description dependency was updated on the 2.2 branch (such that it
now exports v4 models). For correctness sake we should be setting the model type
(although I will also change the 2.3 branch to accept a blank model type so that migrating
from a 2.2.5 or .6 controller to a 2.3 one will work).

Includes a driveby to limit status history entries to 20 in exported models.

QA steps

Bootstrap a 2.3-beta1 controller (B) and a 2.2 branch one with this change in it (A).
Migrate a model from A to B. It should succeed, and there shouldn't be an error about
blank model types.

Bug reference

Part of the fix for https://bugs.launchpad.net/juju/+bug/1728486

babbageclunk added some commits Oct 30, 2017

Set model.Type when exporting a v4 Model
The description dependency was updated on the 2.2 branch (such that it
now emits v4 models). That means we need to set the type to "iaas",
otherwise importing them on a 2.3 branch controller will fail when it
checks the model type.

Part of fixing https://bugs.launchpad.net/juju/+bug/1728486
Limit exported status history entries to 20
We've seen migrations fail because the controller ran out of memory
trying to serialise exported models with lots of status history. It's
not really important to maintain all of the history when migrating.

axw approved these changes Oct 31, 2017

Member

babbageclunk commented Oct 31, 2017

$$merge$$

Contributor

jujubot commented Oct 31, 2017

Status: merge request accepted. Url: http://ci.jujucharms.com/job/github-merge-juju

@jujubot jujubot merged commit 8a1aa58 into juju:2.2 Oct 31, 2017

1 check passed

continuous-integration/jenkins/pr-merge This commit looks good
Details

@babbageclunk babbageclunk deleted the babbageclunk:set-model-type-2.2 branch Oct 31, 2017

babbageclunk added a commit to babbageclunk/juju that referenced this pull request Oct 31, 2017

Merge 2.2 branch into develop
Primarily so I can fix the conflicts that
juju#7991 caused rather than leaving
them for someone else to puzzle out.

jujubot added a commit that referenced this pull request Oct 31, 2017

Merge pull request #7997 from babbageclunk/merge2.2
merge 2.2 into develop

## Description of change
Merge my changes in from the 2.2 branch primarily so I can fix the conflicts that #7991 caused rather than leaving them for someone else to puzzle out.

Also gets rid of some debug logging that was landed inadvertently.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment