Closed esunar closed 2 years ago
(by jfguedez) The bundles exported with --include-charm-defaults have the config value that comes from the defaults, but don't provide the source of the information (the juju API does). This means we cannot tell them apart (default vs manual config). Instead of checking that the value is set (will always be set if the charm has a default), we would have to ensure that the value is not the default (e.g. an empty string for the nrpe charm configurations being checked in the rules - lacp_bonds, netlinks)
Instead will submit a MP with some cleanup and a new check 'neq', that flags any configuration that does match a certain value. This way the undesirable configurations that come from the charm defaults can be targeted.
Juju-lint should differentiate between config that comes from the user / default values.
Juju export-bundle has a useful new feature [0] starting with v2.9.2 that includes default values in the bundle (before only user-set values would be exported). However, this means that juju-lint would consider those values as "set", even though that is comes from a default value that could be non-ideal (like an empty string).
Need to handle this case, as otherwise rules like the following essentially are a noop for all charm configurations that have a default value (in this case an empty string for the nrpe charm):
config: nrpe: lacp_bonds: isset: true
[0] https://bugs.launchpad.net/juju/+bug/1903607
Imported from Launchpad using lp2gh.
date created: 2021-09-10T06:59:48Z
owner: jfguedez
assignee: jfguedez
the launchpad url