summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Chapman <woppin@gmail.com>2016-02-09 16:55:27 +1100
committerTim Rozet <trozet@redhat.com>2016-02-11 20:49:42 +0000
commit0a3395de7c689f7849cf672da6e2d52067343982 (patch)
tree9d37c6471bcc0973559ff20cd7af579c1addbb8d
parentf87aff46ff36b0fa7172dc82d3c2b5766a2eaaf4 (diff)
Aggregate deployment logs of overcloud
JIRA: APEX-74 /var/log/messages for each node will be slurped into a new folder in the stack user's home directory. If debug was passed, it will also be printed out along with the nova list for that node. Change-Id: I726da67b076bdf1fb38ba1805456cbd7c7d9e096 (cherry picked from commit 162d5317062198c8ae2193715b90abb2e43bb3f0)
-rwxr-xr-xci/deploy.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 87787888..a7d803d8 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -986,6 +986,34 @@ EOF
done
EOI
fi
+
+ # Collect deployment logs
+ ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
+mkdir -p ~/deploy_logs
+rm -rf deploy_logs/*
+source stackrc
+set -o errexit
+for node in \$(nova list | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"); do
+ ssh -T ${SSH_OPTIONS[@]} "heat-admin@\$node" <<EOF
+ sudo cp /var/log/messages /home/heat-admin/messages.log
+ sudo chown heat-admin /home/heat-admin/messages.log
+EOF
+scp ${SSH_OPTIONS[@]} heat-admin@\$node:/home/heat-admin/messages.log ~/deploy_logs/\$node.messages.log
+if [ \$debug == "TRUE" ]; then
+ nova list --ip \$node
+ echo "---------------------------"
+ echo "-----/var/log/messages-----"
+ echo "---------------------------"
+ cat ~/deploy_logs/\$node.messages.log
+ echo "---------------------------"
+ echo "----------END LOG----------"
+ echo "---------------------------"
+fi
+ ssh -T ${SSH_OPTIONS[@]} "heat-admin@\$node" <<EOF
+ sudo rm -f /home/heat-admin/messages.log
+EOF
+done
+EOI
}
display_usage() {