Can't switch from edge channel to stable channel

Bug #1988587 reported by Tom Haddon
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Heather Lanigan
3.0
Fix Released
High
Heather Lanigan
3.1
Fix Released
High
Heather Lanigan

Bug Description

I've got a particular charm where edge and stable are on the same revision, and I have a model deployed with one channel (edge) and I'd like to switch to the other (stable).

I've tried various combinations to no avail:

prod-events-k8s@is-charms-bastion-ps5:~$ juju refresh indico --channel=stable --switch
ERROR option needs an argument: --switch
prod-events-k8s@is-charms-bastion-ps5:~$ juju refresh --switch indico --channel=stable
ERROR no application specified
prod-events-k8s@is-charms-bastion-ps5:~$ juju refresh --switch --channel=stable indico
ERROR cannot parse name and/or revision in URL "ch:--channel=stable": name "--channel=stable" not valid
prod-events-k8s@is-charms-bastion-ps5:~$ juju refresh --switch --channel=latest/stable indico
ERROR cannot parse architecture in URL "ch:--channel=latest/stable": architecture name "--channel=latest" not valid

I also tried this

prod-events-k8s@is-charms-bastion-ps5:~$ juju refresh --channel=stable indico
charm "indico": already up-to-date

But after running it `juju status` is still reporting that charm as being on the edge channel. I then tried this as well:

mthaddon@tenaya:~$ juju refresh indico --switch indico --channel=stable
charm "indico": already up-to-date

But again, after running it `juju status` is still reporting that charm as being on the edge channel.

I'm running 2.9.34 where you see the `mthaddon@tenaya` prompt, and 2.9.32 where you see `prod-events-k8s@is-charms-bastion-ps5`.

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

$ juju info indico
name: indico
charm-id: 18zuSzvljyQo6mJMWjcjN2nMm1TiWKCF
summary: Indico web application.
publisher: Arturo Enrique Seijas Fernández
subordinate: false
store-url: https://charmhub.io/indico
description: |
  Indico is a tool that allows you to manage complex conferences, workshops and meetings.
  https://getindico.io/
relations:
  provides:
    metrics-endpoint: prometheus_scrape
  requires:
    db: pgsql
    ingress: ingress
    redis: redis
channels: |
  latest/stable: 63 2022-09-02 (63) 2MB
  latest/candidate: ↑
  latest/beta: ↑
  latest/edge: 63 2022-09-02 (63) 2MB

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

`juju refresh indico --switch indico --channel=stable` is the only iteration of the juju refresh command I'd expect to work. Though the error messages with the other attempts need to be reworded for clarity

Changed in juju:
status: New → Triaged
importance: Undecided → High
milestone: none → 2.9.35
Changed in juju:
milestone: 2.9.35 → 2.9.36
Changed in juju:
milestone: 2.9.36 → 2.9.37
Changed in juju:
milestone: 2.9.37 → 2.9.38
Revision history for this message
Tom Haddon (mthaddon) wrote :

I've also tried with the command suggested above (for another charm) and that doesn't work:

```
mthaddon@finistere:~$ juju refresh nginx-ingress-integrator --switch nginx-ingress-integrator --channel=latest/edge
charm "nginx-ingress-integrator": already up-to-date
mthaddon@finistere:~$ juju status
Model Controller Cloud/Region Version SLA Timestamp
ingress-test microk8s-localhost microk8s/localhost 2.9.35 unsupported 15:33:13+01:00

App Version Status Scale Charm Channel Rev Address Exposed Message
hello-kubecon waiting 1 hello-kubecon stable 14 10.152.183.242 no installing agent
nginx-ingress-integrator active 1 nginx-ingress-integrator stable 40 10.152.183.125 no Ingress with service IP(s): 10.152.183.42

Unit Workload Agent Address Ports Message
hello-kubecon/0* waiting idle 10.1.129.141 waiting for Pebble in workload container
nginx-ingress-integrator/0* active idle 10.1.129.139 Ingress with service IP(s): 10.152.183.42

mthaddon@finistere:~$ juju info nginx-ingress-integrator
name: nginx-ingress-integrator
publisher: Tom Haddon
summary: |
  An operator to configure a kubernetes ingress.
description: |
  An operator to configure a kubernetes ingress.
store-url: https://charmhub.io/nginx-ingress-integrator
charm-id: aQVXlrbsLWBTiAiQF0lilvUFolDOpKaE
supports: focal
subordinate: false
relations:
  provides:
    ingress: ingress
  requires: {}
channels: |
  latest/stable: 40 2022-11-10 (40) 8MB
  latest/candidate: ↑
  latest/beta: ↑
  latest/edge: 42 2022-11-14 (42) 12MB
```
I would expect it would switch me to the edge channel, which has revision 42.

Revision history for this message
Tom Haddon (mthaddon) wrote :

Well it turns out charmhub may be returning the wrong revision. Looking at https://charmhub.io/nginx-ingress-integrator?channel=edge currently I see revision 42, published today, but when I do a `juju deploy` locally of the charm in the edge channel I get revision 40.

Revision history for this message
John A Meinel (jameinel) wrote :

I believe the issue is that the charm might not be updated across all series (bases) for the edge channel:
$ juju info nginx-ingress-integrator
name: nginx-ingress-integrator
publisher: Tom Haddon
summary: |
  An operator to configure a kubernetes ingress.
description: |
  An operator to configure a kubernetes ingress.
store-url: https://charmhub.io/nginx-ingress-integrator
charm-id: aQVXlrbsLWBTiAiQF0lilvUFolDOpKaE
supports: focal
subordinate: false
relations:
  provides:
    ingress: ingress
  requires: {}
channels: |
  latest/stable: 40 2022-11-10 (40) 8MB amd64 focal
  latest/candidate: ↑
  latest/beta: ↑
  latest/edge: 42 2022-11-14 (42) 12MB amd64 jammy
jameinel@focal:~/dev/charms/postgresql-operator/tests (main)
$ juju info nginx-ingress-integrator --series focal
name: nginx-ingress-integrator
publisher: Tom Haddon
summary: |
  An operator to configure a kubernetes ingress.
description: |
  An operator to configure a kubernetes ingress.
store-url: https://charmhub.io/nginx-ingress-integrator
charm-id: aQVXlrbsLWBTiAiQF0lilvUFolDOpKaE
supports: focal
subordinate: false
relations:
  provides:
    ingress: ingress
  requires: {}
channels: |
  latest/stable: 40 2022-11-10 (40) 8MB amd64
  latest/candidate: ↑
  latest/beta: ↑
  latest/edge: 40 2022-11-10 (40) 8MB amd64

Changed in juju:
milestone: 2.9.38 → 2.9.39
Revision history for this message
Juan M. Tirado (tiradojm) wrote :

Could we confirm if this is still not working?

Changed in juju:
milestone: 2.9.39 → 2.9.40
Changed in juju:
assignee: nobody → Heather Lanigan (hmlanigan)
Changed in juju:
status: Triaged → In Progress
Revision history for this message
Heather Lanigan (hmlanigan) wrote :

https://github.com/juju/juju/pull/15141

New behavior and output:

$ juju deploy ubuntu
$ juju refresh ubuntu --channel edge
charm "ubuntu": already up-to-date. Note: all future refreshes will now use channel "edge"

Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
milestone: 2.9.40 → 2.9.42
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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.