Ambiguous error message when using local OCI image resource

Bug #1958253 reported by Martin Kalcok
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Jordan Barrett

Bug Description

I tried to use local oci image as a resource when deploying k8s operator charm and the error message I got was bit unhelpful.

```
juju deploy ./kubernetes-dashboard_ubuntu-20.04-amd64.charm --resource dashboard-image=./dashboard.tar --resource scraper-image=./scraper.tar

Located local charm "kubernetes-dashboard", revision 3
ERROR file neither valid json or yaml: yaml: control characters are not allowed
```

I know now that local oci images can't be used as per [1], but the error message could be more clear about this.

---
[1] https://bugs.launchpad.net/juju/+bug/1935707

Tags: bitesize
Revision history for this message
Ian Booth (wallyworld) wrote :

The error is because juju is expecting a yaml file or snippet with content like

registrypath: someimagepath@sha256:beef-deed
username: fred
password: secret

The yaml is used to override the default oci image details published with the charm.

ie the image details are specified using juju resources, but those resources are not the image blobs, but rather a yaml/json snippet with details of how to access the required image from a registry.

The error message could definitely be improved.

Changed in juju:
milestone: none → 2.9.24
importance: Undecided → High
status: New → Triaged
Changed in juju:
milestone: 2.9.24 → 2.9.25
Changed in juju:
milestone: 2.9.25 → 2.9.26
Changed in juju:
milestone: 2.9.26 → 2.9.27
Changed in juju:
milestone: 2.9.27 → 2.9.28
Changed in juju:
milestone: 2.9.28 → 2.9.29
Changed in juju:
milestone: 2.9.29 → 2.9.30
Ian Booth (wallyworld)
tags: added: bitesize
Changed in juju:
milestone: 2.9.30 → 2.9.31
assignee: nobody → Jordan Barrett (barrettj12)
Changed in juju:
status: Triaged → In Progress
Revision history for this message
Jordan Barrett (barrettj12) wrote :
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
milestone: 2.9.31 → 2.9.30
milestone: 2.9.30 → 2.9.31
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.