Save sql logs

Preserve sql logs in gate. A postgres bug was just found in the gate,
but the issue had to be reproduced locally since postgres logs aren't
saved. This fixes that.

Change-Id: I81e5fc52580383d6606d185ba7ac9fa10be52ff6
Related-Bug: #1321093
This commit is contained in:
Joe Gordon
2014-05-20 16:08:35 +09:00
parent 607ca500e6
commit 28cededc75

View File

@@ -407,6 +407,19 @@ function cleanup_host {
sudo cp /var/log/rabbitmq/* $BASE/logs/rabbitmq/
fi
# db logs
if [ -d /var/log/postgresql ] ; then
# Rename log so it doesn't have an additional '.' so it won't get
# deleted
sudo cp /var/log/postgresql/*log $BASE/logs/postgres.log
fi
if [ -f /var/log/mysql.err ] ; then
sudo cp /var/log/mysql.err $BASE/logs/mysql_err.log
fi
if [ -f /var/log/mysql.log ] ; then
sudo cp /var/log/mysql.log $BASE/logs/
fi
# libvirt
if [ -d /var/log/libvirt ] ; then
sudo cp /var/log/libvirt/libvirtd*.log $BASE/logs/