Cannot override a charm config with include-file:// which doesn't exist

Bug #1889718 reported by Nobuto Murata
6
This bug affects 1 person
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-with-include.yaml overlay.yaml
bundle-with-include.yaml: hostname: include-file://./myfile.txt
overlay.yaml: hostname: bar

$ juju deploy --overlay ./overlay.yaml ./bundle-with-include.yaml
ERROR cannot deploy bundle: processing option "hostname" for application "ubuntu": resolving include "./myfile.txt": include file "/home/nobuto/src/private/fce-templates/myfile.txt" not found

$ touch myfile.txt

$ juju deploy --overlay ./overlay.yaml ./bundle-with-include.yaml
-> 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.

Revision history for this message
Nobuto Murata (nobuto) wrote :
Revision history for this message
Nobuto Murata (nobuto) wrote :
Revision history for this message
Nobuto Murata (nobuto) wrote :
Ian Booth (wallyworld)
Changed in juju:
milestone: none → 2.9-beta1
status: New → Triaged
importance: Undecided → Medium
tags: added: bitesize bun
tags: added: bundles usability
removed: bun
Revision history for this message
Achilleas Anagnostopoulos (achilleasa) wrote :

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.

Changed in juju:
milestone: 2.9-beta1 → 2.9-rc1
Pen Gale (pengale)
Changed in juju:
milestone: 2.9-rc1 → none
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.

Changed in juju:
importance: Medium → Low
tags: added: expirebugs-bot
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.