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

Bug #1789415 reported by Edward Hope-Morley
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Anastasia
2.3
Fix Released
High
Anastasia
2.4
Fix Released
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

Tags: ui sts uosci
description: updated
description: updated
Felipe Reyes (freyes)
tags: added: sts ui
Changed in juju:
status: New → Triaged
importance: Undecided → Critical
milestone: none → 2.4.3
Ryan Beisner (1chb1n)
tags: added: uosci
Changed in juju:
assignee: nobody → Ian Booth (wallyworld)
Revision history for this message
Tim Penhey (thumper) wrote :

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

Changed in juju:
assignee: Ian Booth (wallyworld) → Anastasia (anastasia-macmood)
Revision history for this message
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
Revision history for this message
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
Revision history for this message
Anastasia (anastasia-macmood) wrote :
Revision history for this message
Anastasia (anastasia-macmood) wrote :
Revision history for this message
Anastasia (anastasia-macmood) wrote :

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

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.