upgrade-charm --switch plus --channel can lead to wrong charm series

Bug #1993758 reported by Haw Loeung
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
High
Unassigned

Bug Description

Hi,

Per Mattermost, we recently published new per-series charms to charmhub under a shorter name. On switching with `juju upgrade-charm --switch new-charm-name --channel edge`, the wrong series is selected. A following upgrade-charm does the right thing.

See https://pastebin.canonical.com/p/585Jnd7bPx/ & Mattermost thread 7sordpoipp8etmxwir9338agge.

Ian Booth (wallyworld)
Changed in juju:
milestone: none → 3.0.1
importance: Undecided → High
status: New → Triaged
Revision history for this message
Heather Lanigan (hmlanigan) wrote :

Today the metadata.yaml and the manifest.yaml for cs:~ubuntu-repository-cache-charmers/ubuntu-repository-cache-59 do not match. Juju is using the manifest, so I'm having to force deploy the charm.

What version of juju is the now running in the model? And what version of juju was running in the model when cs:~ubuntu-repository-cache-charmers/ubuntu-repository-cache-59 was deployed?

What version of cs:~ubuntu-repository-cache-charmers/ubuntu-repository-cache was originaly deployed? In this situation history from the beginning could impact the outcome unfortunately.

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

This maybe fixed in 2.9.35 or the tip of 2.9 which should be released as 2.9.26 shortly.
https://bugs.launchpad.net/juju/+bug/1990182

$ juju deploy cs:~ubuntu-repository-cache-charmers/ubuntu-repository-cache-59 --series xenial
ERROR series "xenial" not supported by charm, supported series are: focal, jammy. Use --force to deploy the charm anyway.

$ juju deploy cs:~ubuntu-repository-cache-charmers/ubuntu-repository-cache-59 --series xenial --force
Located charm "ubuntu-repository-cache" in charm-store, revision 59
Deploying "ubuntu-repository-cache" from charm-store charm "ubuntu-repository-cache", revision 59 in channel stable on xenial

$ juju refresh ubuntu-repository-cache --switch ubuntu-repository-cache --channel edge
Added charm-hub charm "ubuntu-repository-cache", revision 74 in channel edge, to the model
Leaving endpoints in "alpha": cluster, local-monitors, nrpe-external-master, website

Revision history for this message
Haw Loeung (hloeung) wrote :

I tried with upgrading from 2.9.32 to 2.9.35 but now I'm getting this:

| $ juju refresh ubuntu-repository-cache --debug
| 23:05:07 INFO juju.cmd supercommand.go:56 running juju [2.9.35 da3416008ea4ce7851a4c967ae191a0044917024 gc go1.18.5]
| 23:05:07 DEBUG juju.cmd supercommand.go:57 args: []string{"juju", "refresh", "ubuntu-repository-cache", "--debug"}
| 23:05:07 INFO juju.juju api.go:86 connecting to API addresses: [52.78.197.164:17070 172.31.7.252:17070]
| 23:05:07 DEBUG juju.api apiclient.go:1153 successfully dialed "wss://52.78.197.164:17070/model/55e52789-14c5-4494-880e-47fdd8fca05b/api"
| 23:05:07 INFO juju.api apiclient.go:688 connection established to "wss://52.78.197.164:17070/model/55e52789-14c5-4494-880e-47fdd8fca05b/api"
| 23:05:08 DEBUG juju.api monitor.go:35 RPC connection died
| ERROR missing base name or channel not valid
| 23:05:08 DEBUG cmd supercommand.go:537 error stack:
| missing base name or channel not valid
| github.com/juju/juju/api/client/application.(*Client).GetCharmURLOrigin:266:
| github.com/juju/juju/cmd/juju/application.(*refreshCommand).Run:339:

Even various things such as --force-series, --channel stable, --switch ubuntu-repository-cache.

Revision history for this message
Haw Loeung (hloeung) wrote :

Confirmed looks good with Juju 2.9.36:

| $ juju upgrade-charm ubuntu-repository-cache --switch ubuntu-repository-cache --channel edge
| Added charm-hub charm "ubuntu-repository-cache", revision 74 in channel edge, to the model
| Leaving endpoints in "alpha": cluster, local-monitors, nrpe-external-master, website

| $ juju upgrade-charm ubuntu-repository-cache --switch ubuntu-repository-cache --channel edge
| charm "ubuntu-repository-cache": already up-to-date

Ian Booth (wallyworld)
Changed in juju:
milestone: 3.0.1 → none
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.