[openstack-dev] [puppet] Why do we have two providers for openstack_config ?

Sofer Athlan-Guyot sathlang at redhat.com
Thu Aug 11 13:26:38 UTC 2016


Hi,

I stumbled on the fact that there are two providers for the
openstack_config type: ruby[1]; ini_setting.rb[2].

The ruby's one has a fork of the inifile ruby's provider is there[3].

It is currently used by those 6 types:

 - neutron_lbaas_service_config
 - nova_config
 - neutron_vpnaas_service_config
 - neutron_config
 - ceilometer_config
 - barbican_config

They all have in common to define the value type as an array, for
instance in [4].

A basic support for :array_matching => all in ini_setting is not hard to
do (added there [5]).

So, are there other reasons I missed, that force us to keep the second
provider ?

For instance that could be places where this array_matching => all is
currently used in any config setting like:

    nova_config { 'foo/bar' => ['1','2','3'] }

Or, digging into the code, I've got the impression that it's able to
"collect" configuration like this:

    [foo]
    bar = 1
    bar = 2
    bar = 3

but then again, not sure and didn't have to test it all.

If someone has some answer to the why and how of the ruby.rb provider,
that would be awesome.  At the very least we could add it to the README.

Thanks for reading this far,
Regards,

[1] https://github.com/openstack/puppet-openstacklib/blob/master/lib/puppet/provider/openstack_config/ruby.rb
[2] https://github.com/openstack/puppet-openstacklib/blob/master/lib/puppet/provider/openstack_config/ini_setting.rb
[3] https://github.com/openstack/puppet-openstacklib/tree/master/lib/puppet/util
[4] https://github.com/openstack/puppet-neutron/blob/master/lib/puppet/type/neutron_lbaas_service_config.rb#L10
[5] https://review.openstack.org/#/c/354018/
-- 
Sofer Athlan-Guyot



More information about the OpenStack-dev mailing list