From b77da8f48b259c3543d10fa51d9333e622c899d8 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 9 Jan 2013 10:26:12 -0800 Subject: [PATCH] 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 --- devstack-vm-gate-wrap.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/devstack-vm-gate-wrap.sh b/devstack-vm-gate-wrap.sh index 4d169f4a..198af9e0 100755 --- a/devstack-vm-gate-wrap.sh +++ b/devstack-vm-gate-wrap.sh @@ -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/