Ambiguous error message when using local OCI image resource
Bug #1958253 reported by
Martin Kalcok
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-
Located local charm "kubernetes-
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.
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 |
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 |
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.
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.