<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Fri, May 3, 2013 at 9:25 AM, Monty Taylor <span dir="ltr"><<a href="mailto:mordred@inaugust.com" target="_blank">mordred@inaugust.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
<br>
On 05/03/2013 10:16 AM, Flavio Percoco wrote:<br>
> Hi,<br>
><br>
> NOTE: Recently, something similar to $topic was discussed[0] in this list.<br>
><br>
> I was looking into a glance-manage "bug"[1] and found out that oslo.config<br>
> gives priority to parameters configured in config files over the ones<br>
> passed in the CLI (I missed the part that says: "Option values in<br>
> config files override those on the command line"). Although I understand<br>
> it was designed like that, I think this<br>
> behaviour is wrong.<br>
><br>
> Besides the fact that this is causing some confusion to CLI tools<br>
> users (see glance-manage bug), it makes it impossible to define<br>
> configuration parameters that are meant to be overridden by CLI<br>
> arguments.<br>
><br>
> That being said, I would like to propose to invert that behaviour and<br>
> let CLI arguments override configuration parameters. Reasoning behind<br>
> this is that it is already possible to define config parameters that<br>
> are hidden from the CLI, which means that parameters that shouldn't be<br>
> overridden by the CLI should not be exposed there.<br>
<br>
</div>I agree. I believe the natural order of things is:<br>
<br>
- Default value in source code<br>
- Overridden by value in config file<br>
- Overridden by value in environment variable<br>
- Overridden by value given as command line option<br></blockquote><div><br></div><div>+1</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Basically due to the relative permanence of each. If you are running a<br>
program by hand with direct CLI options - you probably want the option<br>
you give to work. If you wanted the options in the config file to<br>
happen, you'd probably just start the service as usual.<br>
<div class="im HOEnZb"><br>
> Another option could be to have "just CLI" options but that doesn't<br>
> fix cases like [1].<br>
><br>
> FWIW, It is not written anywhere that CLI arguments should override<br>
> configuration files but it does seem to be the natural way of using<br>
> CLIs, at least for me.<br>
><br>
> Thoughts? Objections? Impacts not being considered?<br>
> How should cases like [1] be addressed?<br>
><br>
> Cheers,<br>
> FF<br>
><br>
> [0]<br>
> <a href="http://lists.openstack.org/pipermail/openstack-dev/2013-March/006766.html" target="_blank">http://lists.openstack.org/pipermail/openstack-dev/2013-March/006766.html</a><br>
><br>
> [1] <a href="https://bugs.launchpad.net/glance/+bug/1175570" target="_blank">https://bugs.launchpad.net/glance/+bug/1175570</a><br>
><br>
<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</div></div></blockquote></div><br></div></div>