Skip to content

Commit

Permalink
Boot agama in OSD in s390x with zVM
Browse files Browse the repository at this point in the history
Boot agama in OSD in s390x with zVM

Boot agama in OSD in s390x with zVM

Removed O3 host name reference

Changed osd credentials

Added ppc64le slow typing in SLE

Added dependency

Shorten s390x SLE URL

Fix typo

Changed FTP URL

Modified FTP command

Added sleep for testing

Check fixed OSD host

Fix last line removal on Agama

Modified if clause

Remove if case on line delete

Changed ftp line

Modified IP config s390x

Changed login

Removed unused code from parmfile

changed login

Improved regex of login

Improved regex

Changed login

Added sleep to debug

Set current hostname in the IP line

Added s390x hostname

Remove debug sleep

Added dynamic IP in parmfile

Added whitespace

Added subnet mask

Changed regex of login

Improved regex of login

Added hostname to the login regex

Fixed hostname fetch

Added testing sleep

Added s390x ca-certs patch

Added package installation

Fixed dynamic IP in TW and Leap

Added sleep to debug interface

Fixed REPO_HOST split

Remove sleep

Added short sleep to debug storage

Refactor dynamic IP selector

Move ca-certificates patch

Tidying the code

Minor fix

Removed workaround

Removed unused imports
  • Loading branch information
okynos committed Oct 9, 2024
1 parent 53efc6f commit 1422514
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 10 deletions.
23 changes: 19 additions & 4 deletions lib/susedistribution.pm
Original file line number Diff line number Diff line change
Expand Up @@ -571,10 +571,25 @@ sub init_consoles {
my $packed_ip = gethostbyname($s390_guest_fqdn);
die "Failed to get host by name for '$s390_guest_fqdn' (on " . hostname . ")" unless $packed_ip;
my $s390_guest_ip = inet_ntoa($packed_ip);
my $host_ip = get_var("AGAMA") ? 'hostip' : 'HostIP';
my $host_name = get_var("AGAMA") ? 'hostname' : 'Hostname';
$s390_params .= " $host_ip" . "=${s390_guest_ip}/${s390_guest_subnetmask}";
$s390_params .= " $host_name" . "=${s390_guest_hostname}";
if (get_var("AGAMA")) {
my @split = split(/\./, get_required_var("REPO_HOST"));
pop(@split);
my $s390_gateway_ip = join(".", @split, "254");
my $s390_device = "enca00";

@split = split(/\./, get_required_var("ZVM_GUEST"));
shift(@split);
my $s390_domain = join(".", @split);

if (is_sle()) {
$s390_device = "enc800";
}
$s390_params .= " ip=${s390_guest_ip}:${s390_guest_hostname}:${s390_gateway_ip}:${s390_guest_subnetmask}:${s390_domain}:${s390_device}:none";
}
else {
$s390_params .= " HostIP=${s390_guest_ip}/${s390_guest_subnetmask}";
$s390_params .= " Hostname" . "=${s390_guest_hostname}";
}
set_var("S390_NETWORK_PARAMS", $s390_params);

$hostname = $s390_guest_fqdn;
Expand Down
18 changes: 12 additions & 6 deletions tests/installation/bootloader_s390.pm
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ sub prepare_parmfile {
}

$params .= specific_bootmenu_params;
$params .= registration_bootloader_cmdline if check_var('SCC_REGISTER', 'installation');
unless (get_var("AGAMA")) {
$params .= registration_bootloader_cmdline if check_var('SCC_REGISTER', 'installation');
}

# Pass autoyast parameter for s390x, shorten the url because of 72 columns limit in x3270 xedit
# If 'AUTOYAST_PREPARE_PROFILE' is true, shorten url directly, otherwise shorten url with data_url method
Expand Down Expand Up @@ -176,18 +178,22 @@ EO_frickin_boot_parms
## an empty line and a single "manual=1" at the bottom
## of the ftpboot parmfile. This may fail in obscure
## ways when that changes.
$s3270->sequence_3270(qw(String(BOTTOM) ENTER String(DELETE) ENTER));
$s3270->sequence_3270(qw(String(BOTTOM) ENTER String(DELETE) ENTER));
## In Agama The "manual=1" line is not present so it is not required to delete it.
unless (get_var('AGAMA')) {
$s3270->sequence_3270(qw(String(BOTTOM) ENTER String(DELETE) ENTER));
$s3270->sequence_3270(qw(String(BOTTOM) ENTER String(DELETE) ENTER));

$r = $s3270->expect_3270(buffer_ready => qr/X E D I T/);
$r = $s3270->expect_3270(buffer_ready => qr/X E D I T/);
}

# save the parmfile. ftpboot then starts the installation.
$s3270->sequence_3270(qw( String(FILE) ENTER ));

if (get_var('AGAMA')) {
my ($hostname) = split(/\./, get_required_var("ZVM_GUEST"));
$r = $s3270->expect_3270(
output_delim => qr/o3zvm003 login/,
timeout => 400
output_delim => qr/$hostname login/,
timeout => 300
) || die "Login was not found";
$s3270->sequence_3270(qw(String("root") ENTER));

Expand Down

0 comments on commit 1422514

Please sign in to comment.