Bug 1124135

Summary: [RFE][tripleo]: Enable parallel builds using diskimage-builder
Product: Red Hat OpenStack Reporter: RHOS Integration <rhos-integ>
Component: RFEsAssignee: RHOS Maint <rhos-maint>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: markmc, yeylon
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://blueprints.launchpad.net/tripleo/+spec/tripleo-diskimage-builder-parallel-builds
Whiteboard: upstream_milestone_none upstream_definition_obsolete upstream_status_unknown
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-19 16:49:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description RHOS Integration 2014-07-29 04:05:17 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/tripleo/+spec/tripleo-diskimage-builder-parallel-builds.

Description:

Background:
Currently if you run parallel builds for diskimage-builder on a system the builds fail, because the diskimage-builder uses the common “~/.cache/image-create” directory to cache OS image files, git repositories, Python or Ruby packages etc. to create the images.

Proposal:
If we want to enable parallel builds, then we need to identify and tie the builds to the correct “~/.cache/image-create” folder. To do this we can use mktemp and let diskimage-builder use this directory as the cache directory instead of “DIB_IMAGE_CACHE” (~/.cache/image-create).

    export CACHE_DIR=$(mktemp -d ~/.cache/image-create.XXXXXXXX)

This will create the "~/.cache/image-create.XXXXXXXX" directory and let the diskimage-builder use it for its respective builds.

Also, to enable diskimage-builder to build with the correct "~/.cache/image-create.XXXXXXXX" directory for “--offline” mode; the script should force the user to specify the respective “image-create.XXXXXXXX” folder to refer to for the build.

Specification URL (additional information):

None