Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Config options without defaults never get removed from config.changed.x #79
Comments
cmars
commented
Oct 18, 2016
|
I believe this might be the root cause: https://bugs.launchpad.net/charm-helpers/+bug/1630706 |
|
I'm not sure. Looking at https://github.com/juju-solutions/layer-basic/blob/master/lib/charms/layer/basic.py#L155 that would remove the config.changed.x state. In my case the config.changed.x state is active even though I've never changed the option. |
|
For anyone that stumble upon this or is involved - I've added a fix proposal here: https://code.launchpad.net/~simonklb/charm-helpers/include-empty-config-options |
added a commit
to chuckbutler/layer-docker
that referenced
this issue
Oct 24, 2016
chuckbutler
referenced this issue
in juju-solutions/layer-docker
Oct 24, 2016
Merged
Work around the 'config.changed' states firing always #95
|
Fix is released in charmhelpers 0.10.0 |
simonklb
closed this
Nov 4, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
simonklb commentedOct 18, 2016
I think the problem originates from init_config_states() grabbing all of the config options from the yaml file while clear_config_states() only looks at hookenv.config(). Since hookenv.config() does not include the --all flag when executing the config-get command the options without a default are not included. That, and also due to the fact that config options are always changed when they have no previous value.