From 440377b2a417816d052a1adecf5a8034368f6e23 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Fri, 13 Aug 2021 09:33:38 -0700 Subject: [PATCH] Log `df -h` and `free -h` output on anaconda failure To see if we're stuck because we ran out of memory or disk space. Signed-off-by: Adam Williamson --- lib/anacondatest.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/anacondatest.pm b/lib/anacondatest.pm index 27a768f2..7d427fcd 100644 --- a/lib/anacondatest.pm +++ b/lib/anacondatest.pm @@ -49,6 +49,10 @@ sub post_fail_hook { script_run "ip route > /dev/${serialdev} 2>&1"; script_run 'printf "\n** NETWORKMANAGER.SERVICE STATUS **\n" > /dev/' . $serialdev; script_run "systemctl --no-pager -l status NetworkManager.service > /dev/${serialdev} 2>&1"; + script_run 'printf "\n** FREE **\n" > /dev/' . $serialdev; + script_run "free -h > /dev/${serialdev} 2>&1"; + script_run 'printf "\n** DF **\n" > /dev/' . $serialdev; + script_run "df -h > /dev/${serialdev} 2>&1"; 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; @@ -78,6 +82,12 @@ sub post_fail_hook { return; } + unless (script_run "df -h > /tmp/df.log") { + upload_logs "/tmp/df.log", failok=>1; + } + unless (script_run "free -h > /tmp/free.log") { + upload_logs "/tmp/free.log", failok=>1; + } upload_logs "/tmp/X.log", failok=>1; upload_logs "/tmp/anaconda.log", failok=>1; upload_logs "/tmp/packaging.log", failok=>1;