Unclear how to set model-defaults from a file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
Medium
|
Heather Lanigan |
Bug Description
Version: 2.9.29-ubuntu-amd64
I would like to be able to replace by model-defaults using a file as input. The model-defaults help text makes it sound like this is possible:
"""
Model defaults yaml configuration can be piped from stdin from the output of
the command stdout. Some model-defaults configuration are read-only, to prevent
the command exiting on read-only fields, setting "ignore-
cause it to skip over the fields when they're encountered.
"""
My reading of that is that I should be able to do something like:
juju model-defaults > model.defaults
$EDITOR model-defaults
juju model-dfeaults < model.defaults
However, this doesn't seem to work in practice. Here's my trying to change my default-series using that method:
$ juju model-defaults > model.defaults
$ grep focal model.defaults
default-series focal -
$ sed -i 's/focal/bionic/' model.defaults
$ grep default-series model.defaults
default-series bionic -
$ juju model-defaults < model.defaults
Attribute Default Controller
agent-metadata-url "" -
agent-stream released -
apt-ftp-proxy "" -
[...]
$ juju model-defaults | grep default-seri
default-series focal -
$
Of course, I know I can change individual model-default values, but I'm looking for a way to load them from a file all at once w/o caring which ones actually have different values.
Changed in juju: | |
status: | In Progress → Fix Committed |
Changed in juju: | |
milestone: | 2.9.31 → 2.9.30 |
milestone: | 2.9.30 → 2.9.31 |
Changed in juju: | |
status: | Fix Committed → Fix Released |
The `juju help model-defaults` has two examples of using a file:
juju model-defaults us-east-1 path/to/file.yaml 10.0.0. 1:8000 path/to/file.yaml
juju model-defaults us-east-1 ftp-proxy=
Granted, they are hidden in a list of many examples without explanation of what they are, we can definitely improve that. It is better described in `juju help model-config`.