Skip to content

Commit 3d55f99

Browse files
committed
cinder-volume: Install binary python libs only in binary
Change-Id: Iee451db823a15b40f9e893c1febfd910c336ddec
1 parent e998831 commit 3d55f99

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,42 +11,44 @@ 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
'nfs-common',
2726
'sysfsutils',
28-
'python3-rtslib-fb',
2927
'targetcli-fb',
3028
'thin-provisioning-tools',
3129
'tgt'
3230
] %}
31+
{% if install_type == 'binary' %}
32+
{% set cinder_volume_packages = cinder_volume_packages + [
33+
'cinder-volume',
34+
'python3-rtslib-fb'
35+
] %}
36+
{% endif %}
37+
38+
{% endif %}
3339

3440
{{ macros.install_packages(cinder_volume_packages | customizable("packages")) }}
3541

36-
{% block cinder_volume_ubuntu_setup %}
37-
RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/targets.conf
38-
{% endblock %}
42+
{% if base_package_type == 'rpm' %}
3943

40-
{% endif %}
44+
{% block cinder_volume_redhat_setup %}
45+
{% endblock %}
4146

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

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

5153
{% endif %}
5254

0 commit comments

Comments
 (0)