Skip to content

Commit

Permalink
Add setting to force install from MIRROR_HTTP on PXE boot
Browse files Browse the repository at this point in the history
This commit introduces the setting *FORCE_INSTALL_FROM_MIRROR_HTTP*,
which when set to true forces `boot/boot_from_pxe` to install the SUT
from the URL contained in *MIRROR_HTTP* (grub boot `install=` argument)
even when running in workers with a closer mirror.

Idea behind this is to allow workers to specify a combination of
*PXE_PRODUCT_NAME* and *MIRROR_HTTP* settings which will lead to a
proper installation of a product/build under test.
  • Loading branch information
alvarocarvajald committed Nov 21, 2024
1 parent a174761 commit 0313545
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/boot/boot_from_pxe.pm
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ sub run {
$image_name = get_var('PXE_PRODUCT_NAME') if get_var('PXE_PRODUCT_NAME');
$image_path = "/mounts/dist/install/SLP/${image_name}/${arch}/DVD1/boot/${arch}/loader/linux ";
$image_path .= "initrd=/mounts/dist/install/SLP/${image_name}/${arch}/DVD1/boot/${arch}/loader/initrd ";
$image_path .= "install=http://mirror.suse.cz/install/SLP/${image_name}/${arch}/DVD1$device ";
my $install_path = "install=http://mirror.suse.cz/install/SLP/${image_name}/${arch}/DVD1$device ";
$install_path = 'install=' . get_required_var('MIRROR_HTTP') . "$device " if (get_var('FORCE_INSTALL_FROM_MIRROR_HTTP'));
$image_path .= $install_path;
}
}
elsif (match_has_tag('pxe-menu')) {
Expand Down Expand Up @@ -185,6 +187,11 @@ sub run {
die 'PXE boot failed, installation repository likely does not exist'
if (check_screen('pxe-kernel-not-found', timeout => 5));

# Click 'Yes' if prompted to download a matching boot image
if (get_var('PXE_PRODUCT_NAME') && get_var('FORCE_INSTALL_FROM_MIRROR_HTTP')) {
send_key 'ret' if (check_screen('download-matching-boot-image', 420));
}

if (is_ipmi && !get_var('AUTOYAST')) {
my $ssh_vnc_wait_time = 420;
my $ssh_vnc_tag = eval { check_var('VIDEOMODE', 'text') ? 'sshd' : 'vnc' } . '-server-started';
Expand Down

0 comments on commit 0313545

Please sign in to comment.