scripts: Collect logs even if deployment fails.
Always exit with success code when collecting various logs. This allows this script to be used to collect partial logs in case a deployment fails since it may help with debugging the root cause of the failure. Change-Id: I4d5a2c71303e9ed466b5fd5dbc63469677f2380f
This commit is contained in:
parent
f8036dcce4
commit
fc5e688df6
@ -45,3 +45,5 @@ sudo chown $USER ${LOG_LOCATION}/ironic-conductor.log
|
||||
# In CI scenarios, we want other users to be able to read the logs.
|
||||
sudo chmod o+r ${LOG_LOCATION}/ironic-api.log
|
||||
sudo chmod o+r ${LOG_LOCATION}/ironic-conductor.log
|
||||
|
||||
exit 0
|
||||
|
@ -93,6 +93,11 @@ elif [ ${ENABLE_KEYSTONE} = "true" ]; then
|
||||
CLOUD_CONFIG="-e cloud_name=bifrost"
|
||||
fi
|
||||
|
||||
logs_on_exit() {
|
||||
$SCRIPT_HOME/collect-test-info.sh
|
||||
}
|
||||
trap logs_on_exit EXIT
|
||||
|
||||
# Change working directory
|
||||
cd $BIFROST_HOME/playbooks
|
||||
|
||||
@ -157,6 +162,4 @@ if [ $EXITCODE != 0 ]; then
|
||||
echo "****************************"
|
||||
fi
|
||||
|
||||
$SCRIPT_HOME/collect-test-info.sh
|
||||
|
||||
exit $EXITCODE
|
||||
|
Loading…
Reference in New Issue
Block a user