[openstack-dev] [DevStack] Generalize config file settings

Bob Ball bob.ball at citrix.com
Wed Sep 18 09:46:27 UTC 2013


The biggest concern I have about the current implementation is that it handles conf files inconsistently - but as Dean pointed out on the review it opens a wider question.  I will very often run devstack, find something not quite working unstack, change a value or two in localrc and then re-run devstack - this is against the policy that you must never change localrc.

I understand that there are some very good reasons that we can't make all modifications to localrc work on an unstack/stack -- but a very large number of the options are only read at run time and do not have any persistent state.

This change enforces a stricter "do not modify localrc after the first run of stack.sh" policy by making sure localrc is not updated if it exists - even if the local.conf sections had changed.  Conversely, any changes in local.conf outside of the localrc section _will_ be honoured and pushed through to the respective config files.

I think that we need to attempt to use all changes in local.conf, whether in localrc or not.  Admittedly this might give situations where a second run of devstack is incompatible with the system state - but that's no worse than the current situation.  Of course, the current implementation doesn't stop someone modifying localrc directly and re-stacking as they can now - but then we'd have a mismatch of what was in local.conf and what is in localrc which I'm sure would lead to significant confusion.

In my mind the alternative would be to add a more restrictive check to make it very obvious what the expectations are - e.g. store all values from localrc in localrc.lastrun and if any of the values have changed then fail to stack.

Thoughts?

Bob

From: Dean Troyer [mailto:dtroyer at gmail.com]
Sent: 16 September 2013 22:41
To: OpenStack Development Mailing List
Subject: Re: [openstack-dev] [DevStack] Generalize config file settings

On Fri, Sep 13, 2013 at 1:20 PM, Everett Toews <everett.toews at rackspace.com<mailto:everett.toews at rackspace.com>> wrote:
On Sep 13, 2013, at 6:10 AM, Sean Dague wrote:

> Because inevitably people ask for copies of other folks configs to duplicate things, and a single file is easier to pass around than a tree. But that would mean a unique parser to handle the top level stanza.
+1

I share localrc files all the time.

Well, I wrote a parser for a modified INI file format anyway and managed to put everything into a single local.conf file.  There is a bit of clumsiness around localrc in order to maintain backward-compatibility and a deprecation cycle to go through for some existing config variables.

The current incarnation is in https://review.openstack.org/#/c/46768/, try it out, let's see if it is any good.  I did write up some more detailed docs at http://hackstack.org/x/blog/2013/09/07/devstack-local-config/ that will morph into the doc page in devstack.org<http://devstack.org> when we're done.

dt

--

Dean Troyer
dtroyer at gmail.com<mailto:dtroyer at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130918/40555548/attachment.html>


More information about the OpenStack-dev mailing list