Unable to deploy jammy K8s charms on non-Ubuntu

Bug #2001549 reported by Marc Oppenheimer
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Medium
Unassigned

Bug Description

There is a conversation on MM with more context/debugging than can reasonably explain, found here - https://chat.charmhub.io/charmhub/pl/p4r7jyr65p8x5jj9pwcaze6r1e

tl;dr:
When building and deploying K8s charm locally, when switching to ensure charm deployment on Ubuntu 22.04, it fails with error logs:

```
juju deploy ./*.charm -n 1 --resource kafka-image=ubuntu/kafka:latest --debug
15:39:31 INFO juju.cmd supercommand.go:56 running juju [2.9.37 51672c0e4243f0d0e73f13cf1bbf5c5a9a720632 gc go1.18.8]
15:39:31 DEBUG juju.cmd supercommand.go:57 args: []string{"/var/lib/snapd/snap/juju/21315/bin/juju", "deploy", "./kafka-k8s_ubuntu-22.04-amd64.charm", "-n", "1", "--resource", "kafka-image=ubuntu/kafka:latest", "--debug"}
15:39:31 INFO juju.juju api.go:86 connecting to API addresses: [10.152.183.195:17070]
15:39:31 DEBUG juju.api apiclient.go:626 starting proxier for connection
15:39:31 DEBUG juju.api apiclient.go:630 tunnel proxy in use at localhost on port 36407
15:39:31 DEBUG juju.api apiclient.go:1153 successfully dialed "wss://localhost:36407/api"
15:39:31 INFO jju.api apiclient.go:688 connection established to "wss://localhost:36407/api"
15:39:31 INFO juju.juju api.go:86 connecting to API addresses: [10.152.183.195:17070]
15:39:31 DEBUG juju.api apiclient.go:626 starting proxier for connection
15:39:31 DEBUG juju.api apiclient.go:630 tunnel proxy in use at localhost on port 45365
15:39:31 DEBUG juju.api apiclient.go:1153 successfully dialed "wss://localhost:45365/model/0eb93c05-4e48-45d8-888b-9df88e0f71b8/api"
15:39:31 INFO juju.api apiclient.go:688 connection established to "wss://localhost:45365/model/0eb93c05-4e48-45d8-888b-9df88e0f71b8/api"
15:39:31 DEBUG juju.core.charm computedseries.go:27 series "jammy, kubernetes" for charm "kafka-k8s" with format 2, Kubernetes true
15:39:31 DEBUG juju.core.charm computedseries.go:27 series "jammy, kubernetes" for charm "kafka-k8s" with format 2, Kubernetes true
15:39:31 DEBUG juju.api monitor.go:35 RPC connection died
15:39:31 DEBUG juju.api monitor.go:35 RPC connection died
ERROR kafka-k8s_ubuntu-22.04-amd64.charm is not available on the following series: jammy not supported
15:39:31 DEBUG cmd supercommand.go:537 error stack:
github.com/juju/juju/cmd/juju/application/deployer.charmValidationError:650: kafka-k8s_ubuntu-22.04-amd64.charm is not available on the following series: jammy not supported
github.com/juju/juju/cmd/juju/application/deployer.(*factory).maybeReadLocalCharm:403:
github.com/juju/juju/cmd/juju/application/deployer.(*factory).GetDeployer:71:
github.com/juju/juju/cmd/juju/application.(*DeployCommand).Run:909:
```

When deploying on an LXD container running MicroK8s with Ubuntu 22.04, it builds+deploys fine.
When switching `charmcraft.yaml` back to Ubuntu 20.04, it builds+deploys fine.

- Juju Client+Model version: `version 2.9.37-genericlinux-amd64`
- Cloud: Microk8s
- /proc/version: Linux version 6.1.1-zen1-1-zen (linux-zen@archlinux) (gcc (GCC) 12.2.0, GNU ld (GNU Binutils) 2.39.0) #1 ZEN SMP PREEMPT_DYNAMIC Wed, 21 Dec 2022 22:27:59 +0000
- Commit hash of code used: https://github.com/canonical/kafka-k8s-operator/tree/bf80ced83ecf4928d1296852d78de8ece9aef881
- metadata.yaml:
```yaml
maintainers:
  - Marc Oppenheimer <email address hidden>

containers:
  kafka:
    resource: kafka-image
    mounts:
      - storage: log-data
        location: /logs/kafka

resources:
  kafka-image:
    type: oci-image
    description: OCI Image for Apache Kafka
    upstream-source: ubuntu/kafka:latest

peers:
  cluster:
    interface: cluster
  restart:
    interface: rolling_op

requires:
  zookeeper:
    interface: zookeeper
  certificates:
    interface: tls-certificates
    limit: 1
    optional: true

provides:
  kafka-client:
    interface: kafka_client

storage:
  log-data:
    type: filesystem
    description: Directories where the log data is stored
    minimum-size: 10G

assumes:
  - k8s-api
```
- charmcraft.yaml:
```yaml
type: charm
parts:
  charm:
    charm-binary-python-packages:
      - setuptools
    build-packages:
      - libffi-dev
      - libssl-dev
      - rustc
      - cargo
bases:
  - build-on:
      - name: "ubuntu"
        channel: "22.04"
    run-on:
      - name: "ubuntu"
        channel: "22.04"
```
- To reproduce: `charmcraft clean && charmcraft pack && juju deploy ./*.charm -n 1 --resource kafka-image=ubuntu/kafka:latest`

Changed in juju:
milestone: none → 2.9-next
status: New → Triaged
importance: Undecided → Medium
Ian Booth (wallyworld)
Changed in juju:
milestone: 2.9-next → 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.