incorrect output of juju export-bundle for local charms
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
Medium
|
Simon Richardson |
Bug Description
I have two local charms that I export to a bundle:
juju deploy ./alertmanager-
juju deploy ./karma-k8s.charm --resource karma-image=
juju relate karma-k8s alertmanager-k8s
juju export-bundle --filename ~/bundle.yaml
The output looks incorrect (specifically the path):
bundle: kubernetes
applications:
alertmanager-k8s:
charm: local:focal/
scale: 1
karma-k8s:
charm: local:focal/
scale: 1
relations:
- - karma-k8s:dashboard
- alertmanager-
Deploying this (after juju remove-
juju deploy ~/bundle.yaml
Executing changes:
- upload charm alertmanager-k8s from local for series focal with architecture=amd64
ERROR cannot deploy bundle: cannot deploy local charm at "/home/
description: | updated |
Changed in juju: | |
assignee: | nobody → Simon Richardson (simonrichardson) |
milestone: | none → 2.9.10 |
importance: | Undecided → High |
Changed in juju: | |
importance: | High → Medium |
Changed in juju: | |
status: | New → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
Unfortunately, we don't actually store the local directory anywhere once the charm has been deployed. The charm URL ends up becoming the charm name + a revision. The reason we don't save the charm file path as a charm URL to the directory structure is that the bundle doesn't become useable for others. The same directory structure for user A isn't the same as user B, even worse with absolute filepaths.
Charmhub and the now deprecated charmstore is the preferred way to get repeatable deployments.
Having said all of this, there is a bug in this and that is the fact that the series exported with the charm path. That shouldn't be the case and I'll fix that accordingly.