From abe8843ddcdc21aabf725a404f3fe09afb2b18c6 Mon Sep 17 00:00:00 2001 From: cid Date: Thu, 22 Feb 2024 11:43:44 +0100 Subject: [PATCH] Fix multiple assignment of redfish_system_id during node creation ``redfish_system_id`` is being passed multiple times to the node at creation as ``node_options`` never defaults back to it's initial state throughout the iteration of the while loop. Though it is surprisingly functional, it's fragile and this change aims to fix that. Closes-Bug: #2054597 Change-Id: I2c151afafb86191f047985ac00075a791639646d --- devstack/lib/ironic | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/devstack/lib/ironic b/devstack/lib/ironic index 920ac455f4..f153fc55cb 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -2450,19 +2450,19 @@ function enroll_nodes { local ironic_hwinfo_file=$IRONIC_VM_MACS_CSV_FILE if is_deployed_by_ipmi; then - local node_options="\ + local deploy_options="\ --driver-info ipmi_address=${HOST_IP} \ --driver-info ipmi_username=admin \ --driver-info ipmi_password=password" elif is_deployed_by_snmp; then - local node_options="\ + local deploy_options="\ --driver-info snmp_driver=${IRONIC_VPDU_SNMPDRIVER} \ --driver-info snmp_address=${HOST_IP} \ --driver-info snmp_port=${IRONIC_VPDU_LISTEN_PORT} \ --driver-info snmp_protocol=2c \ --driver-info snmp_community=${IRONIC_VPDU_COMMUNITY}" elif is_deployed_by_redfish; then - local node_options="\ + local deploy_options="\ --driver-info redfish_address=http://${HOST_IP}:${IRONIC_REDFISH_EMULATOR_PORT} \ --driver-info redfish_username=admin \ --driver-info redfish_password=password" @@ -2486,6 +2486,8 @@ function enroll_nodes { local node_name node_name=$node_prefix-$total_nodes + local node_options="$deploy_options" + local node_capabilities="" if [[ "$IRONIC_BOOT_MODE" == "uefi" ]]; then node_capabilities+=" --property capabilities=boot_mode:uefi"