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
This commit is contained in:
Marcin Juszkiewicz 2021-11-25 16:51:22 +01:00
parent 1a9d5a1a42
commit bbef9846c3
2 changed files with 15 additions and 3 deletions

View File

@ -39,7 +39,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
] %}
{% endif %}
{{ macros.install_packages(nova_compute_packages | customizable("packages")) }}
{{ macros.install_packages(nova_compute_packages | customizable("packages")) }} \
&& dnf remove -y linux-firmware \
&& dnf clean all
{% elif base_package_type == 'deb' %}
@ -112,6 +114,10 @@ RUN rm -f /etc/nova/nova-compute.conf
] %}
{% endif %}
{{ macros.install_packages(nova_compute_packages | customizable("packages")) }} \
&& dnf remove -y linux-firmware \
&& dnf clean all
{% elif base_package_type == 'deb' %}
{% set nova_compute_packages = [
@ -151,11 +157,11 @@ RUN rm -f /etc/nova/nova-compute.conf
] %}
{% endif %}
RUN mkdir -p /etc/ceph
RUN mkdir -p /etc/ceph \
&& {{ macros.install_packages(nova_compute_packages | customizable("packages"), chain=True) }}
{% endif %}
{{ macros.install_packages(nova_compute_packages | customizable("packages")) }}
{% set nova_compute_pip_packages = [
'oslo-vmware'

View File

@ -0,0 +1,6 @@
---
fixes:
- |
CentOS ``nova-compute`` image has ``linux-firmware`` package removed to save
image size by ~500MB.
`LP#1926801 <https://launchpad.net/bugs/1926801>`__