summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2016-02-09 22:46:00 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-02-09 22:46:00 +0000
commit2f04f946396c2a10b57d859516af8907b48857de (patch)
tree0519ccfe72d198cc344703a125b403ef3b6fe1a4
parentbe874c09eea937537ed6b1248d8145521f10807e (diff)
parent162d5317062198c8ae2193715b90abb2e43bb3f0 (diff)
Merge "Aggregate deployment logs of overcloud"
-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() {