config-flag settings cause duplicate conf file entries

Bug #1441389 reported by Jill Rouleau
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Nova Cloud Controller Charm
Triaged
Low
Unassigned
nova-cloud-controller (Juju Charms Collection)
Invalid
Low
Unassigned

Bug Description

When adding scheduler options via Juju set, changes are not written to nova.conf

juju set nova-cloud-controller config-flags="scheduler_default_filters=AggregateInstanceExtraSpecsFilter,RetryFilter,AvailabilityZoneFilter,CoreFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,AggregateMultiTenancyIsolation"

Unit logs show successful config-changed hook, juju get nova-cloud-controller is correct:
config-flags:
    description: Comma separated list of key=value config flags to be set in nova.conf.
    type: string
    value: scheduler_default_filters=AggregateInstanceExtraSpecsFilter,RetryFilter,AvailabilityZoneFilter,CoreFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,AggregateMultiTenancyIsolation

However nova.conf on units does not contain the Aggregate options which are being added:
scheduler_default_filters = RetryFilter,AvailabilityZoneFilter,CoreFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter

mtime of nova.conf is updated at config-changed hook time, rm'ing nova.conf before running a juju set will result in a new nova.conf being written but with the old scheduler_default_filters. Aggregates are not usable by API (ie, not in running config as well as applied/written to disk.)

Charm rev 141 on Trusty/Icehouse.

Revision history for this message
Jill Rouleau (jillrouleau) wrote :
Revision history for this message
Jill Rouleau (jillrouleau) wrote :

Appears multiple scheduler_default_filters lines are being written to nova.conf, one of which does actually contain my changes. At the least this is confusing behaviour.

Revision history for this message
Billy Olsen (billy-olsen) wrote :

Multiple settings in the nova.conf file is a by-product of the way the config-flags option works. The scheduler options are part of the base template and so are defined as part of the template. By adding in a definition for the same option using the config-flags, it would add a new entry (at nearly the bottom [DEFAULT] section) which allows the overriding of any previous options, but it is confusing that the both entries exist within the config file.

Changed in nova-cloud-controller (Juju Charms Collection):
status: New → Triaged
summary: - Changes via config-flags not written to nova.conf
+ config-flag settings cause duplicate conf file entries
Changed in nova-cloud-controller (Juju Charms Collection):
importance: Undecided → Low
Revision history for this message
Jill Rouleau (jillrouleau) wrote :

After identifying another issue with the config we were able to get aggregates working, but definitely confusing. Would be nice if we could set a scheduler_default_filters option via config.yaml rather than specifying them as extra_config.

tags: added: openstack
Revision history for this message
Seyeong Kim (seyeongkim) wrote :

@jillrouleau

I checked scheduler_default_filters option is in config.yaml since https://bugs.launchpad.net/charms/+source/nova-cloud-controller/+bug/1387073

James Page (james-page)
Changed in charm-nova-cloud-controller:
importance: Undecided → Low
status: New → Triaged
Changed in nova-cloud-controller (Juju Charms Collection):
status: Triaged → Invalid
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.