oslo.concurrency/oslo_concurrency
Matthew Treinish 55e06261aa
Add python_exec kwarg to processutils.execute()
This commit adds a new kwarg to the process_utils.execute() function to
specify the python executable to use when launching python to check
prlimits. This is necessary when processutils.execute() is called from
inside an API server running with uwsgi. In this case sys.executable is
uwsgi (because uwsgi links libpython.so and is actually the interpreter)
This doesn't work with the execute() function because it assumes the
cpython interpreter CLI is used for the arguments it uses to call the
prlimits module. To workaround this and enable API servers that may run
under uwsgi to use this those applications can simply pass in an
executable to use.

Longer term it might be better to migrate the prlimits usage to call
multiprocessing instead of subprocessing python. But that would require
a more significant rewrite of both processutils and prlimit to
facilitate that.

Change-Id: I0ae60f0b4cc3700c783f6018e837358f0e053a09
Closes-Bug: #1712463
2018-01-09 10:22:45 -05:00
..
fixture Use versionadded and versionchanged in doc 2015-11-05 13:31:40 +01:00
locale Imported Translations from Zanata 2017-07-12 07:34:06 +00:00
tests Add python_exec kwarg to processutils.execute() 2018-01-09 10:22:45 -05:00
__init__.py Move out of the oslo namespace package 2014-11-14 17:17:25 -05:00
_i18n.py Remove log translations 2017-07-11 02:40:05 +00:00
lockutils.py Add debug log to indicate when external lock is taken 2017-07-26 17:54:27 +03:00
opts.py Bump to hacking 0.10 2015-01-12 21:11:16 +00:00
prlimit.py processutils: add support for missing process limits 2016-04-19 14:35:24 +01:00
processutils.py Add python_exec kwarg to processutils.execute() 2018-01-09 10:22:45 -05:00
version.py pbr.version.VersionInfo needs package name (oslo.xyz and not oslo_xyz) 2017-02-06 12:49:22 -05:00
watchdog.py Use versionadded and versionchanged in doc 2015-11-05 13:31:40 +01:00