From: Loic Dachary Date: Thu, 26 Nov 2015 12:10:34 +0000 (+0100) Subject: buildpackages: wait for the build machine deletion X-Git-Tag: v10.2.6~165^2^2~262^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8088d605242a0fc05df33097e1cf8e8e0f10df89;p=ceph.git buildpackages: wait for the build machine deletion 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 --- diff --git a/tasks/buildpackages/Makefile b/tasks/buildpackages/Makefile index e8b4145f569..b503d1487e1 100644 --- a/tasks/buildpackages/Makefile +++ b/tasks/buildpackages/Makefile @@ -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: ; \