[openstack-dev] [Oslo] Give CLI the priority over config files
Flavio Percoco
flavio at redhat.com
Fri May 3 14:16:03 UTC 2013
Hi,
NOTE: Recently, something similar to $topic was discussed[0] in this list.
I was looking into a glance-manage "bug"[1] and found out that oslo.config
gives priority to parameters configured in config files over the ones
passed in the CLI (I missed the part that says: "Option values in
config files override those on the command line"). Although I understand it was designed like that, I think this
behaviour is wrong.
Besides the fact that this is causing some confusion to CLI tools
users (see glance-manage bug), it makes it impossible to define
configuration parameters that are meant to be overridden by CLI
arguments.
That being said, I would like to propose to invert that behaviour and
let CLI arguments override configuration parameters. Reasoning behind
this is that it is already possible to define config parameters that
are hidden from the CLI, which means that parameters that shouldn't be
overridden by the CLI should not be exposed there.
Another option could be to have "just CLI" options but that doesn't
fix cases like [1].
FWIW, It is not written anywhere that CLI arguments should override
configuration files but it does seem to be the natural way of using
CLIs, at least for me.
Thoughts? Objections? Impacts not being considered?
How should cases like [1] be addressed?
Cheers,
FF
[0]
http://lists.openstack.org/pipermail/openstack-dev/2013-March/006766.html
[1] https://bugs.launchpad.net/glance/+bug/1175570
--
{ name: "Flavio Percoco",
gpg: "87112EC1",
internal: "8261386",
phone: "+390687502386",
irc: ["fpercoco", "flaper87"]}
More information about the OpenStack-dev
mailing list