juju config returns <nil> for empty config (2.4.2)

Bug #1789415 reported by Edward Hope-Morley on 2018-08-28
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju
High
Anastasia
2.3
High
Anastasia
2.4
Critical
Anastasia

Bug Description

Up until 2.4.1 juju would return an empty string "" for configs that were unset but with 2.4.2 I now get "<nil>"

ubuntu@hopem-bastion:~⟫ juju --version
2.4.1-xenial-amd64
ubuntu@hopem-bastion:~⟫ juju config keystone vip
ubuntu@hopem-bastion:~⟫ sudo apt upgrade juju -y &>/dev/null
ubuntu@hopem-bastion:~⟫ juju --version
2.4.2-xenial-amd64
ubuntu@hopem-bastion:~⟫ juju config keystone vip
<nil>

I assume this is unintentional

description: updated
description: updated
Felipe Reyes (freyes) on 2018-08-28
tags: added: sts ui
Changed in juju:
status: New → Triaged
importance: Undecided → Critical
milestone: none → 2.4.3
Ryan Beisner (1chb1n) on 2018-08-28
tags: added: uosci
Changed in juju:
assignee: nobody → Ian Booth (wallyworld)
Tim Penhey (thumper) wrote :

Yes, it is unintentional. We'll get right on it.

Changed in juju:
assignee: Ian Booth (wallyworld) → Anastasia (anastasia-macmood)
Tim Penhey (thumper) wrote :

Here is the excerpt from the keystone config.yaml.

  vip:
    type: string
    default:
    description: some description

We should add this to one of the test charms, and have an explicit test for the value output.

Changed in juju:
status: Triaged → In Progress
Anastasia (anastasia-macmood) wrote :

Of course, because prior to 2.4.2 we have always formatted 1 value (output of 'juju config' above) using yaml. Yaml marshaller would have marshalled 'nil' string as an empty string.

I am guessing that string setting is the only one that can have a 'nil' and an '' (empty string) default. All other types will have an actual value for an empty default - boolean will be false, etc.

Changed in juju:
importance: Critical → High
milestone: 2.4.3 → 2.5-beta1
Anastasia (anastasia-macmood) wrote :

PR against develop (2.5): https://github.com/juju/juju/pull/9127

Anastasia (anastasia-macmood) wrote :

As an observation, there is another slight that has been added recently - we have started appending newline characters to a single setting output. We have worked on reverting this back until Juju 3.x.

PR against 2.3 - https://github.com/juju/juju/pull/9129 (will be forward-ported)

Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers