Fix error logging of dev/functions

In case of failures in kayobe-overcloud-centos, the error message fails
with:
kayobe/dev/functions: line 569: LOGDIR: unbound variable

Example:
https://zuul.opendev.org/t/openstack/build/ce1fadc3ee6d4842a599da57a670cc18

This can be reproduced with:
set -eu

if [[ -n ${LOGDIR} ]]; then
    echo "LOGDIR set"
else
    echo "else"
fi

Fix the error reporting with assigning an empty string to LOGDIR by
default.

Change-Id: Ieef73950f89e4dfb727ddc59ef2750d9b81f3c58
This commit is contained in:
Andreas Jaeger 2020-01-31 10:34:24 +01:00 committed by Mark Goddard
parent 2fcdff101f
commit 030ede06e8

View File

@ -48,6 +48,9 @@ function config_defaults {
# tenks-deploy-config-overcloud.yml or tenks-deploy-config-compute.yml will
# be used.
export TENKS_CONFIG_PATH=${TENKS_CONFIG_PATH:-}
# Log directory in case of errors
export LOGDIR=${LOGDIR:-}
}
function config_set {