summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2016-06-09 16:26:52 -0400
committerDan Radez <dradez@redhat.com>2016-06-09 16:31:10 -0400
commit1fd700e613e2863038479081e8dca5b268fab241 (patch)
tree985bded85d895b108fa9acdff98a319ea2473e13 /build
parentb9947ec813fea9c71b7c3208df36d110eca90b55 (diff)
updating undercloud build
if the undercloud build fails and make is rerun make will think that the undercloud is already built, this fix updates the undercloud build to match the overcloud builds such that the image file is appended with _build until the build is completed. Change-Id: I4640a1b3c4024778bbab8fbd2f65a320baaabe4b Signed-off-by: Dan Radez <dradez@redhat.com>
Diffstat (limited to 'build')
-rwxr-xr-xbuild/undercloud.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/build/undercloud.sh b/build/undercloud.sh
index f2e98795..551dbd88 100755
--- a/build/undercloud.sh
+++ b/build/undercloud.sh
@@ -13,7 +13,7 @@ source ./variables.sh
populate_cache "$rdo_images_uri/undercloud.qcow2"
if [ ! -d images ]; then mkdir images/; fi
-cp -f cache/undercloud.qcow2 images/
+cp -f cache/undercloud.qcow2 images/undercloud_build.qcow2
#Adding OpenStack packages to undercloud
pushd images > /dev/null
@@ -56,7 +56,7 @@ git archive --format=tar.gz --prefix=openstack-tripleo-heat-templates/ HEAD > ..
popd > /dev/null
LIBGUESTFS_BACKEND=direct virt-customize --upload opnfv-tht.tar.gz:/usr/share \
--run-command "cd /usr/share && rm -rf openstack-tripleo-heat-templates && tar xzf opnfv-tht.tar.gz" \
- -a undercloud.qcow2
+ -a undercloud_build.qcow2
# install the packages above and enabling ceph to live on the controller
# OpenWSMan package update supports the AMT Ironic driver for the TealBox
@@ -68,7 +68,7 @@ LIBGUESTFS_BACKEND=direct virt-customize \
--run-command "cp /usr/share/instack-undercloud/undercloud.conf.sample /home/stack/undercloud.conf && chown stack:stack /home/stack/undercloud.conf" \
--upload ../opnfv-environment.yaml:/home/stack/ \
--upload ../virtual-environment.yaml:/home/stack/ \
- -a undercloud.qcow2
+ -a undercloud_build.qcow2
# Add custom IPA to allow kernel params
wget https://raw.githubusercontent.com/trozet/ironic-python-agent/opnfv_kernel/ironic_python_agent/extensions/image.py
@@ -79,6 +79,7 @@ LIBGUESTFS_BACKEND=direct virt-customize --upload ../build_perf_image.sh:/home/s
--upload ../set_perf_images.sh:/home/stack \
--upload image.py:/root \
--upload image.pyc:/root \
- -a undercloud.qcow2
+ -a undercloud_build.qcow2
+mv -f undercloud_build.qcow2 undercloud.qcow2
popd > /dev/null