wrong error message in juju deploy

Bug #2003119 reported by Jose C. Massón
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Medium
Unassigned

Bug Description

I have a k8s charm with the following metadata:

name: prometheus-pushgateway-k8s
assumes:
  - k8s-api

display-name: Prometheus Pushgateway Charmed Operator
summary: Prometheus Pushgateway for Kubernetes clusters.

description: |
  Prometheus Pushgateway is a service that allows ephemeral and batch jobs to expose their metrics to Prometheus.

  This charm deploys and operates Prometheus Pushgateway on Kubernetes clusters

containers:
  pushgateway:
    resource: prometheus-pushgateway-image
    mounts:
      - storage: prometheus-pushgateway-store
        location: /data

storage:
  pushgateway-store:
    type: filesystem
    description: Mount point in which Prometheus Pushgateway will store data

resources:
  pushgateway-image:
    type: oci-image
    description: OCI image for Prometheus Pushgateway
    # Included for simplicity in integration tests
    upstream-source: docker.io/prom/pushgateway:latest

provides:
  metrics-endpoint:
    interface: prometheus_scrape

After packing the charm with: charmcraft pack I obtain the file: prometheus-pushgateway-k8s_ubuntu-22.04-amd64.charm

When I try to deploy this charm, I get:

$ juju deploy ./prometheus-pushgateway-k8s_ubuntu-22.04-amd64.charm --resource pushgateway-image=prom/pushgateway:latest
ERROR charm or bundle at "./prometheus-pushgateway-k8s_ubuntu-22.04-amd64.charm" not found

This ERROR message is WRONG since the file exists in the directory:

$ ls -l prometheus-pushgateway-k8s_ubuntu-22.04-amd64.charm
-rw-r--r-- 1 ubuntu ubuntu 7886991 Jan 17 16:33 prometheus-pushgateway-k8s_ubuntu-22.04-amd64.charm

As far as I understand the problem is because in that metadata.yaml we have wrong references in "resource" and "storage".... with the following changes, we can deploy the charm without issues:

 containers:
   pushgateway:
- resource: prometheus-pushgateway-image
+ resource: pushgateway-image
     mounts:
- - storage: prometheus-pushgateway-store
+ - storage: pushgateway-store
         location: /data

The ERROR message needs to be fixed to explain what is actually happening.

Harry Pidcock (hpidcock)
Changed in juju:
importance: Undecided → Medium
milestone: none → 3.2-beta1
status: New → Triaged
Changed in juju:
milestone: 3.2-beta1 → 3.2-rc1
Revision history for this message
Harry Pidcock (hpidcock) wrote :

What version of juju are you using here? Is the current working directory under /tmp?

Changed in juju:
milestone: 3.2-rc1 → 3.2.0
Changed in juju:
milestone: 3.2.0 → 3.2.1
Changed in juju:
milestone: 3.2.1 → 3.2.2
Changed in juju:
milestone: 3.2.2 → 3.2.3
Changed in juju:
milestone: 3.2.3 → 3.2.4
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.