copy_logs: include redis logs

Include redis logs in log collection so we can debug Redis when
something goes wrong with the service.

Change-Id: I8e5d444f8cabb437da6f4285e1d2804ea3938162
This commit is contained in:
Emilien Macchi 2017-05-18 11:06:34 -04:00
parent a76dc95f9e
commit 66aa54f6cb
1 changed files with 6 additions and 0 deletions

View File

@ -141,6 +141,7 @@ sudo cp /etc/sudoers $LOG_DIR/sudoers.txt
# apache logs; including wsgi stuff like horizon, keystone, etc.
if uses_debs; then
apache_logs=/var/log/apache2
redis_logs=/var/log/redis/redis-server.log
if [ -d /etc/apache2/sites-enabled ]; then
mkdir $LOG_DIR/apache_config
sudo cp /etc/apache2/sites-enabled/* $LOG_DIR/apache_config
@ -150,6 +151,7 @@ if uses_debs; then
fi
elif is_fedora; then
apache_logs=/var/log/httpd
redis_logs=/var/log/redis/redis.log
if [ -d /etc/httpd/conf.d ]; then
mkdir $LOG_DIR/apache_config
sudo cp /etc/httpd/conf.d/* $LOG_DIR/apache_config
@ -162,6 +164,10 @@ if [ -d ${apache_logs} ]; then
sudo cp -r ${apache_logs} $LOG_DIR/apache
fi
if [ -f ${redis_logs} ]; then
sudo cp ${redis_logs} $LOG_DIR/redis.log.txt
fi
if [ -f /var/log/audit/audit.log ]; then
sudo cp /var/log/audit/audit.log $LOG_DIR/audit.log.txt
fi