Ben Nemec 144e16d532 Document precedence of config sources
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
2019-04-23 20:36:29 +00:00

783 B

Configuration Options from oslo.config

When loading values from the sources defined by the following options, the precedence is as follows:

  1. Command Line
  2. Environment Variables
  3. Config Files from --config-dir1
  4. Config Files from --config-file
  5. 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


  1. Files in a config dir are parsed in alphabetical order. Later files take precedence over earlier ones.↩︎