]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
buildpackages: wait for the build machine deletion
authorLoic Dachary <ldachary@redhat.com>
Thu, 26 Nov 2015 12:10:34 +0000 (13:10 +0100)
committerLoic Dachary <ldachary@redhat.com>
Thu, 26 Nov 2015 12:13:36 +0000 (13:13 +0100)
When the quotas are low, it matters to block until the build machine is
actually deleted. Otherwise target provisionning may fail because the
they exceed the quota. For instance the default on OVH is to have 32
cores and the build machine uses 16. The packages-repository machine
uses two, the teuthology cluster uses one and that leaves only 13 cores
for the targets which may be too low when running jobs that require
large instances.

Signed-off-by: Loic Dachary <loic@dachary.org>
tasks/buildpackages/Makefile

index e8b4145f5699d995835cddf49a6a45f56a67415b..b503d1487e1fdb6654347a727b91bbdb1bf6f918 100644 (file)
@@ -30,7 +30,7 @@ packages-repository:
 ceph-${CEPH_PKG_TYPE}-${CEPH_DIST}-${CEPH_ARCH}-${CEPH_FLAVOR}-${CEPH_SHA1}: packages-repository
        openstack server create --image 'teuthology-${CEPH_OS_TYPE}-${CEPH_OS_VERSION}' --flavor ${BUILD_FLAVOR} --key-name teuthology --security-group teuthology --property ownedby=${MY_IP} --user-data ${CEPH_OS_TYPE}-${CEPH_OS_VERSION}-user-data.txt --wait $@ ; sleep 30
        set -ex ; \
-       trap "openstack server delete $@" EXIT ; \
+       trap "openstack server delete --wait $@" EXIT ; \
        ip=$(call get_ip,$@) ; \
        for delay in 1 2 4 8 8 8 8 8 8 8 8 8 16 16 16 16 16 32 32 32 64 128 256 512 ; do if ssh -o 'ConnectTimeout=3' $$ip bash -c '"grep -q READYTORUN /var/log/cloud-init*.log"' ; then break ; else sleep $$delay ; fi ; done ; \
        scp make-${CEPH_PKG_TYPE}.sh common.sh ubuntu@$$ip: ; \