From 030ede06e8a99eeb51ae9f0386601849948530b5 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 31 Jan 2020 10:34:24 +0100 Subject: [PATCH] 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 --- dev/functions | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dev/functions b/dev/functions index 5c5e86fca..496a694ac 100644 --- a/dev/functions +++ b/dev/functions @@ -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 {