Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion heat/api/cfn/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def init_application():
# already contain registered options if the app is reloaded.
CONF.reset()
logging.register_options(CONF)
CONF(project='heat',
CONF(args=[],
project='heat',
prog='heat-api-cfn',
version=version.version_info.version_string())
logging.setup(CONF, CONF.prog)
Expand Down
2 changes: 1 addition & 1 deletion heat/api/openstack/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def init_application():
CONF.reset()
logging.register_options(CONF)
version = hversion.version_info.version_string()
CONF(project='heat', prog='heat-api', version=version)
CONF(args=[], project='heat', prog='heat-api', version=version)
logging.setup(CONF, CONF.prog)
config.set_config_defaults()
messaging.setup()
Expand Down
11 changes: 11 additions & 0 deletions releasenotes/notes/fix-wsgi-init-args-empty-9d86398edce73f54.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
fixes:
- |
Fixed an issue where ``heat-api`` and ``heat-api-cfn``, when running
under uWSGI with ``wsgi-file``, could fail to load the WSGI application
with ``unable to load app 0 ... (callable not found or import error)``.
The ``init_application`` functions in ``heat.api.openstack.wsgi`` and
``heat.api.cfn.wsgi`` invoked ``oslo.config`` without ``args=[]``, so
``oslo.config`` fell back to ``sys.argv[1:]`` and rejected uWSGI's own
arguments (e.g. ``--ini``) with ``SystemExit(2)``. The calls now pass
an explicit empty argument list.