From 6dfc40913306e4e1712dce5c272ce05de4d355ac Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Wed, 22 Jul 2020 10:48:14 -0700 Subject: [PATCH] Force RAX hosts to run tinyipa The CPU overhead of nested virtualization on rax hosts simply is too much for Ironic's CI to justify using full size IPA images. The failure rate is simply too high. As a result, lets use TinyIPA images when we are not building a ramdisk to reduce that failure rate. Change-Id: Ifa81397519833201b737cff89f61178c8835e3ca --- devstack/lib/ironic | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/devstack/lib/ironic b/devstack/lib/ironic index 40cbd6b269..69c867e120 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -263,6 +263,14 @@ if [[ ! "$IRONIC_RAMDISK_TYPE" =~ $IRONIC_SUPPORTED_RAMDISK_TYPES_RE ]]; then die $LINENO "Unrecognized IRONIC_RAMDISK_TYPE: $IRONIC_RAMDISK_TYPE. Expected 'tinyipa' or 'dib'" fi +# Prevent a case that will likely result in a failure. +if [[ "$hostdomain" =~ "rax" ]]; then + if [[ "$IRONIC_RAMDISK_TYPE" == "dib" ]] && [[ "$IRONIC_BUILD_DEPLOY_RAMDISK" == "False" ]]; then + echo "** WARNING ** - DIB based IPA images have been defined, however we are running devstack on RAX VM. Due to virtualization constraints, we are automatically falling back to TinyIPA to ensure CI job passage." + IRONIC_RAMDISK_TYPE="tinyipa" + fi +fi + # If present, these files are used as deploy ramdisk/kernel. # (The value must be an absolute path) IRONIC_DEPLOY_RAMDISK=${IRONIC_DEPLOY_RAMDISK:-$TOP_DIR/files/ir-deploy-$IRONIC_DEPLOY_DRIVER.initramfs}