Skip to content

Commit b9c69b4

Browse files
authored
Merge pull request #391 from stackhpc/upstream/master-2025-03-24
Synchronise master with upstream
2 parents 3cb00c9 + ad300f6 commit b9c69b4

File tree

10 files changed

+62
-11
lines changed

10 files changed

+62
-11
lines changed

docker/base/Dockerfile.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ COPY sources.list /etc/apt/sources.list.d/kolla-custom.list
263263

264264
RUN apt update \
265265
&& apt install -y --no-install-recommends extrepo \
266-
&& extrepo enable openstack_caracal \
266+
&& extrepo enable openstack_dalmatian \
267267
&& apt purge -y extrepo \
268268
&& apt --purge autoremove -y \
269269
&& apt clean

docker/ironic/ironic-conductor/Dockerfile.j2

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
1313
'e2fsprogs',
1414
'fuse',
1515
'gdisk',
16+
'genisoimage',
1617
'ipmitool',
18+
'mtools',
1719
'openssh-clients',
1820
'parted',
1921
'psmisc',
@@ -22,7 +24,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
2224
'systemd-udev',
2325
'util-linux',
2426
'xfsprogs',
25-
'genisoimage',
2627
] %}
2728
{% if base_arch in ['x86_64'] %}
2829
{% set ironic_conductor_packages = ironic_conductor_packages + [
@@ -35,7 +36,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
3536
'dosfstools',
3637
'e2fsprogs',
3738
'gdisk',
39+
'genisoimage',
3840
'ipmitool',
41+
'isolinux',
42+
'mtools',
3943
'openssh-client',
4044
'parted',
4145
'psmisc',
@@ -44,8 +48,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
4448
'shellinabox',
4549
'udev',
4650
'xfsprogs',
47-
'genisoimage',
48-
'isolinux',
4951
] %}
5052
{% endif %}
5153

docker/ironic/ironic-pxe/Dockerfile.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
99

1010
{% if base_package_type == 'rpm' %}
1111
{% set ironic_pxe_packages = [
12+
'dosfstools',
1213
'grub2-tools',
1314
'grub2-efi-*64',
1415
'grub2-efi-aa64-modules',
1516
'ipxe-bootimgs',
17+
'mtools',
1618
'shim-*64',
1719
'tftp-server',
1820
] %}
@@ -26,8 +28,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
2628
{{ macros.install_packages(ironic_pxe_packages | customizable("packages")) }}
2729
{% elif base_package_type == 'deb' %}
2830
{% set ironic_pxe_packages = [
31+
'dosfstools',
2932
'grub-efi-*64-signed',
3033
'ipxe',
34+
'mtools',
3135
'pxelinux',
3236
'shim-signed',
3337
'syslinux-common',

docker/ironic/ironic-pxe/extend_start.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,35 @@ function prepare_ipxe {
5555
fi
5656
}
5757

58+
function prepare_esp_image {
59+
# NOTE(bbezak): based on https://docs.openstack.org/ironic/2024.2/install/configure-esp.html
60+
# ESP image needs to be provided for UEFI boot with virtual media:
61+
# https://docs.openstack.org/ironic/2024.2/admin/drivers/redfish.html#virtual-media-boot
62+
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
63+
shim_src_file="/usr/lib/shim/shim*64.efi.signed"
64+
grub_src_file="/usr/lib/grub/*-efi-signed/grubnet*64.efi.signed"
65+
elif [[ "${KOLLA_BASE_DISTRO}" =~ centos|rocky ]]; then
66+
shim_src_file="/boot/efi/EFI/${KOLLA_BASE_DISTRO}/shim*64.efi"
67+
grub_src_file="/boot/efi/EFI/${KOLLA_BASE_DISTRO}/grub*64.efi"
68+
fi
69+
70+
if [[ "${KOLLA_BASE_ARCH}" == "x86_64" ]]; then
71+
shim_dst_file="bootx64.efi"
72+
grub_dst_file="grubx64.efi"
73+
elif [[ "${KOLLA_BASE_ARCH}" == "aarch64" ]]; then
74+
shim_dst_file="bootaa64.efi"
75+
grub_dst_file="grubaa64.efi"
76+
fi
77+
78+
DEST=${HTTPBOOT_PATH}/esp.img
79+
dd if=/dev/zero of=$DEST bs=4096 count=2048
80+
mkfs.msdos -F 12 -n ESP_IMAGE $DEST
81+
mmd -i $DEST EFI EFI/BOOT
82+
mcopy -i $DEST -v $shim_src_file ::EFI/BOOT/$shim_dst_file
83+
mcopy -i $DEST -v $grub_src_file ::EFI/BOOT/$grub_dst_file
84+
mdir -i $DEST ::EFI/BOOT
85+
}
86+
5887
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
5988
# of the KOLLA_BOOTSTRAP variable being set, including empty.
6089
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
@@ -63,6 +92,7 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
6392
prepare_pxe_pxelinux
6493
prepare_pxe_grub
6594
prepare_ipxe
95+
prepare_esp_image
6696
exit 0
6797
fi
6898

docker/nova/nova-base/Dockerfile.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
4444
] %}
4545
{% elif base_arch == 'aarch64' %}
4646
{% set nova_base_packages = nova_base_packages + [
47-
'qemu-efi',
47+
'qemu-efi-aarch64',
4848
] %}
4949
{% endif %}
5050

docker/nova/nova-compute/Dockerfile.j2

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
7979
'xfsprogs'
8080
] %}
8181

82-
{% if base_arch == "aarch64" %}
83-
{% set nova_compute_packages = nova_compute_packages + [
84-
'qemu-efi'
85-
] %}
86-
{% endif %}
87-
8882
RUN mkdir -p /etc/ceph \
8983
&& {{ macros.install_packages(nova_compute_packages | customizable("packages"), chain=True) }}
9084

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
upgrade:
3+
- |
4+
Debian container image builds now use Dalmatian (2024.2) repositories
5+
of Debian OpenStack.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
features:
3+
- |
4+
Added ESP image needed for UEFI virtual media boot. More context in
5+
`Ironic documentation
6+
<https://docs.openstack.org/ironic/2024.2/admin/drivers/redfish.html#virtual-media-boot>`__.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
fixes:
3+
- |
4+
Fixes ironic-conductor missing mtools package.

roles/kolla-build-deps/tasks/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,9 @@
6262
path: "{{ '/run/docker.sock' if container_engine == 'docker' else '/run/podman/podman.sock' }}"
6363
mode: "0666"
6464
become: true
65+
66+
- name: Run multiarch/qemu-user-static image to support cross-arch build
67+
ansible.builtin.command:
68+
cmd: "{{ container_engine }} run --rm --privileged multiarch/qemu-user-static --reset -p yes"
69+
become: true
70+
when: ansible_facts.architecture != (base_arch | default('x86_64'))

0 commit comments

Comments
 (0)