leader-set fails to clear value if the key has periods in it

Bug #1825424 reported by George Kraft
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
High
Unassigned

Bug Description

I ran into this issue during charm development where leader-set did not behave as expected. If I try to clear leadership data, and the key has periods in it, then leader-set silently fails to update the value:

$ juju run --unit easyrsa/0 -- leader-set my.test=value
$ juju run --unit easyrsa/0 -- leader-get my.test
value
$ juju run --unit easyrsa/0 -- leader-set my.test=
$ juju run --unit easyrsa/0 -- leader-get my.test
value

If I do the same thing using a key with dashes instead of periods, it works:

$ juju run --unit easyrsa/0 -- leader-set my-test=value
$ juju run --unit easyrsa/0 -- leader-get my-test
value
$ juju run --unit easyrsa/0 -- leader-set my-test=
$ juju run --unit easyrsa/0 -- leader-get my-test

juju version 2.5.4-xenial-amd64

Tags: leader-set
John A Meinel (jameinel)
Changed in juju:
status: New → Triaged
importance: Undecided → High
tags: added: leader-set
Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

Doesn't work on 2.8.10 either.

Revision history for this message
Marcelo Henrique Neppel (neppel) wrote :

The same happens on Juju 3.1.6:

➜ ~ juju exec --unit easyrsa/0 -- leader-set my.test=value
➜ ~ juju exec --unit easyrsa/0 -- leader-get my.test
value
➜ ~ juju exec --unit easyrsa/0 -- leader-set my.test=
➜ ~ juju exec --unit easyrsa/0 -- leader-get my.test
value

➜ ~ juju exec --unit easyrsa/0 -- leader-set my-test=value
➜ ~ juju exec --unit easyrsa/0 -- leader-get my-test
value
➜ ~ juju exec --unit easyrsa/0 -- leader-set my-test=
➜ ~ juju exec --unit easyrsa/0 -- leader-get my-test

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.