Sleep to give logs a chance to be flushed.

The Jenkins SCP plugin copies log files that have been copied by
devstack-gate from their normal locations to the log directory for that
particular test run. Sometimes these SCP'ed files are showing up
incomplete and that appears to be happening because the services are
unable to flush their log buffers before copying happens. Sleep for two
seconds before copying the logs to give the log buffers a chance at
flushing.

Change-Id: I12307a2f93839015e83389da8f6a10549044bd81
This commit is contained in:
Clark Boylan
2013-01-09 10:26:12 -08:00
parent 2d47a0378d
commit b77da8f48b

View File

@@ -228,6 +228,9 @@ function cleanup_host {
cd $WORKSPACE
# No matter what, archive logs
# Sleep to give services a chance to flush their log buffers.
sleep 2
sudo cp /var/log/syslog $WORKSPACE/logs/syslog.txt
sudo cp /var/log/kern.log $WORKSPACE/logs/kern_log.txt
mkdir $WORKSPACE/logs/rabbitmq/