refresh: ERROR selecting releases: unknown series for version: "22.10"

Bug #1990182 reported by Heather Lanigan
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Heather Lanigan

Bug Description

Found in a production config - reproduced by:

Remove the line "22.10,Kinetic Kudu,kinetic,2022-04-21,2022-10-20,2023-0-20" in /usr/share/distro-info/ubuntu.csv file, and reboot.

$ juju bootstrap aws --bootstrap-series bionic

$ juju deploy cs:aodh-56 csaodh-bionic --series bionic
Located charm "aodh" in charm-store, revision 56
Deploying "csaodh-bionic" from charm-store charm "aodh", revision 56 in channel stable on bionic

$ juju refresh csaodh-bionic --switch ch:aodh --channel latest/stable --debug --verbose
17:41:31 INFO juju.cmd supercommand.go:56 running juju [2.9.34 20b8212e62c5d122e63141825a7733bf66c4c5a9 gc go1.18.5]
17:41:31 DEBUG juju.cmd supercommand.go:57 args: []string{"/snap/juju/20510/bin/juju", "refresh", "csaodh-bionic", "--switch", "ch:aodh", "--channel", "latest/stable", "--debug", "--verbose"}
17:41:31 INFO juju.juju api.go:78 connecting to API addresses: [172.31.89.149:17070 44.203.144.40:17070 252.89.149.1:17070]
17:41:31 DEBUG juju.api apiclient.go:1153 successfully dialed "wss://44.203.144.40:17070/model/40293cd5-1289-42f4-8c89-3044e212394f/api"
17:41:31 INFO juju.api apiclient.go:688 connection established to "wss://44.203.144.40:17070/model/40293cd5-1289-42f4-8c89-3044e212394f/api"
17:41:31 INFO juju.juju api.go:330 API endpoints changed from [252.89.149.1:17070 44.203.144.40:17070 172.31.89.149:17070] to [44.203.144.40:17070 172.31.89.149:17070 252.89.149.1:17070]
17:41:31 INFO juju.juju api.go:78 connecting to API addresses: [44.203.144.40:17070 172.31.89.149:17070 252.89.149.1:17070]
17:41:31 DEBUG juju.api apiclient.go:1153 successfully dialed "wss://44.203.144.40:17070/api"
17:41:31 INFO juju.api apiclient.go:688 connection established to "wss://44.203.144.40:17070/api"
17:41:31 INFO juju.juju api.go:330 API endpoints changed from [44.203.144.40:17070 252.89.149.1:17070 172.31.89.149:17070] to [44.203.144.40:17070 172.31.89.149:17070 252.89.149.1:17070]
17:41:31 INFO cmd refresher.go:265 Original channel "stable"
17:41:31 INFO cmd refresher.go:267 Requested channel "latest/stable"
17:41:32 DEBUG juju.api monitor.go:35 RPC connection died
ERROR selecting releases: unknown series for version: "22.10"
17:41:32 DEBUG cmd supercommand.go:537 error stack:
selecting releases: unknown series for version: "22.10"
github.com/juju/juju/cmd/juju/application/store.(*CharmAdaptor).ResolveCharm:100:
github.com/juju/juju/cmd/juju/application/refresher.baseRefresher.ResolveCharm:286:
github.com/juju/juju/cmd/juju/application/refresher.(*charmHubRefresher).Refresh:473:

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

Neither the controller nor the machine from which the client is run have the line "22.10,Kinetic Kudu,kinetic,2022-04-21,2022-10-20,2023-07-20" in their /usr/share/distro-info/ubuntu.csv file.

https://github.com/juju/juju/blob/b40da370bdee57e364442a463f33f0a6441bbdf8/core/series/supportedseries.go#L82-L85

Attempting to reproduce when the lines is available does not produce the issue:
$ juju deploy cs:aodh-56 csaodh-bionic --series bionic
Located charm "aodh" in charm-store, revision 56
Deploying "csaodh-bionic" from charm-store charm "aodh", revision 56 in channel stable on bionic
$ juju refresh csaodh-bionic --switch ch:aodh --channel latest/stable
Added charm-hub charm "aodh", revision 57 in channel latest/stable, to the model
Leaving endpoints in "alpha": admin, amqp, certificates, cluster, ha, identity-service, internal, mongodb, nrpe-external-master, public, shared-db

Adding the 22.10 line to /usr/share/distro-info/ubuntu.csv on the controller moves the error along, once jujud is restarted. However there is a different error:

$ juju refresh csaodh-bionic --switch ch:aodh --channel latest/stable
ERROR no releases found for channel "latest/stable"

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

To resolve the charm, juju is sending the wrong request:

{"context":[],"actions":[{"action":"install","instance-key":"8ada9807-291b-4804-8254-ee1dd4eb1fc1","name":"aodh","channel":"latest/stable","base":{"architecture":"amd64","name":"NA","channel":"18.04"}}],"fields":["bases","config-yaml","download","id","license","metadata-yaml","name","publisher","resources","revision","summary","type","version"]}

actions[0].base.name should be set to "ubuntu"

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

Work around, specific to this config, can be extrapolated to other configs:

1) Ensure that "22.10,Kinetic Kudu,kinetic,2022-04-21,2022-10-20,2023-07-20" is in the /usr/share/distro-info/ubuntu.csv file on (each) controller. Restart jujud on each controller.

2) In mongo db
db.applications.updateOne({"_id" : "<model-uuid>:<application-name>"},{$set: {"charm-origin.platform.os":"ubuntu"}})

$ juju refresh csaodh-bionic --switch ch:aodh --channel latest/stable
Added charm-hub charm "aodh", revision 57 in channel latest/stable, to the model
Leaving endpoints in "alpha": admin, amqp, certificates, cluster, ha, identity-service, internal, mongodb, nrpe-external-master, public, shared-db

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

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

This change addresses "ERROR no releases found for channel "latest/stable"" not the piece related to the ubuntu.csv file. That much be addressed on the controller

Changed in juju:
assignee: nobody → Heather Lanigan (hmlanigan)
Changed in juju:
status: Triaged → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
Revision history for this message
Przemyslaw Lal (przemeklal) wrote :

For those who are stuck on juju versions without this fix (I have two clouds 2.9.18, 2.9.14) and see the 'unknown series for version: "22.04"' message while trying to deploy apps, add relations, upgrade charms, etc. this can be a workaround:

1) Edit /usr/share/distro-info/ubuntu.csv and dupplicate the "22.04 ..." line but without "LTS" like this:
...
22.04 LTS,Jammy Jellyfish,jammy,2021-10-14,2022-04-21,2027-04-21,2027-04-21,2032-04-21
22.04,Jammy Jellyfish,jammy,2021-10-14,2022-04-21,2027-04-21,2027-04-21,2032-04-21
...

2) Restart jujud-machine-* on all controller instances.
3) Deploying new apps and adding relations should work now.

In my case the DB surgery was not needed as the required fields in db.applications documents were already set correctly. I guess these older versions have trouble recognizing "22.04 LTS" as "22.04". This seems to have been already resolved in more recent juju 2.9.x versions.

Revision history for this message
Eric Chen (eric-chen) wrote :

Another workaround solution.

1. login controller
2. apt-get update && apt-get install distro-info-data
3. Reboot controller or restart jujud-machine-* on all controller instances.

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.