juju unable to find revision of charm in Store for bundle overlay

Bug #1938155 reported by Heitor
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Undecided
Unassigned

Bug Description

So far I've been unable to deploy prometheus-node-exporter as a bundle overlay.

The following bundle works and I can deploy it locally without issues:

```
$ cat slurm-addons/monitoring.yaml
applications:
  prometheus2:
    charm: prometheus2
    num_units: 1
  node-exporter:
    charm: prometheus-node-exporter
relations:
  - - prometheus2:scrape
    - node-exporter:prometheus
```

But when I use it as an overlay for another bundle, it fails:

```
$ juju deploy ./slurm-core/bundle.yaml --overlay ./slurm-core/clouds/lxd.yaml --overlay ./slurm-core/series/centos7.yaml --overlay ./slurm-core/charms/local-development.yaml --overlay ./slurm-addons/monitoring.yaml --debug

# removing lots of lines about the current model

09:41:05 INFO cmd bundlehandler.go:355 Located charm "prometheus-node-exporter" in charm-hub, channel stable
09:41:05 DEBUG juju.cmd.juju.application.deployer bundlehandler.go:309 slurmctld exists in model uses a local charm, replacing with "local:centos7/slurmctld-0"
09:41:05 DEBUG juju.cmd.juju.application.deployer bundlehandler.go:309 slurmd exists in model uses a local charm, replacing with "local:centos7/slurmd-0"
09:41:05 DEBUG juju.cmd.juju.application.deployer bundlehandler.go:309 slurmdbd exists in model uses a local charm, replacing with "local:centos7/slurmdbd-0"
09:41:05 DEBUG juju.cmd.juju.application.deployer bundlehandler.go:309 slurmrestd exists in model uses a local charm, replacing with "local:centos7/slurmrestd-0"
Executing changes:
- upload charm prometheus-node-exporter from charm-hub for series centos7 with architecture=amd64
09:41:11 DEBUG juju.api monitor.go:35 RPC connection died
ERROR cannot deploy bundle: cannot add charm "prometheus-node-exporter": revision-not-found: No revision was found in the Store.
09:41:11 DEBUG cmd supercommand.go:537 error stack:
revision-not-found: No revision was found in the Store.
/build/snapcraft-juju-35d6cf/parts/juju/src/rpc/client.go:178:
/build/snapcraft-juju-35d6cf/parts/juju/src/api/apiclient.go:1248:
/build/snapcraft-juju-35d6cf/parts/juju/src/api/charms/client.go:157:
/build/snapcraft-juju-35d6cf/parts/juju/src/cmd/juju/application/store/store.go:44:
/build/snapcraft-juju-35d6cf/parts/juju/src/cmd/juju/application/deployer/bundlehandler.go:667: cannot add charm "prometheus-node-exporter"
/build/snapcraft-juju-35d6cf/parts/juju/src/cmd/juju/application/deployer/bundlehandler.go:539:
/build/snapcraft-juju-35d6cf/parts/juju/src/cmd/juju/application/deployer/bundlehandler.go:101:
/build/snapcraft-juju-35d6cf/parts/juju/src/cmd/juju/application/deployer/bundle.go:172: cannot deploy bundle
```

Revision history for this message
james beedy (jamesbeedy) wrote :

I would imagine this is happening due to issues with charmhub support for centos7. The promtheus-node-exporter supports centos7 but charmhub doesn't know what to do with it.

Revision history for this message
Heitor (heitorpbittencourt) wrote :

If I modify the YAML file to specify focal as the series, the overlay works:

```
applications:
  prometheus2:
    charm: prometheus2
    num_units: 1
  node-exporter:
    charm: prometheus-node-exporter
    series: focal
relations:
  - - prometheus2:scrape
    - node-exporter:prometheus
```

But does not work with CentOS7.

Revision history for this message
Heitor (heitorpbittencourt) wrote :

Prometheus-node-exporter charm does not have a `series` entry in the metadata.yaml

Maybe that's why is causing the issue? Charmhub interprets that as focal-only charm?

https://github.com/omnivector-solutions/charm-prometheus-node-exporter

Revision history for this message
Simon Richardson (simonrichardson) wrote :

So currently charmhub only supports ubuntu series, I think the error message could be improved to help with the error, but it's hard to understand what you want when the prometheus-node-exporter charm doesn't have a default series.

Changed in juju:
status: New → Triaged
Revision history for this message
Heitor (heitorpbittencourt) wrote :

> So currently charmhub only supports ubuntu series
Is there a roadmap for charmhub to support other OSes?

> but it's hard to understand what you want when the prometheus-node-exporter charm doesn't have a default series.

according to [0], the `series` entry in the metadata is going to be deprecated. I though Charmhub already had support for the new `charmcraft.yaml` `bases` entry, but apparently it doesn't? Charmcraft requires us to specify the `bases`, having to also add `series` sounds like duplicating information, or I am missing something?

Should we always add the `series` entries then?

[0] https://discourse.charmhub.io/t/charm-metadata-v2/3674

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.