From fcaef2c4b180d5f1e4e34f3897fb93db042089a1 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Sun, 1 Jun 2014 09:47:08 -0400 Subject: [PATCH] Capture *.failure logs from $BASE/status/stack When a service fails to start properly the output is dumped in *.failure files, however devstack-gate wasn't archiving them so it made identifying the causes of certain failures difficult to debug. This commit addresses that by copying these logs too. Change-Id: Icbb5188c09938811d0566a869a26a22502520df2 --- functions.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/functions.sh b/functions.sh index aff8a5fd..1ef8e63c 100644 --- a/functions.sh +++ b/functions.sh @@ -472,6 +472,12 @@ function cleanup_host { # logs files we don't want to keep sudo rm $BASE/logs/grenade.sh.log.* + # Copy failure files if they exist + if [ $(ls $BASE/stack/status/*.failure | wc -l) -gt 0 ]; then + sudo mkdir -p $BASE/logs/status + sudo cp $BASE/status/stack/*.failure $BASE/logs/status/ + fi + # Copy tempest config file sudo cp $BASE/new/tempest/etc/tempest.conf $NEWLOGTARGET/tempest_conf.txt @@ -526,6 +532,11 @@ function cleanup_host { sudo mv $f ${f/.log/.txt} done + #rename all failure files to have .txt + for f in $(find $BASE/logs/status -name "*.failure"); do + sudo mv $f ${f/.failure/.txt} + done + # append .txt to all config files # (there are some /etc/swift .builder and .ring files that get # caught up which aren't really text, don't worry about that)