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
This commit is contained in:
Dmitry Tantsur
2024-06-26 18:10:43 +02:00
parent db305d2a4b
commit e825ba07a1

View File

@@ -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