Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deploy/openshift-clusters/inventory_baremetal.ini.sample
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# boot_mac - (optional) MAC address of the NIC used for PXE boot
# If omitted, the adopt script attempts Redfish discovery.
# data_mac - MAC address of the data NIC (for agent-config hostname mapping)
# May differ from boot_mac on multi-NIC servers. Emitted as BAREMETAL_MACS.
# May differ from boot_mac on multi-NIC servers. Emitted as AGENT_BAREMETAL_MACS.
# node_ip - Static IP address for this node on the machine network
#
# The hostname (first field) becomes the node name in ironic_nodes.json.
Expand Down
12 changes: 6 additions & 6 deletions deploy/openshift-clusters/scripts/baremetal-adopt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -431,33 +431,33 @@ generate_baremetal_config() {
echo "export MANAGE_INT_BRIDGE=n"
echo "export AGENT_E2E_TEST_SCENARIO=\"TNF_IPV4_DHCP\""

# BAREMETAL_IPS is required — dev-scripts crashes under set -u without it
# AGENT_BAREMETAL_IPS is required — dev-scripts agent pipeline needs node IPs
local ip_list=""
for ((i = 0; i < ${#NODE_IPS[@]}; i++)); do
[[ -z "${NODE_IPS[$i]}" ]] && die "Node '${NODE_NAMES[$i]}': node_ip is required for baremetal deploy"
[[ -n "${ip_list}" ]] && ip_list+=","
ip_list+="${NODE_IPS[$i]}"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
done
echo "export BAREMETAL_IPS=\"${ip_list}\""
echo "export AGENT_BAREMETAL_IPS=\"${ip_list}\""

# BAREMETAL_API_VIP is required — set_api_and_ingress_vip() needs it
# BAREMETAL_API_VIP is platform-level (used by both IPI and ABI in network.sh)
[[ -z "${API_VIP}" ]] && die "api_vip is required in [baremetal_network] for baremetal deploy"
[[ -z "${ISO_URL}" ]] && die "iso_url is required in [baremetal_network] for baremetal deploy"
echo ""
echo "# Baremetal network config"
echo "export BAREMETAL_API_VIP=\"${API_VIP}\""
echo "export BAREMETAL_ISO_SERVER=\"${ISO_URL}\""
echo "export AGENT_BAREMETAL_ISO_SERVER=\"${ISO_URL}\""
[[ -n "${MACHINE_NETWORK}" ]] && echo "export EXTERNAL_SUBNET_V4=\"${MACHINE_NETWORK}\""
[[ -n "${INGRESS_VIP}" ]] && echo "export BAREMETAL_INGRESS_VIP=\"${INGRESS_VIP}\""

# BAREMETAL_MACS is required — agent-config needs data NIC MACs for hostname mapping
# AGENT_BAREMETAL_MACS is required — agent-config needs data NIC MACs for hostname mapping
local mac_list=""
for ((i = 0; i < ${#NODE_DATA_MACS[@]}; i++)); do
[[ -z "${NODE_DATA_MACS[$i]}" ]] && die "Node '${NODE_NAMES[$i]}': data_mac is required for baremetal deploy"
[[ -n "${mac_list}" ]] && mac_list+=","
mac_list+="${NODE_DATA_MACS[$i]}"
done
echo "export BAREMETAL_MACS=\"${mac_list}\""
echo "export AGENT_BAREMETAL_MACS=\"${mac_list}\""
Comment thread
coderabbitai[bot] marked this conversation as resolved.
} > "${output_file}"

info " → ${output_file}"
Expand Down