fix copying the mysql logs on completion

after telling jay that we were creating and archiving mysql slow
logs on every run, I was found to be a liar. This turns out to be
because we did shell expansion at the wrong point and got the
following in cleanup:

+ sudo cp '/var/log/mysql/*' ....-devstack-vm-full/logs/mysql/
cp: cannot stat `/var/log/mysql/*': No such file or directory

Do a cp -a instead to not fail on shell expansion

Change-Id: Ifd20ba17f7ff7d528697fbadd9f1d0178e7e7767
This commit is contained in:
Sean Dague
2013-04-20 19:05:04 -04:00
parent ef2cd5aa92
commit 40e1f56a41

View File

@@ -277,8 +277,7 @@ function cleanup_host {
mkdir $WORKSPACE/logs/rabbitmq/
sudo cp /var/log/rabbitmq/* $WORKSPACE/logs/rabbitmq/
if [ -d /var/log/mysql ] ; then
mkdir $WORKSPACE/logs/mysql/
sudo cp /var/log/mysql/* $WORKSPACE/logs/mysql/
sudo cp -a /var/log/mysql $WORKSPACE/logs/
fi
mkdir $WORKSPACE/logs/sudoers.d/
@@ -311,6 +310,10 @@ function cleanup_host {
rename 's/\.log$/.txt/' $WORKSPACE/logs/*
rename 's/(.*)/$1.txt/' $WORKSPACE/logs/sudoers.d/*
rename 's/\.log$/.txt/' $WORKSPACE/logs/rabbitmq/*
if [ -d $WORKSPACE/logs/mysql ]; then
rename 's/\.log$/.txt/' $WORKSPACE/logs/mysql/*
fi
mv $WORKSPACE/logs/rabbitmq/startup_log \
$WORKSPACE/logs/rabbitmq/startup_log.txt