Commit 471e6927 authored by Łukasz Nowak's avatar Łukasz Nowak

deploy-test: Expose software and instance log

Without logs of SlapOS it is hard to understand the problem in case of
failure, thus add part of this information into log file.
parent 728b9ba2
......@@ -55,10 +55,20 @@ if [[ ! -s "$DEPLOYMENT_SCRIPT" ]] ; then
echo "exit 1" > $DEPLOYMENT_SCRIPT
fi
function add_log ()
{
LOG_FILE=$1
for f in /opt/slapos/log/slapos-node-{software,instance}.log ; do
echo "Tail of '$f':" >> $LOG_FILE
tail -n 500 $f >> $LOG_FILE
done
}
function upload ()
{
try=$1
LOG_FILE=$2
add_log $LOG_FILE
t=`date '+%Y%m%d%H%S'`
mv $LOG_FILE ${LOG_FILE}.$t
# just to be sure flush all disk operations before uploading
......
......@@ -55,7 +55,7 @@ output = ${buildout:directory}/template-original.kvm.cfg
[deploy-script-controller-script]
filename = deploy-script-controller
location = ${:_profile_base_location_}/${:filename}
md5sum = d2b92f45257a52e5a7ff5c311d46d4ae
md5sum = 31aadc895acf9fc2fc6e1cbe815339c6
# configuration
waittime = 360
tries = 80
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment