Comment 2 for bug 1883720

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinderlib (master)

Reviewed: https://review.opendev.org/c/openstack/cinderlib/+/735935
Committed: https://opendev.org/openstack/cinderlib/commit/cf638c41f6aa8437aab14babc6406df2ceb0facc
Submitter: "Zuul (22348)"
Branch: master

commit cf638c41f6aa8437aab14babc6406df2ceb0facc
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
    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.

    Depends-On: https://review.opendev.org/737312
    Closes-Bug: #1883720
    Change-Id: I7963fbfbb0a683e3efcc5949f80b96e5daaa18f1