Skip to content

Commit

Permalink
Merge pull request #20788 from okynos/169480-boot-agama-pvm-v2
Browse files Browse the repository at this point in the history
Boot Agama in OSD in PowerVM
  • Loading branch information
jknphy authored Dec 12, 2024
2 parents 69f9c96 + c6ff8b1 commit fa096ed
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/Distribution/Opensuse/AgamaDevel.pm
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ sub get_agama_up_an_running {
}

sub get_reboot {
return Yam::Agama::Pom::RebootTextmodePage->new() if is_s390x();
return Yam::Agama::Pom::RebootTextmodePage->new() if is_s390x() || is_ppc64le();
return Yam::Agama::Pom::RebootPage->new();
}

Expand Down
13 changes: 11 additions & 2 deletions lib/bootloader_pvm.pm
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,22 @@ sub enter_netboot_parameters {
record_info("Updated boot path for PPC64LE_GRUB_HTTP defined", $mntpoint);
}
my $ntlm_p = get_var('NTLM_AUTH_INSTALL') ? $ntlm_auth::ntlm_proxy : '';
type_string_slow "linux $mntpoint/linux vga=normal $ntlm_p install=$mirror ";
bootmenu_default_params;
if (get_var('AGAMA')) {
type_string_slow "linux $mntpoint/linux vga=normal root=live:http://" . get_var('OPENQA_HOSTNAME') . "/assets/iso/" . get_var('ISO');
type_string_slow " " . get_var('EXTRABOOTPARAMS');
}
else {
type_string_slow "linux $mntpoint/linux vga=normal $ntlm_p install=$mirror ";
}
# Skipping this setup due to it triggers general code for openSUSE that breaks powerVM scenario
bootmenu_default_params unless get_var('AGAMA');
bootmenu_network_source;
specific_bootmenu_params;
registration_bootloader_params(utils::VERY_SLOW_TYPING_SPEED) unless get_var('NTLM_AUTH_INSTALL');
type_string_slow remote_install_bootmenu_params;
type_string_slow " fips=1" if (get_var('FIPS_INSTALLATION'));
type_string_slow " UPGRADE=1" if (get_var('UPGRADE'));

send_key 'ret';
assert_screen "pvm-grub-command-line-fresh-prompt", 180, no_wait => 1; # kernel is downloaded while waiting
enter_cmd_slow "initrd $mntpoint/initrd";
Expand All @@ -151,6 +159,7 @@ sub prepare_pvm_installation {
enter_netboot_parameters;
enter_cmd "boot";
save_screenshot;
return if get_var('AGAMA');

# pvm has sometimes extrem performance issue, increase timeout for booting up after enter_netboot_parameters
assert_screen(["pvm-grub-menu", "novalink-successful-first-boot"], 300);
Expand Down
4 changes: 4 additions & 0 deletions lib/bootloader_setup.pm
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,10 @@ sub specific_bootmenu_params {
push @params, "autoupgrade=1";
}

if (my $agama_auto = get_var('AGAMA_AUTO')) {
type_string_slow " agama.auto=\"" . data_url($agama_auto) . "\"";
}

# Boot the system with the debug options if shutdown takes suspiciously long time.
# Please, see https://freedesktop.org/wiki/Software/systemd/Debugging/#index2h1 for the details.
# Further actions for saving debug logs are done in 'shutdown/cleanup_before_shutdown' module.
Expand Down
9 changes: 7 additions & 2 deletions tests/yam/agama/boot_agama.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later

# Summary: Boot to agama adding bootloader kernel parameters and expecting web ui up and running.
# At the moment redirecting to legacy handling for s390x booting.
# At the moment redirecting to legacy handling for remote architectures booting.
# Maintainer: QE YaST and Migration (QE Yam) <qe-yam at suse de>

use base "installbasetest";
Expand All @@ -21,11 +21,12 @@ BEGIN {
}
use bootloader_s390;
use bootloader_zkvm;
use bootloader_pvm;

sub run {
my $self = shift;

# for now using legacy code to handle s390x
# For now using legacy code to handle remote architectures
if (is_s390x()) {
if (is_backend_s390x()) {
record_info('bootloader_s390x');
Expand All @@ -36,6 +37,10 @@ sub run {
}
return;
}
elsif (is_pvm_hmc()) {
$self->bootloader_pvm::boot_pvm();
return;
}

my $grub_menu = $testapi::distri->get_grub_menu_agama();
my $grub_entry_edition = $testapi::distri->get_grub_entry_edition();
Expand Down

0 comments on commit fa096ed

Please sign in to comment.