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

Bug #1879972 reported by james beedy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
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.

Thanks!

Revision history for this message
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
Revision history for this message
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)
Revision history for this message
Simon Richardson (simonrichardson) wrote :

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?

Revision history for this message
Simon Richardson (simonrichardson) wrote :

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 {}

Revision history for this message
Simon Richardson (simonrichardson) wrote :
Changed in juju:
status: Triaged → In Progress
Ian Booth (wallyworld)
Changed in juju:
milestone: 2.8.1 → 2.8.2
Revision history for this message
Simon Richardson (simonrichardson) wrote :

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.