Syslog devstack and archive log.

Enable syslogging in devstack.
Copy the syslog back to the Jenkins workspace for archiving.

Change-Id: I7f9f21891bce0031190caec6a5f593838dfd7a23
This commit is contained in:
James E. Blair
2011-12-29 16:36:59 -08:00
parent 00db77a92d
commit 50e398e8ea
2 changed files with 11 additions and 0 deletions

View File

@@ -50,6 +50,7 @@ ROOTSLEEP=0
ENABLED_SERVICES=g-api,g-reg,key,n-api,n-cpu,n-net,n-sch,mysql,rabbit
SKIP_EXERCISES=swift,volumes
SERVICE_HOST=127.0.0.1
SYSLOG=True
EOF
# The vm template update job should cache some images in ~/files.
@@ -58,5 +59,10 @@ if ls ~/cache/files/*; then
mv ~/cache/files/* /opt/stack/devstack/files
fi
# Start with a fresh syslog
sudo stop rsyslog
sudo mv /var/log/syslog /var/log/syslog-pre-devstack
sudo start rsyslog
./stack.sh
./exercise.sh

View File

@@ -26,6 +26,7 @@ ALWAYS_KEEP=${ALWAYS_KEEP:-0}
CI_SCRIPT_DIR=$(cd $(dirname "$0") && pwd)
cd $WORKSPACE
mkdir -p logs
for PROJECT in $PROJECTS
do
@@ -81,9 +82,13 @@ fi
ssh $NODE_IP_ADDR ./devstack-vm-gate-host.sh
RETVAL=$?
# No matter what, archive logs
scp -C -q $NODE_IP_ADDR:/var/log/syslog $WORKSPACE/logs/
# Now check whether the run was a success
if [ $RETVAL = 0 ] && [ $ALWAYS_KEEP = 0 ]; then
echo "Deleting host"
$CI_SCRIPT_DIR/devstack-vm-delete.py $NODE_UUID
exit $RETVAL
else
#echo "Giving host to developer"
#$CI_SCRIPT_DIR/devstack-vm-give.py $NODE_UUID