Skip to content

Commit 8964809

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "cinder-volume: Install binary python libs only in binary"
2 parents f12b5a8 + 3d55f99 commit 8964809

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

docker/cinder/cinder-volume/Dockerfile.j2

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,44 +11,46 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
1111
{% set cinder_volume_packages = [
1212
'nfs-utils',
1313
'nvmetcli',
14-
'python3-rtslib',
15-
'python3-cinderlib',
1614
'sysfsutils',
1715
'targetcli'
1816
] %}
19-
{{ macros.install_packages(cinder_volume_packages | customizable("packages")) }}
20-
21-
{% block cinder_volume_redhat_setup %}
22-
{% endblock %}
17+
{% if install_type == 'binary' %}
18+
{% set cinder_volume_packages = cinder_volume_packages + [
19+
'python3-rtslib'
20+
] %}
21+
{% endif %}
2322

2423
{% elif base_package_type == 'deb' %}
2524
{% set cinder_volume_packages = [
2625
'lsscsi',
2726
'nfs-common',
2827
'nvme-cli',
2928
'sysfsutils',
30-
'python3-rtslib-fb',
3129
'targetcli-fb',
3230
'thin-provisioning-tools',
3331
'tgt'
3432
] %}
33+
{% if install_type == 'binary' %}
34+
{% set cinder_volume_packages = cinder_volume_packages + [
35+
'cinder-volume',
36+
'python3-rtslib-fb'
37+
] %}
38+
{% endif %}
39+
40+
{% endif %}
3541

3642
{{ macros.install_packages(cinder_volume_packages | customizable("packages")) }}
3743

38-
{% block cinder_volume_ubuntu_setup %}
39-
RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/targets.conf
40-
{% endblock %}
44+
{% if base_package_type == 'rpm' %}
4145

42-
{% endif %}
46+
{% block cinder_volume_redhat_setup %}
47+
{% endblock %}
4348

44-
{% if install_type == 'binary' %}
45-
{% if base_package_type == 'deb' %}
46-
{% set cinder_volume_packages = [
47-
'cinder-volume',
48-
] %}
49+
{% elif base_package_type == 'deb' %}
4950

50-
{{ macros.install_packages(cinder_volume_packages | customizable("packages")) }}
51-
{% endif %}
51+
{% block cinder_volume_ubuntu_setup %}
52+
RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/targets.conf
53+
{% endblock %}
5254

5355
{% endif %}
5456

0 commit comments

Comments
 (0)