Merge "Gzip openstack service logs"

This commit is contained in:
Zuul
2018-01-09 21:22:50 +00:00
committed by Gerrit Code Review

View File

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