[openstack-dev] [oslo] config: deduce related options for config generator?

Doug Hellmann doug at doughellmann.com
Tue May 3 16:54:32 UTC 2016


Excerpts from Markus Zoeller's message of 2016-05-03 18:26:50 +0200:
> While working on [1] I came across a config option ("pybasedir")
> which gets used as a base for many other options, for example
> "state_path". The option "state_path" shows then a default value
> "state_path = $pybasedir".
> My question here is, is it possible/reasonable to enhance oslo.config
> to add an information to "pybasedir" that is used as a base for other
> config options?
> My concern is, that one could change "pybasedir" and expect that only
> this one single value changes, but actually one changes multiple other
> config options as well. Making it explicit that "pybasedir" gets used
> multiple times as a base could prevent confusion.
> 
> References:
> [1] https://review.openstack.org/#/c/299236/7/nova/conf/paths.py
> 
> Regards, Markus Zoeller (markus_z)
> 

(Sorry if this is a dupe, I'm having mail client issues.)

We can detect interpolated values in defaults, but those can also appear
in user-provided values. There are also plenty of options that are
related to each other without using interpolation.

Given that we have to handle the explicit cases anyway, and that
interpolation isn't used all that often, I think it likely makes more
sense to start with the explicit implementation and see how far that
takes us before adding any automation.

Doug



More information about the OpenStack-dev mailing list