bundle parsing rejects strings containing hex values

Bug #1595600 reported by Brad Crittenden
6
This bug affects 1 person
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: "0x2DDF60C43B8BD61C"
    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: '0x88A35D43301B4C4D'

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: '0xo88A35D43301B4C4D'

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.

Brad Crittenden (bac)
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
Revision history for this message
Anastasia (anastasia-macmood) wrote :

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.

tags: added: yaml
Tim Penhey (thumper)
Changed in juju:
status: Triaged → In Progress
assignee: nobody → Tim Penhey (thumper)
Revision history for this message
Anastasia (anastasia-macmood) wrote :
Tim Penhey (thumper)
Changed in juju:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
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.