From 4cefbac5792781e02453cd882c2872dbba371197 Mon Sep 17 00:00:00 2001 From: Simon Dodsley Date: Sat, 10 Oct 2026 09:37:31 -0400 Subject: 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 --- kolla/docker/cinder/cinder-volume/Dockerfile.j2 | 5 ++++- .../notes/cinder-volume-pip-packages-6aca004d613f376f.yaml | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/cinder-volume-pip-packages-6aca004d613f376f.yaml 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``. -- cgit v1.2.3