From 2700bf88a549088285bef41fe86ac323965c8727 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Thu, 4 Jan 2018 10:16:16 -0800 Subject: [PATCH] Gzip openstack service logs These files are quite large and disk space is limited so make sure we compress the log files before copying them to storage. Additionally os-loganalyze will only operate on gzipped log files so this should fix os-loganalyze with tempest-full job's logs. This is mostly a check to confirm everything works as expected but we probably want to move the gzip step into the log publication roles so that all log files end up compressed. Change-Id: Ie87962428e0ca755c211cc5e664a14a9f2a79ac4 --- roles/export-devstack-journal/tasks/main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/export-devstack-journal/tasks/main.yaml b/roles/export-devstack-journal/tasks/main.yaml index 3efa5755b2..6e760c1f6f 100644 --- a/roles/export-devstack-journal/tasks/main.yaml +++ b/roles/export-devstack-journal/tasks/main.yaml @@ -15,7 +15,7 @@ name="" for u in `systemctl list-unit-files | grep devstack | awk '{print $1}'`; do name=$(echo $u | sed 's/devstack@/screen-/' | sed 's/\.service//') - journalctl -o short-precise --unit $u | tee {{ stage_dir }}/logs/$name.txt > /dev/null + journalctl -o short-precise --unit $u | gzip - > {{ stage_dir }}/logs/$name.txt.gz done # Export the journal in export format to make it downloadable @@ -34,4 +34,4 @@ -t sudo \ --no-pager \ --since="$(cat {{ devstack_base_dir }}/log-start-timestamp.txt)" \ - | tee {{ stage_dir }}/logs/syslog.txt > /dev/null + | gzip - > {{ stage_dir }}/logs/syslog.txt.gz