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
This commit is contained in:
Julia Kreger 2015-05-28 18:01:41 -04:00
parent 48b4d6abfe
commit 2994425544

View File

@ -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