Re-disable ppc64le arch_supports_boot_order; add BOOTFROM=d -> -boot once=d opt-in
QEMU spapr (SLOF) does NOT honor -boot once=d as a true one-shot: SLOF
caches the chosen boot device in spapr-NVRAM, so the post-install
reboot loops back into the installer (E3405: No such device at scsi@8:1
once anaconda has finished using the CD). The previous patch (commit
58f6db9) dropped the arch_supports_boot_order=0 line from this patch
to fix install tests that supply both an ISO and a populated HDD_1
(install_resize_lvm), but it broke the default install_default
post-install reboot.
Switch to a model that handles both cases:
- Default ppc64le: arch_supports_boot_order = 0. No -boot args at all.
Empty HDD falls through to the installer CD on first boot; populated
HDD boots its own bootloader on subsequent boots. Matches AL9 behavior.
- ISO + populated HDD_1 needing CD-first (install_resize_lvm): test
sets BOOTFROM=d. The patch translates this into -boot once=d *and*
clears $bootfrom so Proc::configure_blockdevs() does NOT assign a
persistent bootindex(0) to the CD. once=d is the only boot flag
whose effect doesn't outlive the first guest boot in this setup,
giving us 'CD wins first boot, default order on second boot'.
The companion fix for the AL10 anaconda-40.22 NVRAM-write regression
lives in os-autoinst-distri-almalinux's _boot_to_anaconda.pm
(inst.leavebootorder).
This commit is contained in:
parent
081c5642d7
commit
c8c5692035
@ -17,72 +17,108 @@ ppc64le:
|
||||
- Use VirtIO Keyboard as a keyboard device.
|
||||
- Use VirtIO Tablet as a tablet device.
|
||||
- Do not remove floppy drive device since it's not supported.
|
||||
|
||||
Note: originally this patch also disabled boot-order (`-boot once=d` /
|
||||
`-boot order=`). That turned out to be wrong - QEMU spapr (pseries)
|
||||
does honor these flags, and without them install tests that supply
|
||||
both an ISO and an HDD_1 boot the HDD instead of the installer CD on
|
||||
ppc64le. The boot-order disable has been dropped so ppc64le behaves
|
||||
like x86_64.
|
||||
- Set $arch_supports_boot_order = 0 so the QEMU command line gets no
|
||||
`-boot once=d` / `-boot order=` by default. This matches upstream
|
||||
behavior on aarch64 / s390x and avoids the SLOF spapr-NVRAM trap
|
||||
where `-boot once=d` is *not* a one-shot on QEMU pseries (SLOF
|
||||
caches the chosen boot device and re-picks the empty CD on the
|
||||
post-install reboot, dropping the guest at the OF prompt with
|
||||
E3405). With boot-order generation off, an empty HDD naturally
|
||||
falls through to the installer CD and a populated HDD wins the
|
||||
post-install boot.
|
||||
- For tests that supply both an installer ISO and a populated HDD_1
|
||||
and need the CD to win the first boot (e.g. install_resize_lvm),
|
||||
set BOOTFROM=d in the test settings. The patch translates this
|
||||
into `-boot once=d` and clears $bootfrom so Proc::configure_blockdevs
|
||||
does NOT assign a persistent bootindex(0) to the CD — that would
|
||||
loop the installer on every reboot.
|
||||
|
||||
Signed-off-by: Elkhan Mammadli <elkhan.mammadli@protonmail.com>
|
||||
Signed-off-by: Andrew Lukoshko <andrew.lukoshko@gmail.com>
|
||||
---
|
||||
backend/qemu.pm | 14 +++++++++-----
|
||||
1 file changed, 9 insertions(+), 5 deletions(-)
|
||||
backend/qemu.pm | 35 ++++++++++++++++++++++++++++++-----
|
||||
1 file changed, 30 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/backend/qemu.pm b/backend/qemu.pm
|
||||
index 0a6275f4..904ec7bf 100644
|
||||
--- a/backend/qemu.pm
|
||||
+++ b/backend/qemu.pm
|
||||
@@ -746,6 +746,7 @@ sub start_qemu ($self) {
|
||||
@@ -733,6 +733,8 @@ sub start_qemu ($self) {
|
||||
$arch = 'arm' if ($arch =~ /armv6|armv7/);
|
||||
my $is_arm = $arch eq 'aarch64' || $arch eq 'arm';
|
||||
my $is_s390x = $arch eq 's390x';
|
||||
+ my $is_ppc64le = $arch eq 'ppc64le';
|
||||
|
||||
+ my $ppc64le_once_d = 0;
|
||||
|
||||
$self->_set_graphics_backend($is_arm);
|
||||
|
||||
@@ -762,7 +763,10 @@ sub start_qemu ($self) {
|
||||
|
||||
@@ -749,7 +751,26 @@ sub start_qemu ($self) {
|
||||
$arch_supports_boot_order = 0;
|
||||
$use_virtio_kbd = 1;
|
||||
}
|
||||
- elsif ($vars->{OFW}) {
|
||||
+ elsif ($is_ppc64le) {
|
||||
+ # AlmaLinux ppc64le: keep arch_supports_boot_order=0 by default so
|
||||
+ # we match upstream / AL9 behavior — empty HDD falls through to the
|
||||
+ # installer CD, populated HDD boots its own bootloader. Avoids the
|
||||
+ # SLOF spapr-nvram trap where `-boot once=d` is *not* a one-shot.
|
||||
+ #
|
||||
+ # For tests that supply both an ISO and a populated HDD_1 and need
|
||||
+ # the installer to win the first boot (e.g. install_resize_lvm),
|
||||
+ # the test sets BOOTFROM=d. We translate that into `-boot once=d`
|
||||
+ # below and clear $bootfrom so Proc::configure_blockdevs() does NOT
|
||||
+ # assign a *persistent* bootindex(0) to the CD — that would loop
|
||||
+ # the installer on every reboot.
|
||||
+ $arch_supports_boot_order = 0;
|
||||
+ $use_virtio_kbd = 1;
|
||||
+ if ($bootfrom eq 'cdrom') {
|
||||
+ $bootfrom = '';
|
||||
+ $ppc64le_once_d = 1;
|
||||
+ }
|
||||
+ }
|
||||
+ elsif ($vars->{OFW} && !$is_ppc64le) {
|
||||
$use_usb_kbd = $self->qemu_params_ofw;
|
||||
}
|
||||
|
||||
@@ -851,7 +856,7 @@ sub start_qemu ($self) {
|
||||
|
||||
@@ -838,7 +859,7 @@ sub start_qemu ($self) {
|
||||
sp('chardev', 'ringbuf,id=serial0,logfile=serial0,logappend=on');
|
||||
sp('serial', 'chardev:serial0');
|
||||
|
||||
|
||||
- if (!$is_s390x) {
|
||||
+ if (!$is_s390x && !$is_arm && !$is_ppc64le) {
|
||||
if ($self->requires_audiodev) {
|
||||
my $audiodev = $vars->{QEMU_AUDIODEV} // 'intel-hda';
|
||||
my $audiobackend = $vars->{QEMU_AUDIOBACKEND} // 'none';
|
||||
@@ -869,7 +874,7 @@ sub start_qemu ($self) {
|
||||
@@ -856,7 +877,7 @@ sub start_qemu ($self) {
|
||||
}
|
||||
{
|
||||
# Remove floppy drive device on architectures
|
||||
- sp('global', 'isa-fdc.fdtypeA=none') unless ($is_arm || $is_s390x || $vars->{QEMU_NO_FDC_SET});
|
||||
+ sp('global', 'isa-fdc.fdtypeA=none') unless ($is_arm || $is_s390x || $is_ppc64le || $vars->{QEMU_NO_FDC_SET});
|
||||
|
||||
|
||||
sp('m', $vars->{QEMURAM}) if $vars->{QEMURAM};
|
||||
sp('machine', $vars->{QEMUMACHINE}) if $vars->{QEMUMACHINE};
|
||||
@@ -952,8 +957,8 @@ sub start_qemu ($self) {
|
||||
@@ -928,6 +949,10 @@ sub start_qemu ($self) {
|
||||
push @boot_args, 'once=d';
|
||||
}
|
||||
}
|
||||
|
||||
+ elsif ($ppc64le_once_d) {
|
||||
+ # ppc64le opt-in (BOOTFROM=d): one-shot CD boot, then default order.
|
||||
+ push @boot_args, 'once=d';
|
||||
+ }
|
||||
sp('boot', join(',', @boot_args)) if @boot_args;
|
||||
|
||||
if (!$vars->{UEFI} && $vars->{BIOS}) {
|
||||
@@ -939,8 +964,8 @@ sub start_qemu ($self) {
|
||||
}
|
||||
|
||||
unless ($vars->{QEMU_NO_TABLET}) {
|
||||
- sp('device', ($vars->{OFW} || $arch eq 'aarch64') ? 'nec-usb-xhci' : $is_s390x ? 'virtio-tablet' : 'qemu-xhci');
|
||||
- sp('device', 'usb-tablet') unless $is_s390x;
|
||||
+ sp('device', ($vars->{OFW} && !$is_ppc64le) ? 'nec-usb-xhci' : ($is_s390x || $is_ppc64le) ? 'virtio-tablet' : 'qemu-xhci');
|
||||
+ sp('device', 'usb-tablet') unless ($is_s390x || $is_ppc64le);
|
||||
}
|
||||
|
||||
sp('device', 'usb-kbd') if $use_usb_kbd;
|
||||
--
|
||||
2.41.0
|
||||
|
||||
sp('device', 'usb-kbd') if $use_usb_kbd;
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
|
||||
Name: os-autoinst
|
||||
Version: %{github_version}%{?github_date:^%{github_date}git%{shortcommit}}
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Summary: OS-level test automation
|
||||
License: GPLv2+
|
||||
URL: https://os-autoinst.github.io/openQA/
|
||||
@ -255,6 +255,17 @@ rm tools/lib/perlcritic/Perl/Critic/Policy/*.pm
|
||||
%files devel
|
||||
|
||||
%changelog
|
||||
* Wed Apr 29 2026 Andrew Lukoshko <andrew.lukoshko@gmail.com> - 4.6^20230731git6c17e24-5
|
||||
- Re-disable arch_supports_boot_order for ppc64le and add a BOOTFROM=d
|
||||
opt-in path that emits `-boot once=d` (and clears Proc.pm's persistent
|
||||
bootindex(0) on the CD). The previous "drop disable" change was wrong:
|
||||
on QEMU spapr, SLOF caches the chosen boot device in spapr-NVRAM, so
|
||||
`-boot once=d` is *not* a one-shot, and the post-install reboot loops
|
||||
back into the installer. With the new behavior an empty HDD naturally
|
||||
falls through to the installer CD on first boot, a populated HDD wins
|
||||
the post-install reboot, and tests that need CD-first when the HDD is
|
||||
already populated (install_resize_lvm) opt in via BOOTFROM=d.
|
||||
|
||||
* Thu Apr 23 2026 Andrew Lukoshko <alukoshko@almalinux.org> - 4.6^20230731git6c17e24-4
|
||||
- Drop the ppc64le "disable arch_supports_boot_order" bit from the
|
||||
AArch64/ppc64le QEMU backend patch. QEMU spapr supports -boot
|
||||
|
||||
Loading…
Reference in New Issue
Block a user