diff options
author | Sean Mooney <work@seanmooney.info> | 2022-11-08 15:00:22 +0000 |
---|---|---|
committer | Balazs Gibizer <gibi@redhat.com> | 2022-12-07 12:36:32 +0100 |
commit | 73fe84fa0ea6f7c7fa55544f6bce5326d87743a6 (patch) | |
tree | b9bbcc2b2eb315cf911f5359372f5076811f5fa0 /nova/api | |
parent | c97507dfcd57cce9d76670d3b0d48538900c00e9 (diff) | |
download | nova-73fe84fa0ea6f7c7fa55544f6bce5326d87743a6.tar.gz |
Support multiple config file with mod_wsgi
Unlike uwsgi, apache mod_wsgi does not support passing
commandline arguments to the python wsgi script it invokes.
As a result while you can pass --config-file when hosting the
api and metadata wsgi applications with uwsgi there is no
way to use multiple config files with mod_wsgi.
This change mirrors how this is supported in keystone today
by intoducing a new OS_NOVA_CONFIG_FILES env var to allow
operators to optional pass a ';' delimited list of config
files to load.
This change also add docs for this env var and the existing
undocumented OS_NOVA_CONFIG_DIR.
Closes-Bug: 1994056
Change-Id: I8e3ccd75cbb7f2e132b403cb38022787c2c0a37b
Diffstat (limited to 'nova/api')
-rw-r--r-- | nova/api/openstack/wsgi_app.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nova/api/openstack/wsgi_app.py b/nova/api/openstack/wsgi_app.py index d60069ce84..6a2b72a611 100644 --- a/nova/api/openstack/wsgi_app.py +++ b/nova/api/openstack/wsgi_app.py @@ -42,8 +42,11 @@ def _get_config_files(env=None): if env is None: env = os.environ dirname = env.get('OS_NOVA_CONFIG_DIR', '/etc/nova').strip() + files = env.get('OS_NOVA_CONFIG_FILES', '').split(';') + if files == ['']: + files = CONFIG_FILES return [os.path.join(dirname, config_file) - for config_file in CONFIG_FILES] + for config_file in files] def _setup_service(host, name): |