From 81387cc84097a93c7a721a996f4e33f47377a8b7 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Fri, 16 Aug 2019 11:29:30 -0700 Subject: [PATCH] Revert "installedtest: try and fix log uploads for ostree installs" This reverts commit 092d7dd9c36f517e47552c780826310c27cfbdb6 and the follow-up, they turn out not to be necessary or useful... --- lib/installedtest.pm | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/lib/installedtest.pm b/lib/installedtest.pm index 8fa06d71..956c37f9 100644 --- a/lib/installedtest.pm +++ b/lib/installedtest.pm @@ -51,13 +51,6 @@ sub post_fail_hook { script_run "dhclient"; } - # if this is an ostree (CANNED) install, we need to upload from - # the ostree deploy root - my $root = ""; - if (get_var("CANNED")) { - $root = "/ostree/deploy/fedora"; - } - # 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 @@ -91,32 +84,32 @@ sub post_fail_hook { # 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 ' . $root . '/var/tmp/abrt)" && cd ' . $root . '/var/tmp/abrt && tar czvf tmpabrt.tar.gz *') { - upload_logs "$root/var/tmp/abrt/tmpabrt.tar.gz"; + unless (script_run 'test -n "$(ls -A /var/tmp/abrt)" && cd /var/tmp/abrt && tar czvf tmpabrt.tar.gz *') { + upload_logs "/var/tmp/abrt/tmpabrt.tar.gz"; } - unless (script_run 'test -n "$(ls -A ' . $root . '/var/spool/abrt)" && cd ' . $root . '/var/spool/abrt && tar czvf spoolabrt.tar.gz *') { - upload_logs "$root/var/spool/abrt/spoolabrt.tar.gz"; + unless (script_run 'test -n "$(ls -A /var/spool/abrt)" && cd /var/spool/abrt && tar czvf spoolabrt.tar.gz *') { + upload_logs "/var/spool/abrt/spoolabrt.tar.gz"; } # upload any core dump files caught by coredumpctl - unless (script_run 'test -n "$(ls -A ' . $root . '/var/lib/systemd/coredump)" && cd ' . $root . '/var/lib/systemd/coredump && tar czvf coredump.tar.gz *') { - upload_logs "$root/var/lib/systemd/coredump/coredump.tar.gz"; + unless (script_run 'test -n "$(ls -A /var/lib/systemd/coredump)" && cd /var/lib/systemd/coredump && tar czvf coredump.tar.gz *') { + upload_logs "/var/lib/systemd/coredump/coredump.tar.gz"; } # upload bind log (for FreeIPA server test) - unless (script_run "test -f $root/var/named/data/named.run") { - upload_logs "$root/var/named/data/named.run"; + unless (script_run 'test -f /var/named/data/named.run') { + upload_logs "/var/named/data/named.run"; } # Upload /var/log # lastlog can mess up tar sometimes and it's not much use - unless (script_run "tar czvf /tmp/var_log.tar.gz --exclude='lastlog' $root/var/log") { + unless (script_run "tar czvf /tmp/var_log.tar.gz --exclude='lastlog' /var/log") { upload_logs "/tmp/var_log.tar.gz"; } # Sometimes useful for diagnosing FreeIPA issues - upload_logs "$root/etc/nsswitch.conf", failok=>1; + upload_logs "/etc/nsswitch.conf", failok=>1; if (get_var("FLAVOR") eq "updates-everything-boot-iso") { # for installer creation test