juju model-config does not export in a way that is reusable

Bug #1879972 reported by james beedy on 2020-05-21
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Simon Richardson

Bug Description

Feature request: Is it possible to export the model-config in a way that is reusable and can be accepted as input to `juju model-config my-model-config-export.yaml`?

For example,

$ juju model-config | grep cloud
cloudinit-userdata model <value set, see juju model-config cloudinit-userdata>

I can understand the reasoning behind not exposing the cloud-init in the model-config output. Possibly we can add a flag `--show-all` to indicate that the model-config should be exported in a way that it can be reused it to configure another model.


Ian Booth (wallyworld) wrote :

Yeah, I think adding an option that allows round trip is a good idea.

Changed in juju:
milestone: none → 2.8.1
importance: Undecided → High
status: New → Triaged
Tim Penhey (thumper) wrote :

Perhaps just --all as we have a flag like that used in other places.

Changed in juju:
assignee: nobody → Simon Richardson (simonrichardson)

Whilst testing this to understand the request, I also hit the following:

 - https://bugs.launchpad.net/bugs/1833110
 - https://bugs.launchpad.net/juju/+bug/1759398

Thoughts on fixing those as well?

I don't think you want `--all` flag here at all. As using `juju mode-config --format=yaml cloudinit-userdata` will do what you want. Now the problem we run into is, that if we want to consume that output breaks with the following output:

Full scenario:

    juju model-config --format=yaml cloudinit-userdata > test.yaml
    juju model-config ./test.yaml
    ERROR json: unsupported type: map[interface {}]interface {}

Changed in juju:
status: Triaged → In Progress
Ian Booth (wallyworld) on 2020-07-03
Changed in juju:
milestone: 2.8.1 → 2.8.2

Follow up bug to bring this sort of thinking to every command - https://bugs.launchpad.net/juju/+bug/1886654

Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers