From aac89c214961f27cbc57fcee19338ec10753c67a Mon Sep 17 00:00:00 2001 From: Riccardo Pittau Date: Thu, 2 Apr 2020 10:12:06 +0200 Subject: [PATCH] Fix uefi jobs with native ubuntu ovmf package The ovmf pacakge in bionic doesn't really work in our CI. As a workaround we use the old package from xenial, but we can't keep using it also in Ubuntu Focal. This patch aims to convert the uefi jobs to use Ubuntu Focal as base operating system and use the native ovmf package. Story: 2007785 Task: 40025 Change-Id: I653e5da2672b14eae88c6cab923b8617432f1dc1 --- bindep.txt | 4 +++- devstack/files/debs/ironic | 35 +++++++++++++++++++---------------- devstack/lib/ironic | 23 +---------------------- zuul.d/ironic-jobs.yaml | 4 ++++ 4 files changed, 27 insertions(+), 39 deletions(-) diff --git a/bindep.txt b/bindep.txt index 80de701b39..80df57a523 100644 --- a/bindep.txt +++ b/bindep.txt @@ -34,9 +34,11 @@ libvirt-devel [platform:rpm devstack] qemu [platform:dpkg devstack build-image-dib] qemu-kvm [platform:dpkg devstack] qemu-utils [platform:dpkg devstack build-image-dib] -sgabios [devstack] +qemu-system-data [platform:dpkg devstack] +sgabios [platform: rpm devstack] ipxe-qemu [platform:dpkg devstack] edk2-ovmf [platform:rpm devstack] +ovmf [platform:dpkg devstack] ipxe-roms-qemu [platform:rpm devstack] openvswitch [platform:rpm devstack] iptables [devstack] diff --git a/devstack/files/debs/ironic b/devstack/files/debs/ironic index e9907b0be5..375f34439f 100644 --- a/devstack/files/debs/ironic +++ b/devstack/files/debs/ironic @@ -6,36 +6,39 @@ # but only recommends it in Jessie/Xenial. # Make sure syslinux-common is installed for those distros as it provides # *.c32 modules for syslinux -# TODO remove distro pinning when Wheezy / Trusty are EOLed (May 2019) -# or DevStack stops supporting those. # In the mean time, new Debian-based release codenames will have to be added # as distros can not be pinned with 'if-later-than' specified. apparmor docker.io +gnupg ipmitool iptables ipxe +ipxe-qemu isolinux -gnupg -libguestfs0 +jq libguestfs-tools -libvirt-bin # dist:xenial,bionic NOPRIME +libguestfs0 +libvirt-bin # dist:bionic +libvirt-daemon-driver-storage-gluster # dist:focal +libvirt-daemon-driver-lxc # dist:focal +libvirt-daemon-driver-storage-rbd # dist:focal +libvirt-daemon-system # dist:focal +libvirt-dev open-iscsi openssh-client -# TODO (etingof) pinning to older version in devstack/lib/ironic -#ovmf -pxelinux # dist:xenial,bionic -python-libguestfs +ovmf +pxelinux +python-libguestfs # dist:bionic +python3-guestfs # dist:focal qemu qemu-kvm qemu-utils -sgabios +qemu-system-data # dist:focal +sgabios # dist:bionic shellinabox -syslinux-common # dist:xenial,bionic +socat +squashfs-tools +syslinux-common tftpd-hpa xinetd -squashfs-tools -libvirt-dev -socat -ipxe-qemu -jq diff --git a/devstack/lib/ironic b/devstack/lib/ironic index 4477557a52..a4d5fc07cc 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -1063,28 +1063,7 @@ function install_ironic { # Replace the default virtio PXE ROM in QEMU with an EFI capable # one. The EFI ROM should work on with both boot modes, Legacy # BIOS and UEFI. - if is_ubuntu; then - # (rpittau) in bionic the UEFI in the ovmf 0~20180205.c0d9813c-2 - # package is broken: EFI v2.70 by EDK II - # As a workaround, here we download and install the old working - # version from the multiverse repository: EFI v2.60 by EDK II - # Bug reference: - # https://bugs.launchpad.net/ubuntu/+source/edk2/+bug/1821729 - local temp_deb - temp_deb="$(mktemp)" - wget http://archive.ubuntu.com/ubuntu/pool/multiverse/e/edk2/ovmf_0~20160408.ffea0a2c-2_all.deb -O "$temp_deb" - sudo dpkg -i "$temp_deb" - rm -f "$temp_deb" - - # NOTE(TheJulia): This no longer seems required as the ovmf images - # DO correctly network boot. The effect of this is making the - # default boot loader iPXE, which is not always desired nor - # realistic for hardware in the field. - # If it is after Train, we should likely just delete the lines - # below and consider the same for Fedora. - # sudo rm /usr/share/qemu/pxe-virtio.rom - # sudo ln -s /usr/lib/ipxe/qemu/efi-virtio.rom /usr/share/qemu/pxe-virtio.rom - elif is_fedora; then + if is_fedora; then sudo rm /usr/share/qemu/pxe-virtio.rom sudo ln -s /usr/share/ipxe.efi/1af41000.rom /usr/share/qemu/pxe-virtio.rom fi diff --git a/zuul.d/ironic-jobs.yaml b/zuul.d/ironic-jobs.yaml index 39f88a8c07..fda847d03c 100644 --- a/zuul.d/ironic-jobs.yaml +++ b/zuul.d/ironic-jobs.yaml @@ -316,6 +316,7 @@ name: ironic-tempest-ipa-partition-uefi-pxe_ipmitool description: ironic-tempest-ipa-partition-uefi-pxe_ipmitool parent: ironic-base + nodeset: openstack-single-node-focal timeout: 5400 vars: devstack_localrc: @@ -635,6 +636,7 @@ name: ironic-tempest-ipa-partition-uefi-pxe-grub2 description: Ironic tempest scenario test utilizing PXE, UEFI, and Grub2 parent: ironic-base + nodeset: openstack-single-node-focal vars: devstack_localrc: IRONIC_ENABLED_HARDWARE_TYPES: ipmi @@ -643,6 +645,8 @@ IRONIC_BOOT_MODE: uefi IRONIC_AUTOMATED_CLEAN_ENABLED: False IRONIC_DEFAULT_BOOT_OPTION: netboot + IRONIC_VM_SPECS_DISK: 10 + IRONIC_VM_SPECS_RAM: 4096 - job: # Security testing for known issues