handle rtslib(-fb) package names and dependencies

Ubuntu has rtslib/targetcli packages while CentOS and Debian use 'fb'
fork of those.

Partially-Implements: blueprint multiarch-and-arm64-containers

Change-Id: I8721854eefa6c55bb6e627db9a051c8f9202d1e1
This commit is contained in:
Marcin Juszkiewicz 2017-03-28 09:42:58 +02:00
parent a130ecb153
commit ebaf1f3042
2 changed files with 48 additions and 15 deletions

View File

@ -12,13 +12,24 @@ MAINTAINER {{ maintainer }}
'targetcli'
] %}
{% elif base_distro in ['ubuntu', 'debian'] %}
{% elif base_distro in ['debian', 'ubuntu'] %}
{% set iscsid_packages = [
'open-iscsi',
'python-rtslib',
'targetcli'
'open-iscsi'
] %}
# Debian/stretch uses rtslib-fb (like CentOS does)
{% if base_distro == 'debian' %}
{% set iscsid_packages = iscsid_packages + [
'python-rtslib-fb',
'targetcli-fb'
] %}
{% elif base_distro == 'ubuntu' %}
{% set iscsid_packages = iscsid_packages + [
'python-rtslib',
'targetcli'
] %}
{% endif %}
{% endif %}
{{ macros.install_packages(iscsid_packages | customizable("packages")) }}

View File

@ -15,15 +15,15 @@ MAINTAINER {{ maintainer }}
'nfs-utils',
'openstack-nova-compute',
'openvswitch',
'python-oslo-vmware',
'python-rtslib',
'sysfsutils',
'targetcli',
'python-oslo-vmware'
'targetcli'
] %}
{{ macros.install_packages(nova_compute_packages | customizable("packages")) }}
{% elif base_distro in ['ubuntu'] %}
{% elif base_distro in ['debian', 'ubuntu'] %}
# ironic as workaround https://bugs.launchpad.net/packstack/+bug/1430388
{% set nova_compute_packages = [
@ -35,12 +35,23 @@ MAINTAINER {{ maintainer }}
'openvswitch-switch',
'open-iscsi',
'python-ironicclient',
'python-rtslib',
'sysfsutils',
'targetcli',
'python-oslo-vmware'
'python-oslo-vmware',
'sysfsutils'
] %}
# Debian/stretch uses rtslib-fb (like CentOS does)
{% if base_distro == 'debian' %}
{% set nova_compute_packages = nova_compute_packages + [
'python-rtslib-fb',
'targetcli-fb'
] %}
{% elif base_distro == 'ubuntu' %}
{% set nova_compute_packages = nova_compute_packages + [
'python-rtslib',
'targetcli'
] %}
{% endif %}
{{ macros.install_packages(nova_compute_packages | customizable("packages")) }}
RUN rm -f /etc/nova/nova-compute.conf
@ -64,7 +75,7 @@ RUN rm -f /etc/nova/nova-compute.conf
'targetcli'
] %}
{% elif base_distro in ['ubuntu', 'debian'] %}
{% elif base_distro in ['debian', 'ubuntu'] %}
{% set nova_compute_packages = [
'ceph-common',
@ -74,11 +85,22 @@ RUN rm -f /etc/nova/nova-compute.conf
'libvirt-dev',
'nfs-common',
'open-iscsi',
'python-rtslib',
'qemu-utils',
'targetcli'
'qemu-utils'
] %}
# Debian/stretch uses rtslib-fb (like CentOS does)
{% if base_distro == 'debian' %}
{% set nova_compute_packages = nova_compute_packages + [
'python-rtslib-fb',
'targetcli-fb'
] %}
{% elif base_distro == 'ubuntu' %}
{% set nova_compute_packages = nova_compute_packages + [
'python-rtslib',
'targetcli'
] %}
{% endif %}
RUN mkdir -p /etc/ceph
{% endif %}