Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable custom uWSGI path #1388

Merged
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 3 additions & 1 deletion gnocchi/cli/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def api():
"No need to pass `--' in gnocchi-api command line anymore, "
"please remove")

uwsgi = spawn.find_executable("uwsgi")
uwsgi = conf.api.uwsgi_path or spawn.find_executable("uwsgi")
if not uwsgi:
LOG.error("Unable to find `uwsgi'.\n"
"Be sure it is installed and in $PATH.")
Expand Down Expand Up @@ -113,4 +113,6 @@ def api():
if virtual_env is not None:
args.extend(["-H", os.getenv("VIRTUAL_ENV", ".")])

LOG.debug("Starting gnocchi api server with [%s] and arguments [%s]",
uwsgi, args)
return os.execl(uwsgi, uwsgi, *args)
3 changes: 3 additions & 0 deletions gnocchi/opts.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ def list_opts():
default=10, min=0,
help='Number of seconds before timeout when attempting '
'to do some operations.'),
cfg.StrOpt('uwsgi-path',
rafaelweingartner marked this conversation as resolved.
Show resolved Hide resolved
default=None,
help="Custom UWSGI path to avoid auto discovery of packages.")
) + API_OPTS + gnocchi.rest.http_proxy_to_wsgi.OPTS,
),
("storage", _STORAGE_OPTS),
Expand Down
Loading