nova-api does not support config dirs when run under apache via mod_wsgi
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
sean mooney | ||
placement |
In Progress
|
Undecided
|
sean mooney |
Bug Description
currently nova assume that when the nova-api si run under a wsgi server that server supports
passing command line arguments to the wsgi script.
that is not the case with mod_wsgi
as a result we do not support using a config director when running under mod_wsgi or passing any other arguments.
as a result when we run nova-api under mod_wsgi we fallback to a hardcoded set of config file names
CONFIG_FILES = ['api-paste.ini', 'nova.conf']
LOG = logging.
objects.
def _get_config_
if env is None:
env = os.environ
dirname = env.get(
return [os.path.
for config_file in CONFIG_FILES]
This prevents operators form using the /etc/nova/
to provide a directory containing multiple config files
This can be addressed in several ways.
first we can provide a env varabel for additional command line args to be parsed
these can be parsed here as we do for uwsgi or the python wsgi server
https:/
second we could replace or augment our custom _get_config_files with a call to the genirc implementation provide in oslo.config
thrid we can provide a way to extend
CONFIG_FILES = ['api-paste.ini', 'nova.conf']
via a new env var.
e.g. OS_NOVA_
we can do all three or any one of them to enable the usecase of supporting config directories although only the first option allows other command line args to be passed.
Changed in placement: | |
assignee: | nobody → sean mooney (sean-k-mooney) |
after reviewing some of the main openstack porjects (keystone, glance cinder placment)
only keystone currenlty porvides a way to configure the config files when running under mod_wsgi
there solution is to expose an envionment variabel to allow the opeartor to list the files to load.
https:/ /github. com/openstack/ keystone/ blob/7d4047cb69 139c22f4e321e9b a8b287a47168df2 /keystone/ server/ flask/core. py#L74- L88
to keep concitnecy i will adopt the same appch defaulting the configs to the current set but adding a OS_NOVA_ CONFIG_ FILES atribute. i will also use ";" as the seperator insted of comma for consitency.