openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #14227
[common] Common config and Quantum configuration files
Hi,
In Quantum we make use of a number of different configuration files. A
quantum plugin may have one or more configuration files. An example of
the configuration files is below.
/etc/quantum/quantum.conf
/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini
When the quantum service starts it creates and populates cfg.CONF from
the configuration file. At a later point in the flow the plugin is
detected and started. This in turn requires that the plugin
configuration be read. In addition to this the quantum agent also makes
use of the plugin configuration file (this is a separate process). In
order for Quantum to make use of openstack common code, for example the
RPC module, the plugin information needs to be read into the cfg.CONF
structure on the service.
Originally I implemented the code below. This was invoked on the plugin
(would append to the existing structure) and the agent (would create a
new structure).
defparse(config_file):
conf =cfg.CONF
if'default_config_files'inconf:
conf.default_config_files.append(config_file)
else:
conf.default_config_files=[config_file]
conf(args=[],default_config_files=conf.default_config_files)
This code is problematic in the sense that if the plugin configuration
overrides a entry in the quantum.conf (for example log file).
The ideal solution would be to have one common configuration file. The
problem is that this is not really suited to the Quantum model and the
consensus of the community is to continue with the separate files.
Done anyone have an elegant and fail safe way to append a configuration
file?
Any ideas will be greatly appreciated.
Thanks
Gary