Failing upgrade-charm of a kubernetes charm due to series mismatch

Bug #1986382 reported by Adam Dyess
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Heather Lanigan

Bug Description

juju client version = 2.9.33-ubuntu-amd64
controller version = 2.9.33

A charm whose
metadata is https://paste.ubuntu.com/p/SHdmZbFZGk/
manifest is https://paste.ubuntu.com/p/xx695vGz8S/

fails to perform a local upgrade of a previously installed charm

~/git/charmed-kubernetes/metallb-operator/charms/metallb-speaker main*
❯ juju upgrade-charm metallb-speaker --path=./metallb-speaker_ubuntu-20.04-amd64_ubuntu-22.04-amd64.charm
ERROR series "focal" not supported by charm, supported series are: kubernetes

Build charm from here:
https://github.com/charmed-kubernetes/metallb-operator/tree/main/charms/metallb-speaker

Steps to reproduce:
* start with a kubernetes cluster (microk8s should work but disabling RBAC makes it easier)
* deploy from charmhub with `juju deploy metallb-speaker`
* wait for stable
* perform juju upgrade-charm metallb-speakder --path=<localtion of built charm>
* profit

Revision history for this message
Juan M. Tirado (tiradojm) wrote (last edit ):

Confirmed in 2.9.33 and 3.0-rc1. This could be related with https://bugs.launchpad.net/juju/+bug/1983581

Changed in juju:
assignee: nobody → Heather Lanigan (hmlanigan)
importance: Undecided → High
milestone: none → 2.9.34
status: New → Triaged
Revision history for this message
John A Meinel (jameinel) wrote :

So I think the issue here is that a v1 charm (using pod-spec-set) really does need `series: kubernetes` for it to operate correctly.
I wonder if we are taking the old style and then overriding its series once it is deployed back to say "focal" which would be true for a metadata v2 charm.

Changed in juju:
milestone: 2.9.34 → 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
Changed in juju:
milestone: 2.9.38 → 2.9.39
Changed in juju:
milestone: 2.9.39 → 2.9.40
Changed in juju:
milestone: 2.9.40 → 2.9.41
Changed in juju:
milestone: 2.9.41 → 2.9.42
Changed in juju:
milestone: 2.9.42 → 2.9.43
Revision history for this message
Maksim Beliaev (beliaev-maksim) wrote :

is there any workaround for the problem?

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

Attempting to reproduce with juju 2.9.42.

$ juju deploy metallb-speaker
Located charm "metallb-speaker" in charm-hub, revision 36
WARNING deploying podspec charm "metallb-speaker": podspec charms are deprecated. Support for them will be removed soon.
Deploying "metallb-speaker" from charm-hub charm "metallb-speaker", revision 36 in channel stable on ubuntu@22.04/stable

Looking for an OCI image to deploy the local charm with.

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

Looks like there is a problem in the refresh code. Deploying the same local charm that fails the refresh works

$ juju refresh metallb-speaker --path ./metallb-speaker_ubuntu-20.04-amd64-arm-arm64-ppc64le-s390x_ubuntu-22.04-amd64-arm-arm64-ppc64le-s390x.charm
ERROR series "jammy" not supported by charm, the charm supported series are: kubernetes

$ juju deploy ./metallb-speaker_ubuntu-20.04-amd64-arm-arm64-ppc64le-s390x_ubuntu-22.04-amd64-arm-arm64-ppc64le-s390x.charm --resource metallb-speaker-image=rocks.canonical.com/cdk/metallb/speaker:v0.12 addy
Located local charm "metallb-speaker", revision 1
WARNING deploying podspec charm "metallb-speaker": podspec charms are deprecated. Support for them will be removed soon.
Deploying "addy" from local charm "metallb-speaker", revision 1 on ubuntu@20.04/stable

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

Juju is also picking a different "series" for the same charm depending on whether it's deployed from a respository, or it's deployed as a local charm in this case.

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

I have a draft PR up for this bug: https://github.com/juju/juju/pull/15582

There may be some rough edges with this change I want to find.

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