Importing an exported bundle fails with an error #1937

Closed
rbclark opened this Issue Aug 18, 2016 · 5 comments

Comments

Projects
None yet
3 participants

rbclark commented Aug 18, 2016

I am currently using the current juju beta: 2.0-beta15-xenial-amd64. I have a bundle which I have exported using the juju gui and not modified which is can be found here: default-2016-08-16.txt. When I attempt to import this bundle back into the juju gui I get the following error:

The following errors occurred while retrieving bundle changes: cannot read bundle YAML: 
cannot unmarshal bundle data: yaml: unmarshal errors: line 1: cannot unmarshal !!str 
`xenial` into charm.legacyBundleData

I am able to reorder the contents of the yaml file and then get it to import, however attempting to import in the order which it was originally exported fails.

@hatched hatched added the bug label Aug 18, 2016

@hatched hatched added this to the 2.1.11 milestone Aug 18, 2016

Owner

hatched commented Aug 18, 2016

Thanks for filing the issue @rbclark we'll take a look into this and get back to you.

Owner

hatched commented Aug 18, 2016

When importing this bundle into the GUI the RPC call to fetch the changes:

{"type":"Client","request":"GetBundleChanges","params":{"yaml":"\"xenial\""},"version":1,"request-id":17}

It appears that the GUI doesn't like to import bundles where the top level key is applications instead of services. Making that change allows the data to be correctly sent to fetch the changes. It then complains about invalid constraint values:

"invalid constraints "arch=amd64 cpu-cores=24 mem=49152 undefined=default" in machine "0": unknown constraint "undefined""

which are reproduced for every machine:

machines:
  "0":
    series: xenial
    constraints: "arch=amd64 cpu-cores=24 mem=49152 undefined=default"
Owner

hatched commented Aug 18, 2016

Sorry for the inconvenience @rbclark I've attached a modified version of the bundle file which ingests correctly.

default-2016-08-16-modified.txt

Unfortunately any bundle that's exported from the GUI will exhibit the same issues and need the same modifications made until this issue is resolved.

rbclark commented Aug 18, 2016

Thanks, that did fix it! I'm not sure exactly why the undefined=default was added to every one, that may be a separate bug that's happening as I didn't add that manually.

@hatched hatched changed the title from Importing an exported configuration fails with an error to Importing an exported bundle fails with an error Aug 19, 2016

@jujugui jujugui closed this in #1945 Aug 23, 2016

jujugui added a commit that referenced this issue Aug 23, 2016

Merge pull request #1945 from huwshimi/fix-import
Fix bundle import/export

There are two issues addressed here. Firstly Fixes importing bundles files using the new yaml format using 'applications' instead of 'services' and also resolves exporting bundles with availability-zone constraints. Fixes #1937.
Owner

hatched commented Aug 23, 2016

@rbclark This issue has now been resolved in the development branch of the GUI and will be in the next release.

The undefined=default was another bug which has also been resolved.

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