
Previously the precedence details for the various sources oslo.config
can consume were scattered around the developer documentation (for
example in [0]). Since this is relevant for users too, we need to
include it in the user-focused documentation.
This collects all of the precedence information I am aware of and puts
it on the documentation page for --config-file, --config-dir, and the
sample source driver options.
It also clarifies the file and dir precedence in the developer docs since
previously that was only available in the API docstring.
Change-Id: I41d8ac0f33ea60aea8ba5b150e53d7eafa323457
0: 0bc22839b0/oslo_config/cfg.py (L2095)
Closes-Bug: 1825859
783 B
783 B
Configuration Options from oslo.config
When loading values from the sources defined by the following options, the precedence is as follows:
- Command Line
- Environment Variables
- Config Files from
--config-dir
1 - Config Files from
--config-file
- Pluggable Config Sources
If a value is specified in multiple locations, the location used will be the one higher in the list. For example, if a value is specified both on the command line and in an environment variable, the value from the command line will be the one returned.
oslo.config
Files in a config dir are parsed in alphabetical order. Later files take precedence over earlier ones.↩︎