using config-flags, overwriting an existing config option in the [Default] section results in duplicate entries

Bug #1786813 reported by Jeff Hillman
6
This bug affects 1 person
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/heat,/usr/lib/heat
environment_dir = /etc/heat/environment.d
host = heat
auth_encryption_key = xxx
deferred_auth_method = trusts
stack_domain_admin = heat_domain_admin
stack_domain_admin_password = xxx
stack_user_domain_name = heat
num_engine_workers = 14

---

Now, when i run 'juju config heat config-flags='convergence_engine=False,plugin_dirs=/usr/lib64/heat,/usr/lib/heat,/usr/local/lib/heat''

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/heat,/usr/lib/heat
environment_dir = /etc/heat/environment.d
host = heat
auth_encryption_key = xxx
deferred_auth_method = trusts
stack_domain_admin = heat_domain_admin
stack_domain_admin_password = xxx
stack_user_domain_name = heat
num_engine_workers = 14
convergence_engine = False
plugin_dirs = /usr/lib64/heat,/usr/lib/heat,/usr/local/lib/heat

---

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.

Tags: cpe-onsite
Jeff Hillman (jhillman)
description: updated
description: updated
Revision history for this message
Frode Nordahl (fnordahl) wrote :

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.

Changed in charm-heat:
status: New → Opinion
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.