From 89285e0d2a6f570a50d93274de5309f07cde40e0 Mon Sep 17 00:00:00 2001 From: Nir Magnezi Date: Tue, 4 Jul 2017 15:02:26 +0300 Subject: [PATCH] diskimage-builder: Acceptable RHEL based Amphora disk size =< 3GB The default disk size used in the diskimage-create is 2GB. When using RHEL, the default 2GB disk size is just not enough and fails with 'No space left on device'. This patch adds a check to accept disk size =< 3GB in case the user chose a RHEL based amphora. Closes-Bug: #1690638 Change-Id: Id50f5473bfbd7c1263676cc41d9b4daaed04e22a --- diskimage-create/diskimage-create.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/diskimage-create/diskimage-create.sh b/diskimage-create/diskimage-create.sh index 156d807f85..008f569c98 100755 --- a/diskimage-create/diskimage-create.sh +++ b/diskimage-create/diskimage-create.sh @@ -174,6 +174,11 @@ AMP_IMAGETYPE=${AMP_IMAGETYPE:-"qcow2"} AMP_IMAGESIZE=${AMP_IMAGESIZE:-2} +if [ "$AMP_BASEOS" = "rhel" ] && [ "$AMP_IMAGESIZE" -lt 3 ]; then + echo "RHEL based amphora requires an image size of at least 3GB" + exit 1 +fi + OCTAVIA_ELEMENTS_PATH=$OCTAVIA_REPO_PATH/elements if ! [ -d $OCTAVIA_ELEMENTS_PATH ]; then