Different behavior on ServiceDeploy with Config/ConfigYAML

Bug #1513466 reported by Alberto Donato
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
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
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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

Revision history for this message
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
Revision history for this message
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

Revision history for this message
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?

Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.

Changed in juju:
importance: High → Low
tags: added: expirebugs-bot
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.