From eaf37bdacebcf389c68db7723be7de78538b4cab Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 14 Sep 2015 13:10:05 +0200 Subject: [PATCH] gate: custom handling of cloudera images Generating cloudera images requires lots of space, in terms of cached resources (distribution base images, packages, etc) and generated images. This causes the generation of all the cloudera images to (almost?) always fail on the gate slaves, as running out of space. As a workaround to this, manually invoke the generation of cloudera images per-distro, cleaning the cache (which contains mostly stuff specific to the last built distribution) and the generated images after each run. Change-Id: I4468f9e2926e101864e73f8aedf7b0612a3f7a96 --- tools/gate/build-images | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tools/gate/build-images b/tools/gate/build-images index 2d672809..323d1001 100755 --- a/tools/gate/build-images +++ b/tools/gate/build-images @@ -2,4 +2,18 @@ PLUGIN=$1 -tox -e venv -- sahara-image-create -x -u -p $PLUGIN +case "$PLUGIN" in + "cloudera") + # manually call each distro for cloudera, so we can cleanup + # cache and generated images from the previous run + # (saving space a bit) + for distro in ubuntu centos; do + tox -e venv -- sahara-image-create -x -u -p $PLUGIN -i $distro + find . -maxdepth 1 -name '*cloudera*.qcow2' -delete + sudo rm -rf ~/.cache/image-create + done + ;; + *) + tox -e venv -- sahara-image-create -x -u -p $PLUGIN + ;; +esac