We're using oslo_concurrency.processutils to call qemu-img ; want to use the process limits facility that gives us because of a security issue (bug #1449062).
When you call processutils.execute() with a prlimit argument, it uses sys.executable to get the python interpreter to make the call with [0] and then passes -m oslo_concurrency.prlimit --as=1073741824 --cpu=2 --' before the command.
In the screen-based devstack, sys.executable was /usr/bin/python and everything worked.
In the systemd-based devstack, sys.executable is /usr/local/bin/uwsgi, which doesn't understand the arguments and thinks it's being passed a config file.
From the command line:
$ /usr/local/bin/uwsgi -m oslo_concurrency.prlimit --as=1073741824 --cpu=2 -- qemu-img info --output=json file:///tmp/glance_workdir/a4a3a99e-6ba3-4e7a-96d9-1b01f0bc097e
output:
unable to load configuration from oslo_concurrency.prlimit
We're using oslo_concurrenc y.processutils to call qemu-img ; want to use the process limits facility that gives us because of a security issue (bug #1449062).
When you call processutils. execute( ) with a prlimit argument, it uses sys.executable to get the python interpreter to make the call with [0] and then passes -m oslo_concurrenc y.prlimit --as=1073741824 --cpu=2 --' before the command.
In the screen-based devstack, sys.executable was /usr/bin/python and everything worked. bin/uwsgi, which doesn't understand the arguments and thinks it's being passed a config file.
In the systemd-based devstack, sys.executable is /usr/local/
From the command line: bin/uwsgi -m oslo_concurrenc y.prlimit --as=1073741824 --cpu=2 -- qemu-img info --output=json file:// /tmp/glance_ workdir/ a4a3a99e- 6ba3-4e7a- 96d9-1b01f0bc09 7e y.prlimit
$ /usr/local/
output:
unable to load configuration from oslo_concurrenc
$ /usr/bin/python -m oslo_concurrenc y.prlimit --as=1073741824 --cpu=2 -- qemu-img info --output=json file:// /tmp/glance_ workdir/ a4a3a99e- 6ba3-4e7a- 96d9-1b01f0bc09 7e glance_ workdir/ a4a3a99e- 6ba3-4e7a- 96d9-1b01f0bc09 7e",
output:
{
"virtual-size": 1265664,
"filename": "///tmp/
"format": "raw",
"actual-size": 1265664,
"dirty-flag": false
}
[0] https:/ /github. com/openstack/ oslo.concurrenc y/blob/ aeaee20c8db756e 66f59285520a4e5 cacdb740f2/ oslo_concurrenc y/processutils. py#L353