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
| ... | ... |
@@ -15,7 +15,7 @@ |
| 15 | 15 |
name="" |
| 16 | 16 |
for u in `systemctl list-unit-files | grep devstack | awk '{print $1}'`; do
|
| 17 | 17 |
name=$(echo $u | sed 's/devstack@/screen-/' | sed 's/\.service//') |
| 18 |
- journalctl -o short-precise --unit $u | tee {{ stage_dir }}/logs/$name.txt > /dev/null
|
|
| 18 |
+ journalctl -o short-precise --unit $u | gzip - > {{ stage_dir }}/logs/$name.txt.gz
|
|
| 19 | 19 |
done |
| 20 | 20 |
|
| 21 | 21 |
# Export the journal in export format to make it downloadable |
| ... | ... |
@@ -34,4 +34,4 @@ |
| 34 | 34 |
-t sudo \ |
| 35 | 35 |
--no-pager \ |
| 36 | 36 |
--since="$(cat {{ devstack_base_dir }}/log-start-timestamp.txt)" \
|
| 37 |
- | tee {{ stage_dir }}/logs/syslog.txt > /dev/null
|
|
| 37 |
+ | gzip - > {{ stage_dir }}/logs/syslog.txt.gz
|