diff --git a/devstack/common_settings b/devstack/common_settings index 82eaf6968f..83923c1e9a 100644 --- a/devstack/common_settings +++ b/devstack/common_settings @@ -8,13 +8,15 @@ fi # values are: "bios" or "uefi", defaults to "uefi". IRONIC_BOOT_MODE=${IRONIC_BOOT_MODE:-uefi} +IRONIC_HW_ARCH=${IRONIC_HW_ARCH:-x86_64} + CIRROS_VERSION_DEVSTACK=$(set +o xtrace && source $TOP_DIR/stackrc && echo $CIRROS_VERSION) CIRROS_VERSION=${CIRROS_VERSION:-$CIRROS_VERSION_DEVSTACK} -IRONIC_DEFAULT_IMAGE_NAME=cirros-${CIRROS_VERSION}-x86_64-uec +IRONIC_DEFAULT_IMAGE_NAME=cirros-${CIRROS_VERSION}-${IRONIC_HW_ARCH}-uec IRONIC_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-$IRONIC_DEFAULT_IMAGE_NAME} @@ -35,13 +37,8 @@ function add_image_link { # Do not restrict downloading image only for specific case. Download both disk and uec images. # NOTE (vdrok): Here the images are actually pre-cached by devstack, in # the files folder, so they won't be downloaded again. -if [[ $IRONIC_HW_ARCH == "aarch64" ]]; then - add_image_link http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-aarch64-uec.tar.gz - add_image_link http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-aarch64-disk.img -else - add_image_link http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-uec.tar.gz - add_image_link http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-disk.img -fi +add_image_link http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${IRONIC_HW_ARCH}-uec.tar.gz +add_image_link http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${IRONIC_HW_ARCH}-disk.img export IRONIC_WHOLEDISK_IMAGE_NAME=${IRONIC_WHOLEDISK_IMAGE_NAME:-${IRONIC_IMAGE_NAME/-uec/-disk}} export IRONIC_PARTITIONED_IMAGE_NAME=${IRONIC_PARTITIONED_IMAGE_NAME:-${IRONIC_IMAGE_NAME/-disk/-uec}} diff --git a/devstack/lib/ironic b/devstack/lib/ironic index 520a11c61c..72d6c36dbe 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -124,6 +124,10 @@ IRONIC_VM_EMULATOR="/usr/bin/qemu-system-${IRONIC_HW_ARCH}" GRUB_ARCH=x64 if [[ $IRONIC_HW_ARCH == "aarch64" ]]; then GRUB_ARCH=aa64 + + # NOTE(cid): Original change was tested on virt-6.2 + # 'virt' is an alias for whatever is the latest version + IRONIC_MACHINE_TYPE=virt fi # Deploy Ironic Nodes & configure n-cpu for sharding @@ -1161,15 +1165,13 @@ function configure_redfish { mkdir -p $(dirname $IRONIC_REDFISH_EMULATOR_CONFIG) fi - local ironic_node_arch=$IRONIC_HW_ARCH - cat - < $IRONIC_REDFISH_EMULATOR_CONFIG SUSHY_EMULATOR_BOOT_LOADER_MAP = { 'UEFI': { - '$ironic_node_arch': '$UEFI_LOADER_PATH' + '$IRONIC_HW_ARCH': '$UEFI_LOADER_PATH' }, 'Legacy': { - '$ironic_node_arch': None + '$IRONIC_HW_ARCH': None } } SUSHY_EMULATOR_FEATURE_SET = "$IRONIC_REDFISH_EMULATOR_FEATURE_SET" @@ -3047,7 +3049,7 @@ function upload_image_if_needed { dest="$IRONIC_DATA_DIR/$IRONIC_PARTITIONED_IMAGE_NAME.img" # Export some variables that the script is using. - CIRROS_ARCH=$CIRROS_ARCH CIRROS_VERSION=$CIRROS_VERSION \ + CIRROS_ARCH=$IRONIC_HW_ARCH CIRROS_VERSION=$CIRROS_VERSION \ IRONIC_TTY_DEV=$IRONIC_TTY_DEV VERBOSE=$VERBOSE \ $IRONIC_SCRIPTS_DIR/cirros-partition.sh "$dest" diff --git a/devstack/tools/ironic/scripts/cirros-partition.sh b/devstack/tools/ironic/scripts/cirros-partition.sh index bf6168e827..60037a0c66 100755 --- a/devstack/tools/ironic/scripts/cirros-partition.sh +++ b/devstack/tools/ironic/scripts/cirros-partition.sh @@ -9,7 +9,7 @@ if [[ "$VERBOSE" == True ]]; then fi CIRROS_VERSION=${CIRROS_VERSION:-0.6.1} -CIRROS_ARCH=${CIRROS_ARCH:-x86_64} +CIRROS_ARCH=${IRONIC_HW_ARCH:-x86_64} # TODO(dtantsur): use the image cached on infra images in the CI DISK_URL=http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-disk.img OUT=$(realpath ${1:-rootfs.img}) diff --git a/doc/source/contributor/arm-devstack-guide.rst b/doc/source/contributor/arm-devstack-guide.rst index de7d75a6cb..b18f8ecd10 100644 --- a/doc/source/contributor/arm-devstack-guide.rst +++ b/doc/source/contributor/arm-devstack-guide.rst @@ -43,9 +43,6 @@ Create devstack/local.conf with the following content:: IRONIC_VM_SPECS_CPU=1 IRONIC_VM_VOLUME_COUNT=2 - IRONIC_RPC_TRANSPORT=json-rpc - IRONIC_RAMDISK_TYPE=dib - # Enable hardware types and interfaces. IRONIC_ENABLED_HARDWARE_TYPES=redfish IRONIC_ENABLED_MANAGEMENT_INTERFACES=redfish @@ -57,10 +54,6 @@ Create devstack/local.conf with the following content:: # Specify deploy driver. This driver should be in the enabled list above. IRONIC_DEPLOY_DRIVER=redfish - CIRROS_VERSION=0.6.1 - CIRROS_ARCH=aarch64 - DEFAULT_IMAGE_NAME=cirros-0.6.1-aarch64-uec - FORCE_CONFIG_DRIVE=False # aarch64 + IRONIC_BUILD_DEPLOY_RAMDISK will be a bad mix @@ -73,8 +66,6 @@ Create devstack/local.conf with the following content:: IRONIC_GRUB2_SHIM_FILE=https://mirror.stream.centos.org/9-stream/BaseOS/aarch64/os/EFI/BOOT/BOOTAA64.EFI IRONIC_GRUB2_FILE=https://mirror.stream.centos.org/9-stream/BaseOS/aarch64/os/EFI/BOOT/grubaa64.efi IRONIC_HW_ARCH=aarch64 - IRONIC_MACHINE_TYPE=virt-6.2 - IRONIC_JSON_RPC_AUTH_STRATEGY='http_basic' IRONIC_DIB_RAMDISK_OS=debian-arm64 INSTALL_TEMPEST=False @@ -83,10 +74,11 @@ Create devstack/local.conf with the following content:: # By default, DevStack creates a 10.0.0.0/24 network for instances. # If this overlaps with the hosts network, you may adjust with the # following. - IP_VERSION=4 - FIXED_RANGE=10.1.0.0/20 - IPV4_ADDRS_SAFE_TO_USE=10.1.0.0/20 - NETWORK_GATEWAY=10.1.0.1 + # + # IP_VERSION=4 + # FIXED_RANGE=10.1.0.0/20 + # IPV4_ADDRS_SAFE_TO_USE=10.1.0.0/20 + # NETWORK_GATEWAY=10.1.0.1 Q_AGENT=openvswitch Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch diff --git a/zuul.d/ironic-jobs.yaml b/zuul.d/ironic-jobs.yaml index 3c159d7995..5faa04a972 100644 --- a/zuul.d/ironic-jobs.yaml +++ b/zuul.d/ironic-jobs.yaml @@ -123,9 +123,6 @@ tempest_test_regex: BaremetalDriverDirectWholedisk tempest_concurrency: 2 devstack_localrc: - CIRROS_VERSION: 0.6.1 - CIRROS_ARCH: aarch64 - DEFAULT_IMAGE_NAME: cirros-0.6.1-aarch64-uec FORCE_CONFIG_DRIVE: False IRONIC_AGENT_IMAGE_DOWNLOAD_SOURCE: http IRONIC_AUTOMATED_CLEAN_ENABLED: False @@ -142,11 +139,7 @@ IRONIC_GRUB2_SHIM_FILE: https://mirror.stream.centos.org/9-stream/BaseOS/aarch64/os/EFI/BOOT/BOOTAA64.EFI IRONIC_GRUB2_FILE: https://mirror.stream.centos.org/9-stream/BaseOS/aarch64/os/EFI/BOOT/grubaa64.efi IRONIC_HW_ARCH: aarch64 - IRONIC_MACHINE_TYPE: virt-6.2 - IRONIC_JSON_RPC_AUTH_STRATEGY: 'http_basic' IRONIC_DIB_RAMDISK_OS: debian-arm64 - IRONIC_RAMDISK_TYPE: dib - IRONIC_RPC_TRANSPORT: json-rpc IRONIC_VM_SPECS_RAM: 4096 IRONIC_VM_SPECS_CPU: 1 IRONIC_VM_COUNT: 1