Different behavior on ServiceDeploy with Config/ConfigYAML

Bug #1513466 reported by Alberto Donato on 2015-11-05
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
juju
High
Unassigned

Bug Description

Juju behaves differently when a config option with an empty string as value is passed to the "ServiceDeploy" API call whether the configuration is passed via "Config" or "ConfigYAML" parameters.

With a charm with the following config:

options:
  some-option:
    type: string
    default: some value

When deploying the charm, I want to set some-option to empty string. If I do this setting the value in the "Config" parameter of the deploy call, juju interprets this as unsetting the key, and the charm gets the default value instead.
Passing the empty string value in "ConfigYAML" actually passes an empty string to the charm.

This can be tested with jujuclient for instance, which uses the Config parameter.

tags: added: kanban-cross-team
Curtis Hovey (sinzui) wrote :

This issue may relate to bug 1379930

tags: added: config
tags: removed: kanban-cross-team
Changed in juju-core:
status: New → Triaged
importance: Undecided → High
tags: added: landscape
tags: added: 2.0-count
Anastasia (anastasia-macmood) wrote :

There is a workaround but should be addressed with API changes that recently went in. Landscape is ok with it going to 2.1

tags: added: api papercut
Changed in juju-core:
milestone: none → 2.1.0
affects: juju-core → juju
Changed in juju:
milestone: 2.1.0 → none
milestone: none → 2.1.0
Anastasia (anastasia-macmood) wrote :

Removing 2.1 milestone as we will not be addressing this issue in 2.1.

Changed in juju:
importance: High → Medium
milestone: 2.1.0 → none
Jeff Pihach (hatch) wrote :

I just wanted to point out that this was brought up again recently from the GUI side: https://github.com/juju/juju-gui/issues/2486

Anastasia (anastasia-macmood) wrote :

@Jeff Pihach (hatch),
I'll raise the Importance since it has been happening frequent enough to cause pain.

Changed in juju:
importance: Medium → High
Jeff Pihach (hatch) wrote :

This issue has been reported in the GUI again, can this be prioritized?
https://github.com/juju/juju-gui/issues/3298

John A Meinel (jameinel) wrote :

So, the GUI should be calling ConfigYAML since somewhere around Juju 2.0 (possibly even in the 1.X series).

Are you wanting to break compatibility with the old API because you're not calling the new one?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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