using config-flags, overwriting an existing config option in the [Default] section results in duplicate entries
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat Charm |
Opinion
|
Undecided
|
Unassigned |
Bug Description
In my scenario i'm making some changes to heat to allow for the IBM UrbanCode Deploy extension.
This requires that convergence_engine be set to false, and to also add a new plug directory.
My [Default] section of /etc/heat/heat.conf before setting config=flags.
---
[DEFAULT]
use_syslog = False
debug = False
verbose = False
log_dir = /var/log/heat
instance_user =
instance_driver = heat.engine.nova
plugin_dirs = /usr/lib64/
environment_dir = /etc/heat/
host = heat
auth_encryption_key = xxx
deferred_
stack_domain_admin = heat_domain_admin
stack_domain_
stack_user_
num_engine_workers = 14
---
Now, when i run 'juju config heat config-
This is what my /etc/heat/heat.conf looks like in the [Default] Section
---
[DEFAULT]
use_syslog = False
debug = False
verbose = False
log_dir = /var/log/heat
instance_user =
instance_driver = heat.engine.nova
plugin_dirs = /usr/lib64/
environment_dir = /etc/heat/
host = heat
auth_encryption_key = xxx
deferred_
stack_domain_admin = heat_domain_admin
stack_domain_
stack_user_
num_engine_workers = 14
convergence_engine = False
plugin_dirs = /usr/lib64/
---
As you can see the convergence_engine = False is added, but now I have a 2nd plugin_dirs setting.
In my case this is ok, because I am just adding a directory to the end of the value (and I can say that this works because 'openstack orchestration resource type list' shows the IBM add-ons).
However, if I were wanting to override that value completely, having a second line and not editing the previously setting for plugin_dirs could be an issue.
Quite simply, the charm should recognize that the value is already set, and as opposed to adding a new line at the bottom, it should alter the existing line.
description: | updated |
description: | updated |
The `config-flags` configuration option should really be viewed as a stop gap for alleviating missing feature support in a charm.
Whenever you find a need for it, please take a moment to file a bug describing what you want to accomplish. This information will be used to evaluate and prioritize implementation of proper feature support with test coverage and all that comes with it.
There is currently no easy way to resolve conflicts or override other parts of a template.