summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Pittau <elfosardo@gmail.com>2023-01-03 14:44:28 +0100
committerRiccardo Pittau <elfosardo@gmail.com>2023-01-03 16:09:00 +0100
commitcab04afe6e4c0dd9968b278d68437836ba58ff34 (patch)
treef5d1d83fb00aa5dd116f2e6c7bc41fc5d724b28c
parent6b84fbf8f2a92fc9c591e26eeec4b69cc1aa2ffe (diff)
downloadironic-cab04afe6e4c0dd9968b278d68437836ba58ff34.tar.gz
Create IRONIC_VM_MACS_CSV_FILE if it does not exist
The IRONIC_VM_MACS_CSV_FILE is generated only if we execute the ironic basic ops, so when IRONIC_BAREMETAL_BASIC_OPS is True. In some jobs we set IRONIC_BAREMETAL_BASIC_OPS to False but we still look for that file causing a "file not found" error which does not trigger a trap until focal, but it does in jammy. Let's create the file if it does not exist. Change-Id: Ib938abe0723072419f336159cbffff33e46ea39b
-rw-r--r--devstack/lib/ironic3
1 files changed, 3 insertions, 0 deletions
diff --git a/devstack/lib/ironic b/devstack/lib/ironic
index aae8ca5cf..5164b8c20 100644
--- a/devstack/lib/ironic
+++ b/devstack/lib/ironic
@@ -2376,6 +2376,9 @@ function enroll_nodes {
local ironic_node_disk=$IRONIC_VM_SPECS_DISK
local ironic_ephemeral_disk=$IRONIC_VM_EPHEMERAL_DISK
local ironic_node_arch=x86_64
+ if [[ ! -f $IRONIC_VM_MACS_CSV_FILE ]]; then
+ touch $IRONIC_VM_MACS_CSV_FILE
+ fi
local ironic_hwinfo_file=$IRONIC_VM_MACS_CSV_FILE
if is_deployed_by_ipmi; then