bundle parsing rejects strings containing hex values
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Tim Penhey |
Bug Description
My charm declares an option as:
apt-key-id:
type: string
default: "0x2DDF60C43B8B
description: A PGP key id. This is used with private PPA and the source
option to import a PGP public key for verifying repository signatures.
Setting this when source is set to github branch name instead of ppa
leads to undefined behavior.
In my bundle I need to set a value that is not the default so I added:
options:
apt-key-id: '0x88A35D43301B
Using 'juju deploy bundle.yaml' I get:
ERROR cannot deploy bundle: cannot deploy application "blues-identity": option "apt-key-id" expected string, got 0x88a35d43301b4c4d
I tried using single-quotes and double-quotes around the value but got the same error.
As a work-around I tried the following and the value was accepted:
apt-key-id: '0xo88A35D43301
Apparently the YAML parser is interpreting that string and not simply passing it through. The first form is the most obvious, worked in juju 1, and should be acceptable. It *is* a string.
Note that the default value in config.yaml has the standard formatting and is acceptable. So it is the bundle parser that appears to be at fault.
description: | updated |
Changed in juju-core: | |
status: | New → Triaged |
importance: | Undecided → High |
tags: | added: deploy usability |
Changed in juju-core: | |
milestone: | none → 2.0-rc1 |
Changed in juju-core: | |
milestone: | 2.0-rc1 → 2.0.0 |
affects: | juju-core → juju |
Changed in juju: | |
milestone: | 2.0.0 → none |
milestone: | none → 2.0.0 |
Changed in juju: | |
assignee: | nobody → Richard Harding (rharding) |
Changed in juju: | |
milestone: | 2.0.0 → 2.1.0 |
Changed in juju: | |
assignee: | Richard Harding (rharding) → nobody |
Changed in juju: | |
status: | Triaged → In Progress |
assignee: | nobody → Tim Penhey (thumper) |
Changed in juju: | |
status: | In Progress → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
This is related to Juju dependency - go-yaml. We need to check if the newer yaml parser treat hex values better once dependency revision is updated to a newer one as per bug # 1543660.