From 6a4cd4a9935091bf6fc717f6433c00afd9d70a7c Mon Sep 17 00:00:00 2001 From: Vasyl Saienko Date: Tue, 17 May 2016 13:57:48 +0300 Subject: [PATCH] Allow to specify node arch This patch introduce new variable IRONIC_VM_SPECS_CPU_ARCH that defines VM arch to create. Change-Id: Iedf592b24952ee197207448ba36b95521a9725d7 --- devstack/lib/ironic | 3 ++- devstack/tools/ironic/scripts/create-node.sh | 8 +------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/devstack/lib/ironic b/devstack/lib/ironic index 86b0a6a4d7..3d993e689a 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -109,6 +109,7 @@ IRONIC_VM_SSH_ADDRESS=${IRONIC_VM_SSH_ADDRESS:-$HOST_IP} IRONIC_VM_COUNT=${IRONIC_VM_COUNT:-1} IRONIC_VM_SPECS_CPU=${IRONIC_VM_SPECS_CPU:-1} IRONIC_VM_SPECS_RAM=${IRONIC_VM_SPECS_RAM:-1024} +IRONIC_VM_SPECS_CPU_ARCH=${IRONIC_VM_SPECS_CPU_ARCH:-'x86_64'} IRONIC_VM_SPECS_DISK=${IRONIC_VM_SPECS_DISK:-10} IRONIC_VM_SPECS_DISK_FORMAT=${IRONIC_VM_SPECS_DISK_FORMAT:-qcow2} IRONIC_VM_EPHEMERAL_DISK=${IRONIC_VM_EPHEMERAL_DISK:-0} @@ -754,7 +755,7 @@ function create_bridge_and_vms { for vm_name in $(_ironic_bm_vm_names); do sudo -E su $STACK_USER -c "$IRONIC_SCRIPTS_DIR/create-node.sh $vm_name \ $IRONIC_VM_SPECS_CPU $IRONIC_VM_SPECS_RAM $IRONIC_VM_SPECS_DISK \ - amd64 $IRONIC_VM_NETWORK_BRIDGE $IRONIC_VM_EMULATOR \ + $IRONIC_VM_SPECS_CPU_ARCH $IRONIC_VM_NETWORK_BRIDGE $IRONIC_VM_EMULATOR \ $vbmc_port $log_arg $IRONIC_VM_SPECS_DISK_FORMAT" >> $IRONIC_VM_MACS_CSV_FILE vbmc_port=$((vbmc_port+1)) done diff --git a/devstack/tools/ironic/scripts/create-node.sh b/devstack/tools/ironic/scripts/create-node.sh index e577f3cd20..0b0278b717 100755 --- a/devstack/tools/ironic/scripts/create-node.sh +++ b/devstack/tools/ironic/scripts/create-node.sh @@ -15,13 +15,7 @@ MEM=$(( 1024 * $3 )) # Extra G to allow fuzz for partition table : flavor size and registered size # need to be different to actual size. DISK=$(( $4 + 1)) - -case $5 in - i386) ARCH='i686' ;; - amd64) ARCH='x86_64' ;; - *) echo "Unsupported arch $4!" ; exit 1 ;; -esac - +ARCH=$5 BRIDGE=$6 EMULATOR=$7 VBMC_PORT=$8