diff options
| author | Simon Dodsley <simon@purestorage.com> | 2026-10-10 09:37:31 -0400 |
|---|---|---|
| committer | Simon Dodsley <simon@purestorage.com> | 2026-10-10 09:37:31 -0400 |
| commit | 4cefbac5792781e02453cd882c2872dbba371197 (patch) | |
| tree | 8a90654aca4589e3eb468f016447db824fa40f78 | |
| parent | 3fc91f2985bb1263e46a3190e270f8827628e7c2 (diff) | |
| download | kolla-4cefbac5792781e02453cd882c2872dbba371197.tar.gz kolla-4cefbac5792781e02453cd882c2872dbba371197.zip | |
cinder-volume: add customizable pip package list
The Everpure FlashArray Cinder driver imports the py-pure-client SDK,
which kolla-ansible's native enable_cinder_backend_pure_* flags assume
is present. Stock images do not carry it, so operators have to rebuild
cinder-volume themselves. Baking the SDK in is not an option: it
installs to roughly 700 MB of generated REST models, far too much to
add to every cinder-volume image for one backend.
Instead give cinder-volume its own pip package list, empty by default
and run through the customizable filter, so a vendor SDK can be added
with a single template-override line:
{% set cinder_volume_pip_packages_append = ['py-pure-client'] %}
without touching cinder-base and therefore the API, scheduler and
backup images. This is the mechanism nova-compute and ironic-conductor
already expose for their optional packages.
Related-Bug: #2170385
Assisted-By: Claude Code claude-fable-5-1
Change-Id: If8202b9f04f0299183019891e4ddd636669b25b4
Signed-off-by: Simon Dodsley <simon@purestorage.com>
| -rw-r--r-- | kolla/docker/cinder/cinder-volume/Dockerfile.j2 | 5 | ||||
| -rw-r--r-- | releasenotes/notes/cinder-volume-pip-packages-6aca004d613f376f.yaml | 9 |
2 files changed, 13 insertions, 1 deletions
diff --git a/kolla/docker/cinder/cinder-volume/Dockerfile.j2 b/kolla/docker/cinder/cinder-volume/Dockerfile.j2 index 772350e4e..f2a09d866 100644 --- a/kolla/docker/cinder/cinder-volume/Dockerfile.j2 +++ b/kolla/docker/cinder/cinder-volume/Dockerfile.j2 @@ -45,10 +45,13 @@ RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/targets.conf {% endif %} +{% set cinder_volume_pip_packages = [] %} + COPY cinder_sudoers /etc/sudoers.d/kolla_cinder_volume_sudoers COPY extend_start.sh /usr/local/bin/kolla_cinder_extend_start -RUN chmod 750 /etc/sudoers.d \ +RUN {{ macros.install_pip(cinder_volume_pip_packages | customizable("pip_packages")) }} \ + && chmod 750 /etc/sudoers.d \ && chmod 440 /etc/sudoers.d/kolla_cinder_volume_sudoers \ && chmod 644 /usr/local/bin/kolla_cinder_extend_start diff --git a/releasenotes/notes/cinder-volume-pip-packages-6aca004d613f376f.yaml b/releasenotes/notes/cinder-volume-pip-packages-6aca004d613f376f.yaml new file mode 100644 index 000000000..e51838a7f --- /dev/null +++ b/releasenotes/notes/cinder-volume-pip-packages-6aca004d613f376f.yaml @@ -0,0 +1,9 @@ +--- +features: + - | + The ``cinder-volume`` image now has its own customizable pip package + list, ``cinder_volume_pip_packages`` (empty by default). Vendor SDKs + that only ``cinder-volume`` needs, such as ``py-pure-client`` for the + Everpure FlashArray driver, can be added with + ``cinder_volume_pip_packages_append`` in a template override without + rebuilding ``cinder-base``. |
