diff --git a/lib/anacondatest.pm b/lib/anacondatest.pm index c76cb494..6768538a 100644 --- a/lib/anacondatest.pm +++ b/lib/anacondatest.pm @@ -25,10 +25,21 @@ sub post_fail_hook { save_screenshot; $self->root_console(); + # if we're in dracut, do things different + my $dracut = 0; + if (check_screen "root_console_dracut", 0) { + $dracut = 1; + script_run "dhclient"; + } # if we don't have tar or a network connection, we'll try and at # least send out *some* kinda info via the serial line my $hostip = testapi::host_ip(); if (script_run "ping -c 2 ${hostip}") { + if ($dracut) { + script_run 'printf "\n** RDSOSREPORT **\n" > /dev/' . $serialdev; + script_run "cat /run/initramfs/rdsosreport.txt > /dev/${serialdev}"; + return; + } script_run 'printf "\n** X.LOG **\n" > /dev/' . $serialdev; script_run "cat /tmp/X.log > /dev/${serialdev}"; script_run 'printf "\n** ANACONDA.LOG **\n" > /dev/' . $serialdev; @@ -52,6 +63,12 @@ sub post_fail_hook { return; } + if ($dracut) { + upload_logs "/run/initramfs/rdsosreport.txt", failok=>1; + # that's all that's really useful, so... + return; + } + upload_logs "/tmp/X.log", failok=>1; upload_logs "/tmp/anaconda.log", failok=>1; upload_logs "/tmp/packaging.log", failok=>1; diff --git a/lib/installedtest.pm b/lib/installedtest.pm index 6710ec60..90b86a3c 100644 --- a/lib/installedtest.pm +++ b/lib/installedtest.pm @@ -37,6 +37,13 @@ sub post_fail_hook { console_loadkeys_us; } + # if we're in dracut, do things different + my $dracut = 0; + if (check_screen "root_console_dracut", 0) { + $dracut = 1; + script_run "dhclient"; + } + # We can't rely on tar being in minimal installs, but we also can't # rely on dnf always working (it fails in emergency mode, not sure # why), so try it, then check if we have tar @@ -46,6 +53,11 @@ sub post_fail_hook { # least send out *some* kinda info via the serial line my $hostip = testapi::host_ip(); if ((script_run "rpm -q tar") || (script_run "ping -c 2 ${hostip}")) { + if ($dracut) { + script_run 'printf "\n** RDSOSREPORT **\n" > /dev/' . $serialdev; + script_run "cat /run/initramfs/rdsosreport.txt > /dev/${serialdev}"; + return; + } script_run 'printf "\n** IP ADDR **\n" > /dev/' . $serialdev; script_run "ip addr > /dev/${serialdev} 2>&1"; script_run 'printf "\n** IP ROUTE **\n" > /dev/' . $serialdev; @@ -57,6 +69,12 @@ sub post_fail_hook { return; } + if ($dracut) { + upload_logs "/run/initramfs/rdsosreport.txt", failok=>1; + # that's all that's really useful, so... + return; + } + # Note: script_run returns the exit code, so the logic looks weird. # We're testing that the directory exists and contains something. unless (script_run 'test -n "$(ls -A /var/tmp/abrt)" && cd /var/tmp/abrt && tar czvf tmpabrt.tar.gz *') { diff --git a/needles/console/root_logged_in-dracut-20190116.json b/needles/console/root_logged_in-dracut-20190116.json new file mode 100644 index 00000000..47e482db --- /dev/null +++ b/needles/console/root_logged_in-dracut-20190116.json @@ -0,0 +1,18 @@ +{ + "area": [ + { + "type": "match", + "xpos": 1, + "height": 14, + "width": 72, + "ypos": 753 + } + ], + "properties": [], + "tags": [ + "root_logged_in", + "root_console", + "root_console_dracut", + "ENV-DISTRI-fedora" + ] +} diff --git a/needles/console/root_logged_in-dracut-20190116.png b/needles/console/root_logged_in-dracut-20190116.png new file mode 100644 index 00000000..0ebc1254 Binary files /dev/null and b/needles/console/root_logged_in-dracut-20190116.png differ