Cannot override a charm config with include-file:// which doesn't exist
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
$ juju version
2.8.1-focal-amd64
When I have a standard bundle, I can override a charm config using an overlay bundle.
$ grep hostname: bundle.yaml overlay.yaml
bundle.yaml: hostname: foo
overlay.yaml: hostname: bar
$ juju deploy --overlay ./overlay.yaml ./bundle.yaml
$ juju config ubuntu hostname
bar
However, if the base bundle has "include-file://" I cannot override unless I create a empty file at the destination
$ grep hostname: bundle-
bundle-
overlay.yaml: hostname: bar
$ juju deploy --overlay ./overlay.yaml ./bundle-
ERROR cannot deploy bundle: processing option "hostname" for application "ubuntu": resolving include "./myfile.txt": include file "/home/
$ touch myfile.txt
$ juju deploy --overlay ./overlay.yaml ./bundle-
-> succeeds
My expectation is that Juju goes ahead without the file because it's not going to be used anyway. It can be fairly low importance though.
Changed in juju: | |
milestone: | none → 2.9-beta1 |
status: | New → Triaged |
importance: | Undecided → Medium |
tags: | added: bitesize bun |
tags: |
added: bundles usability removed: bun |
Changed in juju: | |
milestone: | 2.9-beta1 → 2.9-rc1 |
Changed in juju: | |
milestone: | 2.9-rc1 → none |
That's the intended behavior. The include-file resolution logic in juju simply replaces the value for a particular key with the included file's contents (which might be scalar values or might be nested objects, e.g. if you want override all config entries).
Since include files may include information that is vital to deploying the bundle contents, juju will refuse to proceed with the deployment if any of the referenced include files is missing.