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
This commit is contained in:
Riccardo Pittau
2023-01-03 14:44:28 +01:00
parent 6b84fbf8f2
commit cab04afe6e

View File

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