Local charm has channel specified

Bug #1970608 reported by Domas Monkus
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Heather Lanigan

Bug Description

When deploying a juju bundle to a model with the bundle already deployed (to apply config changes), I get the following error:
```
ERROR cannot deploy bundle: application "filebeat": upgrades not supported across channels (existing: "stable", resolved: ""); use --force to override
```

Juju version: 2.9.27
Cloud: openstack

This is a mojo-controlled deployment with a collect phase, so all charms are deployed from local storage, however, they appear to be marked as coming from the stable channel:
```
(...)
 filebeat:
    charm: local:xenial/filebeat-1
    series: xenial
    os: ubuntu
    charm-origin: local
    charm-name: filebeat
    charm-rev: 1
    charm-channel: stable
(...)
```

The bundle itself does not specify the channel:
```
(...)
filebeat:
    charm: {{ build_dir }}/../charms/{{ series }}/filebeat
    options:
(...)
```

Tags: bundles
Revision history for this message
Ian Booth (wallyworld) wrote :

It seems wrong to me that local charms are having the channel set.

tags: added: bundles
Changed in juju:
milestone: none → 2.9.30
status: New → Triaged
importance: Undecided → High
tags: added: bitesize
Revision history for this message
Heather Lanigan (hmlanigan) wrote :

Local charms won't use the channel, this is a cosmetic issue with the output of status. The juju db application has no channel set for local charms.

Revision history for this message
Domas Monkus (tasdomas) wrote :

This is obviously more than just a cosmetic issue, since it's preventing us from rolling out configuration changes.

Revision history for this message
Domas Monkus (tasdomas) wrote :

Also, from inspecting mojo logs, it looks like this wasn't an issue with juju 2.8.7 and happened after an upgrade to 2.9.21

Revision history for this message
Heather Lanigan (hmlanigan) wrote :

It's related to the work for integrating charmhub into juju, so specific to 2.9.

Please supply steps to reproduce outside of mojo.

Revision history for this message
Domas Monkus (tasdomas) wrote :

Sure.

# Let's start with a juju 2.8 controller
$ sudo snap install juju --channel 2.8/stable
$ mkdir t; cd t
$ charm pull cs:ubuntu
# copy attached bundle.yaml file
$ juju deploy ./bundle.yaml
$ juju status --yaml
(...)
applications:
  u:
    charm: local:focal/ubuntu-0
    series: focal
    os: ubuntu
    charm-origin: local
    charm-name: ubuntu # no charm-channel present
    charm-rev: 0
    exposed: false
(...)

# upgrade to 2.9
$ sudo snap refresh juju --channel 2.9/stable
$ juju upgrade-controller
$ juju status --format yaml
(...)
applications:
  u:
    charm: local:focal/ubuntu-0
    series: focal
    os: ubuntu
    charm-origin: local
    charm-name: ubuntu
    charm-rev: 0
    charm-channel: stable # oh, what is this?
    exposed: false
(...)

# ok, maybe it's just a cosmetic issue then
$ juju deploy ./bundle.yaml
ERROR cannot deploy bundle: application "u": upgrades not supported across channels (existing: "stable", resolved: ""); use --force to override

Nope, not cosmetic at all.

Revision history for this message
Domas Monkus (tasdomas) wrote :
Changed in juju:
assignee: nobody → Heather Lanigan (hmlanigan)
milestone: 2.9.30 → 2.9.31
Revision history for this message
Heather Lanigan (hmlanigan) wrote (last edit ):

This is related to the upgrade, though without it there are a different bugs it looks like.

2.9.30 in develop:

$ juju deploy ./bundle.yaml
Executing changes:
- upload charm /home/heather/notes/bug-1970608/ubuntu for series focal with architecture=amd64
- deploy application u on focal
- add unit u/0 to new machine 1
Deploy of bundle completed.
$ juju deploy ./bundle.yaml
Executing changes:
- set constraints for u to "" <-- why?
Deploy of bundle completed.
$ juju deploy ./bundle.yaml
No changes to apply. <-- replicated with juju 2.8.13
$ juju refresh u --path ./ubuntu
Added local charm "ubuntu", revision 1, to the model

Changed in juju:
status: Triaged → In Progress
Revision history for this message
Heather Lanigan (hmlanigan) wrote :
Changed in juju:
milestone: 2.9.31 → 2.9.30
tags: removed: bitesize
Ian Booth (wallyworld)
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
milestone: 2.9.30 → 2.9.31
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.