Gate: Make instance info output to stdout on failure

Change-Id: Ic20ab65dc68a6f82eb5bf0751a968aa662b29eb5
This commit is contained in:
Jesse Pretorius 2015-12-02 08:24:45 +00:00
parent 0155dbde48
commit 0568505f65

View File

@ -116,6 +116,7 @@ function exit_success {
function exit_fail { function exit_fail {
set +x set +x
log_instance_info log_instance_info
cat ${INFO_FILENAME}
info_block "Error Info - $@" info_block "Error Info - $@"
exit_state 1 exit_state 1
} }
@ -137,7 +138,8 @@ function log_instance_info {
if [ ! -d "/openstack/log/instance-info" ];then if [ ! -d "/openstack/log/instance-info" ];then
mkdir -p "/openstack/log/instance-info" mkdir -p "/openstack/log/instance-info"
fi fi
get_instance_info &> /openstack/log/instance-info/host_info_$(date +%s).log export INFO_FILENAME="/openstack/log/instance-info/host_info_$(date +%s).log"
get_instance_info &> ${INFO_FILENAME}
set -x set -x
} }