incorrect output of juju export-bundle for local charms

Bug #1936276 reported by Leon
6
This bug affects 1 person
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-k8s.charm --resource alertmanager-image=ubuntu/prometheus-alertmanager
    juju deploy ./karma-k8s.charm --resource karma-image=ghcr.io/prymitive/karma:v0.87
    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/alertmanager-k8s-6
    scale: 1
  karma-k8s:
    charm: local:focal/karma-k8s-1
    scale: 1
relations:
- - karma-k8s:dashboard
  - alertmanager-k8s:karma-dashboard

Deploying this (after juju remove-application), gives the following error:

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/tux/alertmanager-k8s": file does not exist

Leon (sed-i)
description: updated
Changed in juju:
assignee: nobody → Simon Richardson (simonrichardson)
milestone: none → 2.9.10
importance: Undecided → High
Changed in juju:
importance: High → Medium
Revision history for this message
Simon Richardson (simonrichardson) wrote :

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.

Revision history for this message
Simon Richardson (simonrichardson) wrote :
Changed in juju:
status: New → Fix Committed
Revision history for this message
Leon (sed-i) wrote :

Thanks.
So at the moment local charms are not supported by bundles?

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 1936276] Re: incorrect output of juju export-bundle for local charms

export-bundle does not remember the path that was used to deploy, but
otherwise local bundles are perfectly supported

On Fri, Jul 16, 2021 at 12:10 PM Leon <email address hidden> wrote:

> Thanks.
> So at the moment local charms are not supported by bundles?
>
> --
> You received this bug notification because you are subscribed to juju.
> Matching subscriptions: juju bugs
> https://bugs.launchpad.net/bugs/1936276
>
> Title:
> incorrect output of juju export-bundle for local charms
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1936276/+subscriptions
>
>

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.