[openstack-dev] [DevStack] Generalize config file settings
Dean Troyer
dtroyer at gmail.com
Wed Sep 18 15:22:52 UTC 2013
On Wed, Sep 18, 2013 at 9:28 AM, Bob Ball <bob.ball at citrix.com> wrote:
> I think it’d make more sense the other way round.****
>
> ** **
>
> If localrc does not exist, and we’ve created a localrc.generated create
> localrc with just “source localrc.generated”. That way anyone using
> localrc directly will get the right information.****
>
> A quick grep suggests that all uses in devstack source the localrc,
> therefore that should work?****
>
> ** **
>
> It’d be easy to add a comment in the localrc or in the docs for local.conf
> that say only stack.sh will update localrc.generated so if you want live
> changes in other scripts you have to modify localrc?
>
The real goal is for the user to stop modifying localrc once they start
using local.conf but keep the same semantics. If I could figure out how to
stuff the config bits into localrc and still have it be sourcable I'd...ok,
just tried that, it can work but is too fragile.
How about this:
- if localrc exists, use it. the rest of local.conf works as proposed.
- if local.conf has a [[local:localrc]] section and localrc exists print a
warning that it (local.conf localrc section) is being ignored
- if local.conf has a [[local:localrc]] section and localrc does not exist,
extract it to localrc.generated and use that
- interactively-entered passwords will continue to be written to localrc if
it exists but will not be written to local.conf; this way we can say
local.conf is _never_ modified by DevStack. The value in creating localrc
on first run is long gone, running DevStack with no config is not very
useful anymore.
This does the following:
- localrc semantics do not change so there is no compatibility surprise
- local.conf config function is seamlessly added
- to gain the all-config-in-one-file aspect the user needs to 'convert'
localrc to a local.conf [[local:localrc]] section; otherwise no change is
necessary
- local.generated will include the 'DO NOT EDIT' warning as it will be
re-created as-required when stackrc sources it
Am I missing anything?
dt
--
Dean Troyer
dtroyer at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130918/7c3dde0d/attachment.html>
More information about the OpenStack-dev
mailing list