"juju config" with empty values erroneously resets since 2.9
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Simon Richardson | ||
NTP Charm |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Unable to disable the default list of pool servers.
Juju versions:
~$ juju --version
2.9.5-ubuntu-amd64
~$ juju controllers
Controller Model User Access Cloud/Region Models Nodes HA Version
sts-stsstack* queens-xenial admin superuser sts/stsstack 2 16 none 2.9.5
Steps to reproduce:
~$ juju deploy ntp
Located charm "ntp" in charm-hub, revision 47
Deploying "ntp" from charm-hub charm "ntp", revision 47 in channel stable
~$ for i in source peers pools;do echo $i;juju config ntp $i;done;
source
peers
pools
0.ubuntu.
~$ juju config ntp source="" peers="" pools=""
WARNING the configuration setting "source" already has the value ""
WARNING the configuration setting "peers" already has the value ""
~$ for i in source peers pools;do echo $i;juju config ntp $i;done;
source
peers
pools
0.ubuntu.
~$ juju config ntp pools=""
~$ juju config ntp pools
0.ubuntu.
Workaround:
~$ cat >/tmp/ntp.
cat >/tmp/ntp.
applications:
ntp:
charm: cs:ntp-47
channel: stable
options:
peers: "peers.ntp.internal 10.13.10.15"
source: "10.12.11.10 10.12.17.11 10.12.17.12"
pools: ""
EOF
~$ juju deploy /tmp/ntp.override
Located charm "ntp" in charm-store, revision 47
Executing changes:
- upload charm ntp from charm-store from channel stable with architecture=amd64
- upgrade ntp from charm-store using charm ntp from channel stable
- set application options for ntp
Deploy of bundle completed.
~$ for i in source peers pools;do echo $i;juju config ntp $i;done;
source
10.12.11.10 10.12.17.11 10.12.17.12
peers
peers.ntp.internal 10.13.10.15
pools
~$ juju config ntp pools
tags: | added: canonical-is canonical-is-upgrades |
summary: |
- juju doesn't accept a config change + "juju config" with empty values erroneously resets since 2.9 |
Changed in juju: | |
assignee: | nobody → Simon Richardson (simonrichardson) |
milestone: | none → 2.9.8 |
importance: | Undecided → High |
Changed in juju: | |
status: | Confirmed → Triaged |
status: | Triaged → In Progress |
Changed in juju: | |
status: | In Progress → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
Changed in juju: | |
milestone: | 2.9.8 → 2.9.7 |
Thanks for the bug report, but it feels to me that this is a juju controller problem, not a charm one. A charm cannot decide to accept a config change or not. As such, I'm marking this bug Invalid for the charm and adding Juju.