cannot pin charm revision without mention series in bundle

Bug #1982921 reported by Aymen Frikha
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju
Fix Released
High
Heather Lanigan

Bug Description

Hello,

I'm trying to pin charm revision for a kubeflow bundle but I was not able to do so. I need to mention series:kubernetes each time I want to put the revision number.

Here is the bundle I'm working on: https://pastebin.canonical.com/p/cMxdhs5GbJ/

The problem is sometimes, when we mention series:kubernetes, the charm has different behaviour (it seems that it forced juju to interpret the metadata.yaml as an older version. )

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

So you certainly shouldn't have to put series into the bundle (the interpretation of metadata.yaml should be done based on the charm that we are deploying, not based on the bundle definition.)
The one caveat is that what charm we lookup from charmhub might depend on series (because of the different possibilities per architecture/series, etc)

Revision history for this message
Aymen Frikha (aym-frikha) wrote :

~fe-high subscribed

Revision history for this message
Aymen Frikha (aym-frikha) wrote :

Hello team,

This is a small bundle where I tried to pin revision for istio operator and training operator : https://pastebin.canonical.com/p/XpDcwGRsT6/

I got this error when trying to deploy: ERROR cannot deploy bundle: cannot add charm "istio-gateway": series required for charm-hub charms (bad request)

When I add series:kubernetes ERROR cannot deploy bundle: series "kubernetes" not supported by charm, supported series are: focal

Revision history for this message
John A Meinel (jameinel) wrote :
Download full text (6.6 KiB)

So looking at what you've posted:
applications:
  istio-ingressgateway:
    charm: istio-gateway
    channel: latest/edge
    scale: 1
    trust: true
    _github_repo_name: istio-operators
    options:
      kind: ingress
    revision: 74

vs
$ juju info istio-ingressgateway
...
  1.5/edge: 24 2022-01-20 (24) 9MB

So there is no revision 74 to deploy from latest/edge. Notably, there is no 'latest/edge' channel at all, just a 1.5/edge.

Which also matches charmhub:
https://charmhub.io/istio-ingressgateway

Now there might have been a revision 74 from Charm Store (though my understanding is that charmhub revisions are always >= their charm store counterparts.)

istio-pilot looks plausible:
  istio-pilot:
    charm: istio-pilot
    channel: latest/edge
    trust: true
    scale: 1
    _github_repo_name: istio-operators
    options:
      default-gateway: kubeflow-gateway
    revision: 95

vs
$ juju info istio-pilot
...
channels: |
  latest/stable: 34 2021-12-03 (34) 44MB
  latest/candidate: 69 2022-04-06 (69) 33MB
  latest/beta: 34 2021-12-03 (34) 44MB
  latest/edge: 101 2022-07-28 (101) 33MB

So it does seem plausible that the revision you're asking for exists (though if it was never actually `charmcraft released` then it is a hidden revision that Juju cannot ask for.

training-operator can also likely have the request
  training-operator:
    charm: training-operator
    channel: 1.3/edge
    scale: 1
    trust: true
    _github_repo_name: training-operator
    revision: 12
    #series: kubernetes
vs
$ juju info training-operator
...
channels: |
  latest/stable: 6 2022-01-20 (6) 7MB
  latest/candidate: 8 2022-04-05 (8) 9MB
  latest/beta: ↑
  latest/edge: 16 2022-07-12 (16) 9MB
  1.3/stable: 12 2022-06-30 (12) 9MB
  1.3/candidate: ↑
  1.3/beta: ↑
  1.3/edge: 12 2022-06-29 (12) 9MB

Directly deploying them at those revisions seems to work (except for instio-ingressgateway that doesn't have that revision, but maybe that was a typo and you meant 24 vs 74 and 1.5/edge vs latest/edge):
$ juju deploy training-operator --channel 1.3/edge --revision 12
Located charm "training-operator" in charm-hub, revision 12
Deploying "training-operator" from charm-hub charm "training-operator", revision 12 in channel 1.3/edge on focal
$ juju deploy istio-pilot --channel latest/edge --revision 95
Located charm "istio-pilot" in charm-hub, revision 95
Deploying "istio-pilot" from charm-hub charm "istio-pilot", revision 95 in channel edge on focal
$ juju deploy istio-pilot --channel latest/edge --revision 95
Located charm "istio-pilot" in charm-hub, revision 95
Deploying "istio-pilot" from charm-hub charm "istio-pilot", revision 95 in channel edge on focal
$ juju deploy istio-ingressgateway --channel 1.5/edge --revision 24
Located charm "istio-ingressgateway" in charm-hub, revision 24
Deploying "istio-ingressgateway" from charm-hub charm "istio-ingressgateway", revision 24 in channel 1.5/edge on focal

$ juju status
Model Controller Cloud/Region Version SLA Timestamp
test mk8s microk8s/localhost 2.9.33 unsupported 13:14:28-04:00

A...

Read more...

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

So I found a few issues but found a syntax for the bundle that did appear to do what you want, and supported deploying exact revisions from the bundle.
There are some things Juju could probably do (the charms are published to 'base: focal' but you can't use 'series: focal' if there is a 'bundle: kubernetes' header)

Changed in juju:
status: New → Incomplete
Revision history for this message
John A Meinel (jameinel) wrote :

I was wrong, the deploy I ran got *much* farther, but fails at the tail:
- add relation istio-ingressgateway:istio-pilot - istio-pilot:istio-pilot
- add unit istio-ingressgateway/0 to new machine 0
ERROR cannot deploy bundle: cannot add unit for application "istio-ingressgateway": adding units to a container-based model not supported (not supported)

Changed in juju:
assignee: nobody → Heather Lanigan (hmlanigan)
importance: Undecided → High
milestone: none → 2.9.34
status: Incomplete → Triaged
Changed in juju:
status: Triaged → Confirmed
Revision history for this message
Heather Lanigan (hmlanigan) wrote :
Changed in juju:
status: Confirmed → In Progress
milestone: 2.9.34 → 2.9.33
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