From 4abf70148423920cd997c876c634774999e189a6 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Mon, 9 Feb 2015 14:51:11 +0100 Subject: [PATCH] Pass BOOTIF to ironic-discoverd from the ramdisk Required for smarter decision on which ports to create in Ironic. Change-Id: Ib9f3b49ffdf19f1199a34351037fe65415fed816 --- .../init.d/80-ironic-discoverd-ramdisk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/elements/ironic-discoverd-ramdisk/init.d/80-ironic-discoverd-ramdisk b/elements/ironic-discoverd-ramdisk/init.d/80-ironic-discoverd-ramdisk index 4da77ff8..3da82d09 100644 --- a/elements/ironic-discoverd-ramdisk/init.d/80-ironic-discoverd-ramdisk +++ b/elements/ironic-discoverd-ramdisk/init.d/80-ironic-discoverd-ramdisk @@ -1,4 +1,6 @@ DISCOVERD_URL=$(get_kernel_parameter discoverd_callback_url) +BOOTIF=$(get_kernel_parameter BOOTIF) + if [ -z "$DISCOVERD_URL" ]; then # Some old ramdisks are around DISCOVERD_URL=$(get_kernel_parameter ironic_callback_url) @@ -61,7 +63,7 @@ disk_bytes=$(fdisk -l | grep Disk | awk '{print $5}' | head -n 1) DISK_SIZE=$(($disk_bytes/1024/1024/1024 - 1)) NODE_DATA="'{\"ipmi_address\":\"$BMC_ADDRESS\",\"local_gb\":$DISK_SIZE,\"memory_mb\":$RAM,\"cpus\":$CPUS,\"cpu_arch\":\"$CPU_ARCH\"" -NODE_DATA="$NODE_DATA,\"interfaces\":$IFACES}'" +NODE_DATA="$NODE_DATA,\"interfaces\":$IFACES,\"boot_interface\":\"$BOOTIF\"}'" echo Collected $NODE_DATA NODE_RESP=$(request_curl POST $DISCOVERD_URL $NODE_DATA)