From 950bbfbd956860d2044d3bbfaa943cb757b309e2 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mon, 9 Nov 2020 16:10:17 -0800 Subject: [PATCH] Split iscsi server out from support_server Combining the old universal tests into server-dvd-iso gives us a big cluster (9 jobs), which isn't ideal for smaller pet deployments. Let's split it up. This splits out the iSCSI server job into a separate test, to start with. Signed-off-by: Adam Williamson --- templates.fif.json | 25 ++++++++++++++++++++++--- tests/_iscsi_server.pm | 28 ++++++++++++++++++++++++++++ tests/_support_server.pm | 8 -------- tests/disk_custom_iscsi.pm | 2 +- 4 files changed, 51 insertions(+), 12 deletions(-) create mode 100644 tests/_iscsi_server.pm diff --git a/templates.fif.json b/templates.fif.json index 55a9764d..4ee84ebe 100644 --- a/templates.fif.json +++ b/templates.fif.json @@ -1090,9 +1090,9 @@ }, "settings": { "ANACONDA_STATIC": "172.16.2.111", - "INSTALL_UNLOCK": "support_ready", + "INSTALL_UNLOCK": "iscsi_server_ready", "NICTYPE": "tap", - "PARALLEL_WITH": "support_server", + "PARALLEL_WITH": "iscsi_server", "PARTITIONING": "custom_iscsi", "ROOT_PASSWORD": "weakpassword", "WORKER_CLASS": "tap" @@ -1668,7 +1668,26 @@ "WORKER_CLASS": "tap" } }, - + "iscsi_server": { + "profiles": { + "fedora-Server-dvd-iso-aarch64-*-aarch64": 10, + "fedora-Server-dvd-iso-ppc64le-*-ppc64le": 10, + "fedora-Server-dvd-iso-x86_64-*-64bit": 10 + }, + "settings": { + "BOOTFROM": "c", + "HDD_1": "disk_f%CURRREL%_support_5_%ARCH%.img", + "NICTYPE": "tap", + "NUMDISKS": "2", + "PARALLEL_CANCEL_WHOLE_CLUSTER": "0", + "POSTINSTALL": "_iscsi_server", + "POST_STATIC": "172.16.2.120 iscsi.domain.local", + "ROOT_PASSWORD": "weakpassword", + "TEST_TARGET": "NONE", + "USER_LOGIN": "false", + "WORKER_CLASS": "tap" + } + }, "mediakit_fileconflicts": { "profiles": { "fedora-Server-dvd-iso-aarch64-*-aarch64": 10, diff --git a/tests/_iscsi_server.pm b/tests/_iscsi_server.pm new file mode 100644 index 00000000..69e87ac5 --- /dev/null +++ b/tests/_iscsi_server.pm @@ -0,0 +1,28 @@ +use base "installedtest"; +use strict; +use testapi; +use lockapi; +use mmapi; + +sub run { + my $self = shift; + # start up iscsi target + assert_script_run "printf '\n backing-store /dev/vdb\n incominguser test weakpassword\n' > /etc/tgt/conf.d/openqa.conf"; + # 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"; + # report ready, wait for children + mutex_create('iscsi_server_ready'); + wait_for_children; + # upload logs in case of child failures + $self->post_fail_hook(); +} + +sub test_flags { + return { fatal => 1 }; +} + +1; + +# vim: set sw=4 et: diff --git a/tests/_support_server.pm b/tests/_support_server.pm index f335779d..52512c7b 100644 --- a/tests/_support_server.pm +++ b/tests/_support_server.pm @@ -113,14 +113,6 @@ sub run { assert_script_run "systemctl restart dnsmasq.service"; assert_script_run "systemctl is-active dnsmasq.service"; - ## ISCSI - - # start up iscsi target - assert_script_run "printf '\n backing-store /dev/vdb\n incominguser test weakpassword\n' > /etc/tgt/conf.d/openqa.conf"; - # 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"; ## NFS diff --git a/tests/disk_custom_iscsi.pm b/tests/disk_custom_iscsi.pm index 706aa2c6..85d4de5e 100644 --- a/tests/disk_custom_iscsi.pm +++ b/tests/disk_custom_iscsi.pm @@ -7,7 +7,7 @@ sub run { my $self = shift; # iscsi config hash my %iscsi; - $iscsi{'iqn.2016-06.local.domain:support.target1'} = ['172.16.2.110', 'test', 'weakpassword']; + $iscsi{'iqn.2016-06.local.domain:support.target1'} = ['172.16.2.120', 'test', 'weakpassword']; # Anaconda hub # Go to INSTALLATION DESTINATION and ensure one regular disk # and the iscsi target are selected.