Cinderlib does not support Cinder drivers that make use of the privsep
library.
Originally privsep had a limitation that would serialize all requests,
so slow operations would create a bottleneck, thus cinderlib decided not
to use privsep and call the commands directly.
Since privsep no longer serializes requests we stop going around privsep
and use it.
Cinderlib is a library that works when run in a virtual environment, so
we must maintain backward compatibiliy and still support it, which is
problematic, because with Cinder's rootwrap+privsep we require
/etc/cinder/rootwrap.conf and /etc/cinder/rootwrap.d to exist, but under
a virtual env these are installed in the virtualenv's etc
directory instead. For example: .tox/py37/etc/cinder/rootwrap.conf
This configuration file is modified to point to the right filters
directory and add the virtual env's bin directory to exec_dirs.
We also take into account if we have installed cinder as editable in our
virtual environment, because in that case files are not installed, and
we will copy them from the source's directory into the virtual
environment so we can freely modify them.
Reviewed: https:/ /review. opendev. org/c/openstack /cinderlib/ +/735935 /opendev. org/openstack/ cinderlib/ commit/ cf638c41f6aa843 7aab14babc6406d f2ceb0facc
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit cf638c41f6aa843 7aab14babc6406d f2ceb0facc
Author: Gorka Eguileor <email address hidden>
Date: Tue Jun 16 16:37:15 2020 +0200
Add privsep support
Cinderlib does not support Cinder drivers that make use of the privsep
library.
Originally privsep had a limitation that would serialize all requests,
so slow operations would create a bottleneck, thus cinderlib decided not
to use privsep and call the commands directly.
Since privsep no longer serializes requests we stop going around privsep
and use it.
Cinderlib is a library that works when run in a virtual environment, so cinder/ rootwrap. conf and /etc/cinder/ rootwrap. d to exist, but under etc/cinder/ rootwrap. conf
we must maintain backward compatibiliy and still support it, which is
problematic, because with Cinder's rootwrap+privsep we require
/etc/
a virtual env these are installed in the virtualenv's etc
directory instead. For example: .tox/py37/
This configuration file is modified to point to the right filters
directory and add the virtual env's bin directory to exec_dirs.
We also take into account if we have installed cinder as editable in our
virtual environment, because in that case files are not installed, and
we will copy them from the source's directory into the virtual
environment so we can freely modify them.
Depends-On: https:/ /review. opendev. org/737312 e3efcc5949f80b9 6e5daaa18f1
Closes-Bug: #1883720
Change-Id: I7963fbfbb0a683