From 527cb63152fd5e67781abfb398e73241215ef7ae Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 25 Aug 2020 16:18:32 -0700 Subject: [PATCH] post_fail_hook: upload PostgreSQL init log if it exists Why...why...WHY is this not in /var/log. Sheesh. Signed-off-by: Adam Williamson --- lib/installedtest.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/installedtest.pm b/lib/installedtest.pm index a86c1818..0a6ec9dd 100644 --- a/lib/installedtest.pm +++ b/lib/installedtest.pm @@ -110,6 +110,11 @@ sub post_fail_hook { upload_logs "/var/named/data/named.run"; } + # update PostgreSQL initialization log (for database_server test) + unless (script_run 'test -f /var/lib/pgsql/initdb_postgresql.log') { + upload_logs "/var/lib/pgsql/initdb_postgresql.log"; + } + # 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' /var/log") {