Skip to content

Commit c7555ea

Browse files
committed
Add kernel parameters to bootloader section
Add kernel parameters to bootloader section.
1 parent 8775c5d commit c7555ea

File tree

6 files changed

+39
-12
lines changed

6 files changed

+39
-12
lines changed

data/yam/agama/auto/lib/base.libsonnet

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,3 @@
1919
sshPublicKey: 'fake public key to enable sshd and open firewall',
2020
},
2121
}
22-
23-
{
24-
stop_timeout():: {
25-
stopOnBootMenu: true,
26-
},
27-
timeout():: {
28-
timeout: 15,
29-
},
30-
}

data/yam/agama/auto/template.libsonnet

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
local base_lib = import 'lib/base.libsonnet';
21
local addons_lib = import 'lib/addons.libsonnet';
2+
local base_lib = import 'lib/base.libsonnet';
33
local dasd_lib = import 'lib/dasd.libsonnet';
44
local iscsi_lib = import 'lib/iscsi.libsonnet';
55
local scripts_post_lib = import 'lib/scripts_post.libsonnet';
@@ -11,6 +11,7 @@ local security_lib = import 'lib/security.libsonnet';
1111

1212
function(bootloader=true,
1313
bootloader_timeout=false,
14+
bootloader_extra_kernel_params='',
1415
dasd=false,
1516
extra_repositories=false,
1617
files=false,
@@ -31,8 +32,12 @@ function(bootloader=true,
3132
ssl_certificates=false,
3233
storage='',
3334
user=true) {
34-
[if bootloader then 'bootloader']: base_lib.stop_timeout(),
35-
[if bootloader_timeout then 'bootloader']: base_lib.timeout(),
35+
[if bootloader || bootloader_timeout !='' ||
36+
bootloader_extra_kernel_params != '' then 'bootloader']: std.prune({
37+
stopOnBootMenu: if bootloader then true,
38+
timeout: if bootloader_timeout then 15,
39+
extraKernelParams: if bootloader_extra_kernel_params != '' then bootloader_extra_kernel_params,
40+
}),
3641
[if dasd == true then 'dasd']: dasd_lib.dasd(),
3742
[if files == true then 'files']: base_lib['files'],
3843
[if iscsi == true then 'iscsi']: iscsi_lib.iscsi(),

schedule/yam/agama_extended_unattended.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ schedule:
88
- installation/grub_test
99
- installation/first_boot
1010
- yam/validate/validate_hostname
11+
- yam/validate/validate_extra_kernel_params
1112
- yam/validate/validate_packages
1213
- yam/validate/validate_post_partitioning
1314
- yam/validate/validate_deployed_files

schedule/yam/agama_extended_unattended_ppc64le.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ schedule:
88
- yam/agama/agama
99
- installation/grub_test
1010
- installation/first_boot
11+
- yam/validate/validate_extra_kernel_params
1112
- yam/validate/validate_packages
1213
- yam/validate/validate_post_partitioning
1314
- yam/validate/validate_deployed_files

schedule/yam/agama_extended_unattended_s390x.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ schedule:
88
- yam/agama/agama
99
- boot/reconnect_mgmt_console
1010
- installation/first_boot
11+
- yam/validate/validate_extra_kernel_params
1112
- yam/validate/validate_packages
1213
- yam/validate/validate_post_partitioning
1314
- yam/validate/validate_deployed_files
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# SUSE's openQA tests
2+
#
3+
# Copyright 2025 SUSE LLC
4+
# SPDX-License-Identifier: FSFAP
5+
#
6+
# Summary: Validate the kernel param of processor.max_cstate=1
7+
# Maintainer: QE YaST and Migration (QE Yam) <qe-yam at suse de>
8+
9+
use base "consoletest";
10+
use testapi;
11+
12+
sub run {
13+
select_console 'root-console';
14+
my $output = script_output('cat /proc/cmdline');
15+
my $options = get_var('AGAMA_PROFILE_OPTIONS');
16+
17+
my ($params_str) = $options =~ /bootloader_extra_kernel_params="([^"]*)"/;
18+
my @params = split /,/, $params_str;
19+
20+
foreach my $param (@params) {
21+
unless ($output =~ /\Q$param\E/) {
22+
die "$param not found in kernel command line!";
23+
}
24+
}
25+
record_info('Extra Kernel Params', "Extra kernel parameters are present: $params_str");
26+
}
27+
28+
1;

0 commit comments

Comments
 (0)