From e825ba07a1b88ab0570053f92123aa451e4b2ec8 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Wed, 26 Jun 2024 18:10:43 +0200 Subject: [PATCH] Create parent directory in merge_config_file The code accounts for the config file not existing but it does not account for the parent directory missing. This is currently breaking any Ironic jobs that disable Nova. Change-Id: Ia5fcfe6c63f5cc40b11f7e1f3be244d7897f26f6 --- inc/meta-config | 1 + 1 file changed, 1 insertion(+) diff --git a/inc/meta-config b/inc/meta-config index be73b60800..b9d9649e4b 100644 --- a/inc/meta-config +++ b/inc/meta-config @@ -90,6 +90,7 @@ function merge_config_file { local real_configfile real_configfile=$(eval echo $configfile) if [ ! -f $real_configfile ]; then + mkdir -p $(dirname $real_configfile) || die $LINENO "could not create the directory of $real_configfile ($configfile)" touch $real_configfile || die $LINENO "could not create config file $real_configfile ($configfile)" fi