Merge pull request #148 from rocky-linux/develop

Adding inter server tests
This commit is contained in:
Trevor Cooper 2023-02-09 09:24:57 -08:00 committed by GitHub
commit b0a55dee10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 593 additions and 24 deletions

View File

@ -434,7 +434,13 @@ sub repos_mirrorlist {
# have not been updated, and the infra repo is rejected as its
# metadata checksum isn't known to MM
my $files = shift;
$files ||= "/etc/yum.repos.d/fedora*.repo";
my $currentversion = get_var("CURRREL");
if ($currentversion eq '8') {
$files ||= "/etc/yum.repos.d/Rocky*.repo";
}
else {
$files ||= "/etc/yum.repos.d/rocky*.repo";
}
assert_script_run "sed -i -e 's,metalink,mirrorlist,g' ${files}";
}

View File

@ -0,0 +1,16 @@
{
"area": [
{
"type": "match",
"height": 16,
"ypos": 691,
"xpos": 324,
"width": 113
}
],
"properties": [],
"tags": [
"ENV-DISTRI-rocky",
"anaconda_install_destination_add_iscsi_target"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -0,0 +1,16 @@
{
"area": [
{
"height": 17,
"type": "match",
"ypos": 375,
"width": 65,
"xpos": 44
}
],
"properties": [],
"tags": [
"anaconda_install_destination_add_network_disk",
"ENV-DISTRI-rocky"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

@ -0,0 +1,16 @@
{
"area": [
{
"width": 18,
"xpos": 19,
"type": "match",
"height": 17,
"ypos": 227
}
],
"properties": [],
"tags": [
"ENV-DISTRI-rocky",
"anaconda_install_destination_select_target"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -0,0 +1,16 @@
{
"area": [
{
"xpos": 426,
"width": 88,
"type": "match",
"height": 17,
"ypos": 313
}
],
"properties": [],
"tags": [
"ENV-DISTRI-rocky",
"anaconda_install_destination_target_auth_type"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

@ -0,0 +1,16 @@
{
"area": [
{
"xpos": 421,
"width": 83,
"type": "match",
"height": 20,
"ypos": 342
}
],
"properties": [],
"tags": [
"ENV-DISTRI-rocky",
"anaconda_install_destination_target_auth_type_chap"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@ -0,0 +1,16 @@
{
"area": [
{
"type": "match",
"height": 18,
"ypos": 557,
"width": 43,
"xpos": 748
}
],
"properties": [],
"tags": [
"ENV-DISTRI-rocky",
"anaconda_install_destination_target_login"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@ -0,0 +1,16 @@
{
"area": [
{
"ypos": 173,
"height": 20,
"type": "match",
"width": 55,
"xpos": 784
}
],
"properties": [],
"tags": [
"ENV-DISTRI-rocky",
"anaconda_part_device_modify"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -0,0 +1,17 @@
{
"area": [
{
"width": 76,
"xpos": 251,
"height": 16,
"type": "match",
"ypos": 363
}
],
"properties": [],
"tags": [
"anaconda_part_device_sda",
"anaconda_part_device_sda_selected",
"ENV-DISTRI-rocky"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -0,0 +1,16 @@
{
"area": [
{
"xpos": 713,
"width": 46,
"height": 17,
"type": "match",
"ypos": 478
}
],
"properties": [],
"tags": [
"ENV-DISTRI-rocky",
"anaconda_part_device_select"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -0,0 +1,16 @@
{
"area": [
{
"xpos": 203,
"ypos": 279,
"width": 227,
"height": 21,
"type": "match"
}
],
"properties": [],
"tags": [
"ENV-DISTRI-rocky",
"bootloader_bios"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -0,0 +1,16 @@
{
"area": [
{
"xpos": 50,
"width": 161,
"ypos": 335,
"height": 17,
"type": "match"
}
],
"properties": [],
"tags": [
"ENV-DISTRI-rocky",
"bootloader"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -568,6 +568,37 @@
"USER_LOGIN": "qwerty"
}
},
"install_iscsi": {
"profiles": {
"rocky-universal-aarch64-*-aarch64": 40,
"rocky-universal-x86_64-*-64bit": 40
},
"settings": {
"ANACONDA_STATIC": "172.16.2.111",
"INSTALL_UNLOCK": "support_ready",
"NICTYPE": "tap",
"PARALLEL_WITH": "support_server",
"PARTITIONING": "custom_iscsi",
"ROOT_PASSWORD": "weakpassword",
"WORKER_CLASS": "tap"
}
},
"install_kickstart_nfs": {
"profiles": {
"rocky-universal-aarch64-*-aarch64": 30,
"rocky-universal-x86_64-*-64bit": 30
},
"settings": {
"GRUB": "inst.ks=nfs:172.16.2.110:/export/root-user-crypted-net.ks",
"INSTALL_UNLOCK": "support_ready",
"KICKSTART": "1",
"NICTYPE": "tap",
"PARALLEL_WITH": "support_server",
"ROOT_PASSWORD": "111111",
"USER_LOGIN": "false",
"WORKER_CLASS": "tap"
}
},
"install_lvmthin": {
"profiles": {
"rocky-universal-aarch64-*-aarch64": 40,
@ -744,6 +775,45 @@
"DESKTOP": "false"
}
},
"install_repository_nfs_graphical": {
"profiles": {
"rocky-dvd-iso-aarch64-*-aarch64": 30,
"rocky-dvd-iso-x86_64-*-64bit": 30
},
"settings": {
"INSTALL_UNLOCK": "support_ready",
"NICTYPE": "tap",
"PARALLEL_WITH": "support_server",
"REPOSITORY_GRAPHICAL": "nfs:nfsvers=4:172.16.2.110:/repo",
"WORKER_CLASS": "tap"
}
},
"install_repository_nfs_variation": {
"profiles": {
"rocky-dvd-iso-aarch64-*-aarch64": 30,
"rocky-dvd-iso-x86_64-*-64bit": 30
},
"settings": {
"INSTALL_UNLOCK": "support_ready",
"NICTYPE": "tap",
"PARALLEL_WITH": "support_server",
"REPOSITORY_VARIATION": "nfs:nfsvers=4:172.16.2.110:/repo",
"WORKER_CLASS": "tap"
}
},
"install_repository_nfsiso_variation": {
"profiles": {
"rocky-dvd-iso-aarch64-*-aarch64": 30,
"rocky-dvd-iso-x86_64-*-64bit": 30
},
"settings": {
"INSTALL_UNLOCK": "support_ready",
"NICTYPE": "tap",
"PARALLEL_WITH": "support_server",
"REPOSITORY_VARIATION": "nfs:nfsvers=4:172.16.2.110:/iso/image.iso",
"WORKER_CLASS": "tap"
}
},
"install_rescue_encrypted": {
"profiles": {
"rocky-universal-aarch64-*-aarch64": 31,
@ -865,6 +935,80 @@
"DESKTOP": "false"
}
},
"install_updates_nfs": {
"profiles": {
"rocky-dvd-iso-aarch64-*-aarch64": 40,
"rocky-dvd-iso-x86_64-*-64bit": 40
},
"settings": {
"GRUB": "inst.stage2=nfs:nfsvers=4:172.16.2.110:/repo",
"INSTALL_UNLOCK": "support_ready",
"NICTYPE": "tap",
"PARALLEL_WITH": "support_server",
"QEMURAM": "3072",
"TEST_UPDATES": "1",
"WORKER_CLASS": "tap"
}
},
"install_vnc_client": {
"profiles": {
"rocky-dvd-iso-aarch64-*-aarch64": 40,
"rocky-dvd-iso-x86_64-*-64bit": 40
},
"settings": {
"BOOTFROM": "c",
"DESKTOP": "gnome",
"HDD_1": "disk_rocky%CURRREL%_desktop_%ARCH%.qcow2",
"INSTALL": "1",
"NICTYPE": "tap",
"PARALLEL_WITH": "install_vnc_server",
"PREINSTALL": "_vnc_client_connect_pre _graphical_wait_login _vnc_client_connect",
"VNC_CLIENT": "1",
"WORKER_CLASS": "tap"
}
},
"install_vnc_server": {
"profiles": {
"rocky-dvd-iso-aarch64-*-aarch64": 40,
"rocky-dvd-iso-x86_64-*-64bit": 40
},
"settings": {
"GRUB": "inst.vnc net.ifnames=0 biosdevname=0 ip=172.16.2.114::172.16.2.2:255.255.255.0:vnc001.test.openqa.fedoraproject.org:eth0:off",
"NICTYPE": "tap",
"VNC_SERVER": "1",
"WORKER_CLASS": "tap"
}
},
"install_vncconnect_client": {
"profiles": {
"rocky-dvd-iso-aarch64-*-aarch64": 40,
"rocky-dvd-iso-x86_64-*-64bit": 40
},
"settings": {
"BOOTFROM": "c",
"DESKTOP": "gnome",
"HDD_1": "disk_rocky%CURRREL%_desktop_%ARCH%.qcow2",
"INSTALL": "1",
"NICTYPE": "tap",
"PREINSTALL": "_vncconnect_client_setup_pre _graphical_wait_login _vncconnect_client_setup",
"VNC_CLIENT": "1",
"WORKER_CLASS": "tap"
}
},
"install_vncconnect_server": {
"profiles": {
"rocky-dvd-iso-aarch64-*-aarch64": 40,
"rocky-dvd-iso-x86_64-*-64bit": 40
},
"settings": {
"GRUB": "inst.vnc inst.vncconnect=172.16.2.117:5500 net.ifnames=0 biosdevname=0 ip=172.16.2.116::172.16.2.2:255.255.255.0:vnc003.test.openqa.fedoraproject.org:eth0:off",
"INSTALL_UNLOCK": "vncconnect_client_ready",
"NICTYPE": "tap",
"PARALLEL_WITH": "install_vncconnect_client",
"VNC_SERVER": "1",
"WORKER_CLASS": "tap"
}
},
"install_xfs": {
"profiles": {
"rocky-universal-aarch64-*-aarch64": 40,
@ -902,6 +1046,42 @@
"USER_LOGIN": "false"
}
},
"realmd_join_cockpit": {
"profiles": {
"rocky-dvd-iso-aarch64-*-aarch64": 30,
"rocky-dvd-iso-x86_64-*-64bit": 30
},
"settings": {
"+HDD_1": "disk_%MACHINE%_cockpit.qcow2",
"+START_AFTER_TEST": "server_cockpit_default",
"BOOTFROM": "c",
"NICTYPE": "tap",
"PARALLEL_WITH": "server_role_deploy_domain_controller",
"POSTINSTALL": "realmd_join_cockpit freeipa_webui freeipa_password_change freeipa_client",
"POST_STATIC": "172.16.2.102 client002.test.openqa.fedoraproject.org",
"ROOT_PASSWORD": "weakpassword",
"USER_LOGIN": "false",
"WORKER_CLASS": "tap"
}
},
"realmd_join_sssd": {
"profiles": {
"rocky-dvd-iso-aarch64-*-aarch64": 20,
"rocky-dvd-iso-x86_64-*-64bit": 20
},
"settings": {
"BOOTFROM": "c",
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
"NICTYPE": "tap",
"PARALLEL_WITH": "server_role_deploy_domain_controller",
"POSTINSTALL": "realmd_join_sssd freeipa_client",
"POST_STATIC": "172.16.2.103 client003.test.openqa.fedoraproject.org",
"ROOT_PASSWORD": "weakpassword",
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%",
"USER_LOGIN": "false",
"WORKER_CLASS": "tap"
}
},
"release_identification": {
"profiles": {
"rocky-dvd-iso-aarch64-*-aarch64": 40,
@ -959,6 +1139,24 @@
"USER_LOGIN": "false"
}
},
"server_database_client": {
"profiles": {
"rocky-dvd-iso-aarch64-*-aarch64": 30,
"rocky-dvd-iso-x86_64-*-64bit": 30
},
"settings": {
"BOOTFROM": "c",
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
"NICTYPE": "tap",
"PARALLEL_WITH": "server_role_deploy_database_server",
"POSTINSTALL": "database_client",
"POST_STATIC": "172.16.2.105 dbclient.test.openqa.fedoraproject.org",
"ROOT_PASSWORD": "weakpassword",
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%",
"USER_LOGIN": "false",
"WORKER_CLASS": "tap"
}
},
"server_filesystem_default": {
"profiles": {
"rocky-dvd-iso-aarch64-*-aarch64": 20,
@ -986,6 +1184,176 @@
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%",
"USER_LOGIN": "false"
}
},
"server_freeipa_replication_client": {
"profiles": {
"rocky-dvd-iso-aarch64-*-aarch64": 30,
"rocky-dvd-iso-x86_64-*-64bit": 20
},
"settings": {
"BOOTFROM": "c",
"FREEIPA_REPLICA_CLIENT": "1",
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
"NICTYPE": "tap",
"PARALLEL_WITH": "server_freeipa_replication_replica",
"POSTINSTALL": "realmd_join_sssd freeipa_client",
"POST_STATIC": "172.16.2.108 client005.test.openqa.fedoraproject.org",
"ROOT_PASSWORD": "weakpassword",
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%",
"USER_LOGIN": "false",
"WORKER_CLASS": "tap"
}
},
"server_freeipa_replication_master": {
"profiles": {
"rocky-dvd-iso-aarch64-*-aarch64": 30,
"rocky-dvd-iso-x86_64-*-64bit": 20
},
"settings": {
"BOOTFROM": "c",
"FREEIPA_REPLICA_MASTER": "1",
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
"NICTYPE": "tap",
"PARALLEL_CANCEL_WHOLE_CLUSTER": "0",
"POSTINSTALL": "role_deploy_domain_controller role_deploy_domain_controller_check",
"POST_STATIC": "172.16.2.106 ipa002.test.openqa.fedoraproject.org",
"ROOT_PASSWORD": "weakpassword",
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%",
"USER_LOGIN": "false",
"WORKER_CLASS": "tap"
}
},
"server_freeipa_replication_replica": {
"profiles": {
"rocky-dvd-iso-aarch64-*-aarch64": 30,
"rocky-dvd-iso-x86_64-*-64bit": 20
},
"settings": {
"BOOTFROM": "c",
"FREEIPA_REPLICA": "1",
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
"NICTYPE": "tap",
"PARALLEL_CANCEL_WHOLE_CLUSTER": "0",
"PARALLEL_WITH": "server_freeipa_replication_master",
"POSTINSTALL": "realmd_join_sssd",
"POST_STATIC": "172.16.2.107 ipa003.test.openqa.fedoraproject.org",
"ROOT_PASSWORD": "weakpassword",
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%",
"USER_LOGIN": "false",
"WORKER_CLASS": "tap"
}
},
"server_realmd_join_kickstart": {
"profiles": {
"rocky-dvd-iso-aarch64-*-aarch64": 20,
"rocky-dvd-iso-x86_64-*-64bit": 20
},
"settings": {
"GRUB": "inst.ks=hd:vdb1:/freeipaclient.ks",
"HDD_2": "disk_ks-%CURRREL%.img",
"INSTALL_UNLOCK": "freeipa_ready",
"KICKSTART": "1",
"NICTYPE": "tap",
"NUMDISKS": "2",
"PARALLEL_WITH": "server_role_deploy_domain_controller",
"POSTINSTALL": "freeipa_client",
"ROOT_PASSWORD": "anaconda",
"USER_LOGIN": "false",
"WORKER_CLASS": "tap"
}
},
"server_remote_logging_client": {
"profiles": {
"rocky-dvd-iso-aarch64-*-aarch64": 20,
"rocky-dvd-iso-x86_64-*-64bit": 20
},
"settings": {
"BOOTFROM": "c",
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
"NICTYPE": "tap",
"PARALLEL_WITH": "server_remote_logging_server",
"POSTINSTALL": "server_remote_logging_client",
"POST_STATIC": "172.16.2.113 rsyslogclient.test.openqa.fedoraproject.org",
"ROOT_PASSWORD": "weakpassword",
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%",
"USER_LOGIN": "false",
"WORKER_CLASS": "tap"
}
},
"server_remote_logging_server": {
"profiles": {
"rocky-dvd-iso-aarch64-*-aarch64": 20,
"rocky-dvd-iso-x86_64-*-64bit": 20
},
"settings": {
"BOOTFROM": "c",
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
"NICTYPE": "tap",
"PARALLEL_CANCEL_WHOLE_CLUSTER": "0",
"POSTINSTALL": "server_remote_logging_server",
"POST_STATIC": "172.16.2.112 rsyslogserver.test.openqa.fedoraproject.org",
"ROOT_PASSWORD": "weakpassword",
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%",
"USER_LOGIN": "false",
"WORKER_CLASS": "tap"
}
},
"server_role_deploy_database_server": {
"profiles": {
"rocky-dvd-iso-aarch64-*-aarch64": 20,
"rocky-dvd-iso-x86_64-*-64bit": 20
},
"settings": {
"BOOTFROM": "c",
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
"NICTYPE": "tap",
"PARALLEL_CANCEL_WHOLE_CLUSTER": "0",
"POSTINSTALL": "role_deploy_database_server",
"POST_STATIC": "172.16.2.104 db.test.openqa.fedoraproject.org",
"ROOT_PASSWORD": "weakpassword",
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%",
"USER_LOGIN": "false",
"WORKER_CLASS": "tap"
}
},
"server_role_deploy_domain_controller": {
"profiles": {
"rocky-dvd-iso-aarch64-*-aarch64": 20,
"rocky-dvd-iso-x86_64-*-64bit": 20
},
"settings": {
"BOOTFROM": "c",
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
"NICTYPE": "tap",
"PARALLEL_CANCEL_WHOLE_CLUSTER": "0",
"POSTINSTALL": "role_deploy_domain_controller role_deploy_domain_controller_check",
"POST_STATIC": "172.16.2.100 ipa001.test.openqa.fedoraproject.org",
"ROOT_PASSWORD": "weakpassword",
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%",
"USER_LOGIN": "false",
"WORKER_CLASS": "tap"
}
},
"support_server": {
"profiles": {
"rocky-dvd-iso-aarch64-*-aarch64": 10,
"rocky-dvd-iso-x86_64-*-64bit": 10,
"rocky-universal-aarch64-*-aarch64": 10,
"rocky-universal-x86_64-*-64bit": 10
},
"settings": {
"BOOTFROM": "c",
"HDD_1": "disk_rocky%CURRREL%_support_%ARCH%.qcow2",
"NICTYPE": "tap",
"NUMDISKS": "2",
"PARALLEL_CANCEL_WHOLE_CLUSTER": "0",
"POSTINSTALL": "_support_server",
"POST_STATIC": "172.16.2.110 support.test.openqa.rockylinux.org",
"ROOT_PASSWORD": "weakpassword",
"TEST_TARGET": "NONE",
"USER_LOGIN": "false",
"WORKER_CLASS": "tap"
}
}
}
}

View File

@ -90,7 +90,7 @@ sub run {
# match for the installer bootloader if it hangs around for a
# while after do_bootloader finishes (in PXE case it does)
sleep 20;
assert_screen "bootloader", 1800;
assert_screen "bootloader", 3600;
}
else {
if (get_var("ANACONDA_TEXT")) {

View File

@ -8,11 +8,14 @@ use tapnet;
use utils;
sub _pxe_setup {
# This happens before local DNS server is running and dnf will fail. Temporarily add 8.8.8.8 to resolve.conf
assert_script_run "echo 'nameserver 8.8.8.8' >> /etc/resolv.conf";
# set up PXE server (via dnsmasq). Not used for update tests.
# don't get hung up on slow mirrors when DNFing...
repos_mirrorlist;
# create necessary dirs
assert_script_run "mkdir -p /var/lib/tftpboot/fedora";
assert_script_run "mkdir -p /var/lib/tftpboot/rocky";
# basic tftp config
assert_script_run "printf 'enable-tftp\ntftp-root=/var/lib/tftpboot\ntftp-secure\n' >> /etc/dnsmasq.conf";
# pxe boot config
@ -23,7 +26,7 @@ sub _pxe_setup {
# install and configure bootloaders
my $ourversion = get_var("CURRREL");
my $testversion = get_var("RELEASE");
assert_script_run "mkdir -p /var/tmp/fedora";
assert_script_run "mkdir -p /var/tmp/rocky";
my $arch = get_var("ARCH");
if ($arch eq 'x86_64') {
@ -31,15 +34,23 @@ sub _pxe_setup {
assert_script_run "mkdir -p /var/lib/tftpboot/pxelinux.cfg";
# install bootloader packages
assert_script_run "dnf -y install syslinux", 120;
assert_script_run "dnf -y --releasever=$ourversion --installroot=/var/tmp/fedora install shim-x64 grub2-efi-x64", 300;
assert_script_run "rpm --root=/var/tmp/rocky --rebuilddb", 60;
assert_script_run "cd /var/tmp; dnf download rocky-release rocky-repos rocky-gpg-keys", 60;
assert_script_run "rpm --root=/var/tmp/rocky --nodeps -i /var/tmp/*.rpm", 60;
#assert_script_run "sed -i /var/tmp/rocky/etc/yum.repos.d/Rocky-*.repo -e 's/repo=/repo=rocky-/g'", 60;
assert_script_run "dnf -y --releasever=$ourversion --refresh --installroot=/var/tmp/rocky install shim-x64 grub2-efi-x64", 1800;
# copy bootloader files to tftp root
assert_script_run "cp /usr/share/syslinux/{pxelinux.0,vesamenu.c32,ldlinux.c32,libcom32.c32,libutil.c32} /var/lib/tftpboot";
assert_script_run "cp /var/tmp/fedora/boot/efi/EFI/fedora/{shim.efi,grubx64.efi} /var/lib/tftpboot";
assert_script_run "cp /var/tmp/rocky/boot/efi/EFI/rocky/{shimx64.efi,shimx64-rocky.efi,grubx64.efi} /var/lib/tftpboot";
# bootloader configs
# BIOS
assert_script_run "printf 'default vesamenu.c32\nprompt 1\ntimeout 600\n\nlabel linux\n menu label ^Install Fedora 64-bit\n menu default\n kernel fedora/vmlinuz\n append initrd=fedora/initrd.img inst.ks=file:///ks.cfg ip=dhcp\nlabel local\n menu label Boot from ^local drive\n localboot 0xffff\n' >> /var/lib/tftpboot/pxelinux.cfg/default";
assert_script_run "printf 'default vesamenu.c32\nprompt 1\ntimeout 600\n\nlabel linux\n menu label ^Install Rocky Linux 64-bit\n menu default\n kernel rocky/vmlinuz\n append initr
d=rocky/initrd.img inst.ks=file:///ks.cfg ip=dhcp\nlabel local\n menu label Boot from ^local drive\n localboot 0xffff\n' >> /var/lib/tftpboot/pxelinux.cfg/default";
# UEFI
assert_script_run "printf 'function load_video {\n insmod efi_gop\n insmod efi_uga\n insmod ieee1275_fb\n insmod vbe\n insmod vga\n insmod video_bochs\n insmod video_cirrus\n}\n\nload_video\nset gfxpayload=keep\ninsmod gzio\n\nmenuentry \"Install Fedora 64-bit\" --class fedora --class gnu-linux --class gnu --class os {\n linuxefi fedora/vmlinuz ip=dhcp inst.ks=file:///ks.cfg\n initrdefi fedora/initrd.img\n}' >> /var/lib/tftpboot/grub.cfg";
assert_script_run "printf 'function load_video {\n insmod efi_gop\n insmod efi_uga\n insmod ieee1275_fb\n insmod vbe\n insmod vga\n insmod video_bochs\n insmod video_cirrus\n}\
n\nload_video\nset gfxpayload=keep\ninsmod gzio\n\nmenuentry \"Install Rocky Linux 64-bit\" --class rocky --class gnu-linux --class gnu --class os {\n linuxefi rocky/vmlinuz ip=dhcp inst.ks=
file:///ks.cfg\n initrdefi rocky/initrd.img\n}' >> /var/lib/tftpboot/grub.cfg";
# DEBUG DEBUG
upload_logs "/etc/dnsmasq.conf";
upload_logs "/var/lib/tftpboot/grub.cfg";
@ -49,11 +60,11 @@ sub _pxe_setup {
elsif ($arch eq 'ppc64le') {
# ppc64le: use grub2 for OFW
# install bootloader tools package
assert_script_run "dnf -y install grub2-tools-extra", 180;
assert_script_run "dnf -y install grub2-tools-extra", 360;
# install a network bootloader to tftp root
assert_script_run "grub2-mknetdir --net-directory=/var/lib/tftpboot";
# bootloader config
assert_script_run "printf 'set default=0\nset timeout=5\n\nmenuentry \"Install Fedora 64-bit\" --class fedora --class gnu-linux --class gnu --class os {\n linux fedora/vmlinuz ip=dhcp inst.ks=file:///ks.cfg\n initrd fedora/initrd.img\n}' >> /var/lib/tftpboot/boot/grub2/grub.cfg";
assert_script_run "printf 'set default=0\nset timeout=5\n\nmenuentry \"Install Rocky Linux\" --class rocky --class gnu-linux --class gnu --class os {\n linux rocky/vmlinuz ip=dhcp inst.ks=file:///ks.cfg\n initrd rocky/initrd.img\n}' >> /var/lib/tftpboot/boot/grub2/grub.cfg";
# DEBUG DEBUG
upload_logs "/etc/dnsmasq.conf";
upload_logs "/var/lib/tftpboot/boot/grub2/grub.cfg";
@ -63,9 +74,9 @@ sub _pxe_setup {
# aarch64: use grub2 with 'linux' for UEFI
# copy bootloader files to tftp root (we just use the system
# bootloader, no need to install packages)
assert_script_run "cp /boot/efi/EFI/fedora/{shim.efi,grubaa64.efi} /var/lib/tftpboot";
assert_script_run "cp /boot/efi/EFI/rocky/{shim.efi,grubaa64.efi} /var/lib/tftpboot";
# bootloader config
assert_script_run "printf 'function load_video {\n insmod efi_gop\n insmod efi_uga\n insmod ieee1275_fb\n insmod vbe\n insmod vga\n insmod video_bochs\n insmod video_cirrus\n}\n\nload_video\nset gfxpayload=keep\ninsmod gzio\n\nmenuentry \"Install Fedora 64-bit\" --class fedora --class gnu-linux --class gnu --class os {\n linux fedora/vmlinuz ip=dhcp inst.ks=file:///ks.cfg\n initrd fedora/initrd.img\n}' >> /var/lib/tftpboot/grub.cfg";
assert_script_run "printf 'function load_video {\n insmod efi_gop\n insmod efi_uga\n insmod ieee1275_fb\n insmod vbe\n insmod vga\n insmod video_bochs\n insmod video_cirrus\n}\n\nload_video\nset gfxpayload=keep\ninsmod gzio\n\nmenuentry \"Install Rocky Linux\" --class rocky --class gnu-linux --class gnu --class os {\n linux rocky/vmlinuz ip=dhcp inst.ks=file:///ks.cfg\n initrd rocky/initrd.img\n}' >> /var/lib/tftpboot/grub.cfg";
# DEBUG DEBUG
upload_logs "/etc/dnsmasq.conf";
upload_logs "/var/lib/tftpboot/grub.cfg";
@ -76,15 +87,15 @@ sub _pxe_setup {
my $kernpath = "images/pxeboot";
# for some crazy reason these are in a different place for ppc64
$kernpath = "ppc/ppc64" if ($arch eq 'ppc64le');
assert_script_run "curl -o /var/lib/tftpboot/fedora/vmlinuz $location/Everything/${arch}/os/${kernpath}/vmlinuz";
assert_script_run "curl -o /var/lib/tftpboot/fedora/initrd.img $location/Everything/${arch}/os/${kernpath}/initrd.img";
assert_script_run "curl -o /var/lib/tftpboot/rocky/vmlinuz $location/BaseOS/${arch}/os/${kernpath}/vmlinuz";
assert_script_run "curl -o /var/lib/tftpboot/rocky/initrd.img $location/BaseOS/${arch}/os/${kernpath}/initrd.img";
# get a kickstart to embed in the initramfs, for testing:
# https://fedoraproject.org/wiki/QA:Testcase_Kickstart_File_Path_Ks_Cfg
assert_script_run "curl -o ks.cfg https://fedorapeople.org/groups/qa/kickstarts/root-user-crypted-net.ks";
assert_script_run "curl -o ks.cfg https://git.rockylinux.org/tcooper/kickstarts/-/raw/main/root-user-crypted-net.ks";
# tweak the repo config in it
assert_script_run "sed -i -e 's,^url.*,nfs --server 172.16.2.110 --dir /repo --opts nfsvers=4,g' ks.cfg";
assert_script_run "sed -i -e 's,^url.*,nfs --server=nfs://172.16.2.110 --dir=/repo --opts=nfsver=4,g' ks.cfg";
# embed it
assert_script_run "echo ks.cfg | cpio -c -o >> /var/lib/tftpboot/fedora/initrd.img";
assert_script_run "echo ks.cfg | cpio -c -o >> /var/lib/tftpboot/rocky/initrd.img";
# chown root
assert_script_run "chown -R dnsmasq /var/lib/tftpboot";
assert_script_run "restorecon -vr /var/lib/tftpboot";
@ -103,7 +114,7 @@ sub run {
}
## DNS / DHCP (dnsmasq)
# create config
assert_script_run "printf 'domain=test.openqa.fedoraproject.org\ndhcp-range=172.16.2.150,172.16.2.199\ndhcp-option=option:router,172.16.2.2\n' > /etc/dnsmasq.conf";
assert_script_run "printf 'domain=test.openqa.rockylinux.org\ndhcp-range=172.16.2.150,172.16.2.199\ndhcp-option=option:router,172.16.2.2\n' > /etc/dnsmasq.conf";
# do PXE setup if this is not an update test
_pxe_setup() unless (get_var("ADVISORY_OR_TASK"));
# open firewall ports
@ -116,18 +127,25 @@ sub run {
## ISCSI
# start up iscsi target
assert_script_run "printf '<target iqn.2016-06.local.domain:support.target1>\n backing-store /dev/vdb\n incominguser test weakpassword\n</target>' > /etc/tgt/conf.d/openqa.conf";
#assert_script_run "printf '<target iqn.2016-06.local.domain:support.target1>\n backing-store /dev/vdb\n incominguser test weakpassword\n</target>' > /etc/tgt/conf.d/openqa.conf";
assert_script_run "targetcli /backstores/block create dev=/dev/vdb name=vdb";
assert_script_run "targetcli /iscsi create wwn=iqn.2016-06.local.domain:support.target1";
assert_script_run "targetcli /iscsi/iqn.2016-06.local.domain:support.target1/tpg1/acls create iqn.2016-06.local.domain:support.target1";
assert_script_run "targetcli /iscsi/iqn.2016-06.local.domain:support.target1/tpg1 set attribute authentication=1";
assert_script_run "targetcli /iscsi/iqn.2016-06.local.domain:support.target1/tpg1/acls/iqn.2016-06.local.domain:support.target1 set auth userid=test password=weakpassword";
assert_script_run "targetcli /iscsi/iqn.2016-06.local.domain:support.target1/tpg1/luns create /backstores/block/vdb";
assert_script_run "targetcli / saveconfig";
# open firewall port
assert_script_run "firewall-cmd --add-service=iscsi-target";
assert_script_run "systemctl restart tgtd.service";
assert_script_run "systemctl is-active tgtd.service";
assert_script_run "firewall-cmd --add-port=3260/tcp";
assert_script_run "systemctl restart target.service";
assert_script_run "systemctl is-active target.service";
## NFS
# create the file share
assert_script_run "mkdir -p /export";
# get the kickstart
assert_script_run "curl -o /export/root-user-crypted-net.ks https://fedorapeople.org/groups/qa/kickstarts/root-user-crypted-net.ks";
assert_script_run "curl -o /export/root-user-crypted-net.ks https://git.rockylinux.org/tcooper/kickstarts/-/raw/main/root-user-crypted-net.ks";
# for update tests, set up the update repository and export it
if (get_var("ADVISORY_OR_TASK")) {
assert_script_run "echo '/opt/update_repo 172.16.2.0/24(ro)' >> /etc/exports";
@ -142,7 +160,7 @@ sub run {
assert_script_run "mount /dev/cdrom /mnt/iso";
# copy the contents of the ISO to the repo share
assert_script_run "dnf -y install rsync", 180;
assert_script_run "rsync -av /mnt/iso/ /repo", 180;
assert_script_run "rsync -av /mnt/iso/ /repo", 360;
# put the updates image in the NFS repo (for testing this update
# image delivery method)
assert_script_run "curl -o /repo/images/updates.img https://fedorapeople.org/groups/qa/updates/updates-openqa.img";