From d187906839d1a92e583ed044a14ec197fc18ad59 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 11 Apr 2018 06:51:26 +1000 Subject: [PATCH] Reduce strictness of growroot test We are seeing consistent failures where the Trusty root partition is 64MiB shorter than we expect. Unfortunately we don't currently have a concrete explanation for this but rounding due to alignment is suspected. Reduce the expected size to something bigger than the images, but not so close to 5GiB. Also add a more useful failure message; currently you have to dig back through the logs to see where it went wrong. Change-Id: Iba1fafdb1fe0f3c1b751772af939f079c429fcf3 --- tools/check_devstack_plugin.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tools/check_devstack_plugin.sh b/tools/check_devstack_plugin.sh index 8334bb8b3..87822083e 100755 --- a/tools/check_devstack_plugin.sh +++ b/tools/check_devstack_plugin.sh @@ -4,6 +4,7 @@ LOGDIR=$1 # Set to indiciate an error return RETURN=0 +FAILURE_REASON="" NODEPOOL_INSTALL=${NODEPOOL_INSTALL:-/opt/stack/nodepool-venv} NODEPOOL_CONFIG=${NODEPOOL_CONFIG:-/etc/nodepool/nodepool.yaml} @@ -37,11 +38,16 @@ function sshintonode { /tmp/ssh_wrapper $node ls / # Check that the root partition grew on boot; it should be a 5GiB - # partition, but subtract some space for boot region. + # partition minus some space for the boot partition. However + # emperical evidence suggests there is some modulo maths going on, + # (possibly with alignment?) that means we can vary up to even + # 64MiB. Thus we choose an expected value that gives us enough + # slop to avoid false matches, but still indicates we resized up. root_size=$(/tmp/ssh_wrapper $node -- lsblk -rbno SIZE /dev/vda1) - expected_root_size=$(( (5 * 1024 * 1024 * 1024) - ( 4096 * 1024 ) )) + expected_root_size=$(( 5000000000 )) if [[ $root_size -lt $expected_root_size ]]; then - echo "Root device does not appear to have grown: $root_size" + echo "*** Root device does not appear to have grown: $root_size" + FAILURE_REASON="Root partition of $name does not appear to have grown: $root_size < $expected_root_size" RETURN=1 fi } @@ -173,4 +179,7 @@ $NODEPOOL delete --now 0000000000 # show the deleted nodes (and their replacements may be building) $NODEPOOL list +if [[ -n "${FAILURE_REASON}" ]]; then + echo "${FAILURE_REASON}" +fi exit $RETURN