From 2994425544d75e5952611acf7089a2c5cc113831 Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Thu, 28 May 2015 18:01:41 -0400 Subject: [PATCH] Preserve logs in logs/ folder Add retention of logs from a test run in a delineated folder so OpenStack CI can be configured to store the logs after a completed test. Change-Id: I8d686918649a69b8aab9e3c5d7faf3a79a42a4e8 Partial-Bug: 1459803 --- scripts/test-bifrost.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/test-bifrost.sh b/scripts/test-bifrost.sh index f3e718336..55ae76f60 100755 --- a/scripts/test-bifrost.sh +++ b/scripts/test-bifrost.sh @@ -46,5 +46,13 @@ if [ $EXITCODE != 0 ]; then echo "*************************" echo "Ironic Conductor log, last 1000 lines:" sudo cat /var/log/upstart/ironic-conductor.log + echo "Making logs directory and collecting logs." + mkdir ../logs + sudo cp /var/log/libvirt/baremetal_logs/testvm1_console.log ../logs/ + dmesg &> ../logs/dmesg.log + sudo netstat -apn &> ../logs/netstat.log + sudo iptables -L -n -v &> ../logs/iptables.log + sudo cp /var/log/upstart/ironic-api.log ../logs/ + sudo cp /var/log/upstart/ironic-conductor.log ../logs/ fi exit $EXITCODE