From 095a57beda8d1a8596d4b1747742474a73300208 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Thu, 31 Aug 2017 11:19:15 +0100 Subject: cinder-volume: handle rtslib(-fb) situation in Debian Closes-Bug: #1714217 Change-Id: I17b387a64132dc2cf17ead292b2472427f04e263 --- docker/cinder/cinder-volume/Dockerfile.j2 | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'docker') diff --git a/docker/cinder/cinder-volume/Dockerfile.j2 b/docker/cinder/cinder-volume/Dockerfile.j2 index 704d40315..fb3763643 100644 --- a/docker/cinder/cinder-volume/Dockerfile.j2 +++ b/docker/cinder/cinder-volume/Dockerfile.j2 @@ -22,12 +22,23 @@ RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/tgtd.conf {% elif base_distro in ['debian', 'ubuntu'] %} {% set cinder_volume_packages = [ 'nfs-common', - 'python-rtslib', 'sysfsutils', - 'targetcli', 'thin-provisioning-tools', 'tgt' ] %} + + # Debian/stretch uses rtslib-fb (like CentOS does) + {% if base_distro == 'debian' %} + {% set cinder_volume_packages = cinder_volume_packages + [ + 'python-rtslib-fb', + 'targetcli-fb' + ] %} + {% elif base_distro == 'ubuntu' %} + {% set cinder_volume_packages = cinder_volume_packages + [ + 'python-rtslib', + 'targetcli' + ] %} + {% endif %} {{ macros.install_packages(cinder_volume_packages | customizable("packages")) }} {% block cinder_volume_ubuntu_setup %} @@ -40,10 +51,21 @@ RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/targets.conf {% if base_distro in ['debian', 'ubuntu'] %} {% set cinder_volume_packages = [ 'cinder-volume', - 'python-rtslib', - 'targetcli', 'thin-provisioning-tools' ] %} + + # Debian/stretch uses rtslib-fb (like CentOS does) + {% if base_distro == 'debian' %} + {% set cinder_volume_packages = cinder_volume_packages + [ + 'python-rtslib-fb', + 'targetcli-fb' + ] %} + {% elif base_distro == 'ubuntu' %} + {% set cinder_volume_packages = cinder_volume_packages + [ + 'python-rtslib', + 'targetcli' + ] %} + {% endif %} {{ macros.install_packages(cinder_volume_packages | customizable("packages")) }} {% endif %} -- cgit v1.2.3