Skip to content

Commit c02ec3f

Browse files
hrwyoctozepto
authored andcommitted
nova-compute: trim image a bit on CentOS
libguestfs package fetched kernel-core one which fetched linux-firmware. We remove the last one and save ~500MB of space: before/centos-binary-nova-compute: 3.3GB after1/centos-binary-nova-compute: 2.71GB Closes-Bug: #1946801 Change-Id: I98cc19c95fcec07dd4e494c14c09938d754f1de0 (cherry picked from commit bbef984)
1 parent bad1c1a commit c02ec3f

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

docker/nova/nova-compute/Dockerfile.j2

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
3939
] %}
4040
{% endif %}
4141

42-
{{ macros.install_packages(nova_compute_packages | customizable("packages")) }}
42+
{{ macros.install_packages(nova_compute_packages | customizable("packages")) }} \
43+
&& dnf remove -y linux-firmware \
44+
&& dnf clean all
4345

4446
{% elif base_package_type == 'deb' %}
4547

@@ -112,6 +114,10 @@ RUN rm -f /etc/nova/nova-compute.conf
112114
] %}
113115
{% endif %}
114116

117+
{{ macros.install_packages(nova_compute_packages | customizable("packages")) }} \
118+
&& dnf remove -y linux-firmware \
119+
&& dnf clean all
120+
115121
{% elif base_package_type == 'deb' %}
116122

117123
{% set nova_compute_packages = [
@@ -151,11 +157,11 @@ RUN rm -f /etc/nova/nova-compute.conf
151157
] %}
152158
{% endif %}
153159

154-
RUN mkdir -p /etc/ceph
160+
RUN mkdir -p /etc/ceph \
161+
&& {{ macros.install_packages(nova_compute_packages | customizable("packages"), chain=True) }}
155162

156163
{% endif %}
157164

158-
{{ macros.install_packages(nova_compute_packages | customizable("packages")) }}
159165

160166
{% set nova_compute_pip_packages = [
161167
'oslo-vmware'
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
fixes:
3+
- |
4+
CentOS ``nova-compute`` image has ``linux-firmware`` package removed to save
5+
image size by ~500MB.
6+
`LP#1926801 <https://launchpad.net/bugs/1926801>`__

0 commit comments

Comments
 (0)